From 2a4d5276333353aceec0788d844afd3d92f40f91 Mon Sep 17 00:00:00 2001 From: Brian Wilkerson Date: Tue, 13 Feb 2024 18:05:29 +0000 Subject: [PATCH] Attempt to fix a failure on the windows bot Change-Id: Icd170157c9b9db4965c47f7540ae80535f572c35 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352400 Auto-Submit: Brian Wilkerson Reviewed-by: Konstantin Shcheglov Commit-Queue: Konstantin Shcheglov --- .../test/analysis/get_hover_test.dart | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkg/analysis_server/test/analysis/get_hover_test.dart b/pkg/analysis_server/test/analysis/get_hover_test.dart index b266c403b9d..913aa908fe9 100644 --- a/pkg/analysis_server/test/analysis/get_hover_test.dart +++ b/pkg/analysis_server/test/analysis/get_hover_test.dart @@ -844,8 +844,7 @@ C f() => C.named(); // Future test_constructorInvocation_referenceFromAugmentation_default() async { - var filePath = '$testPackageLibPath/a.dart'; - newFile(filePath, ''' + var file = newFile('$testPackageLibPath/a.dart', ''' library augment 'test.dart'; augment class C { @@ -862,7 +861,7 @@ class C { C(); } '''); - var hover = await prepareHover('C();', inFile: filePath); + var hover = await prepareHover('C();', inFile: file.path); expect(hover.containingLibraryName, 'package:test/test.dart'); expect(hover.containingLibraryPath, testFile.path); expect(hover.containingClassDescription, 'C'); @@ -874,8 +873,7 @@ class C { Future test_constructorInvocation_referenceFromAugmentation_named() async { - var filePath = '$testPackageLibPath/a.dart'; - newFile(filePath, ''' + var file = newFile('$testPackageLibPath/a.dart', ''' library augment 'test.dart'; augment class C { @@ -892,7 +890,7 @@ class C { C.named(); } '''); - var hover = await prepareHover('C.named();', inFile: filePath); + var hover = await prepareHover('C.named();', inFile: file.path); expect(hover.containingLibraryName, 'package:test/test.dart'); expect(hover.containingLibraryPath, testFile.path); expect(hover.containingClassDescription, 'C'); @@ -1416,8 +1414,7 @@ void f(C c) { } Future test_methodInvocation_referenceFromAugmentation() async { - var filePath = '$testPackageLibPath/a.dart'; - newFile(filePath, ''' + var file = newFile('$testPackageLibPath/a.dart', ''' library augment 'test.dart'; augment class C { @@ -1434,7 +1431,7 @@ class C { void n() {} } '''); - var hover = await prepareHover('n();', inFile: filePath); + var hover = await prepareHover('n();', inFile: file.path); expect(hover.containingLibraryName, 'package:test/test.dart'); expect(hover.containingLibraryPath, testFile.path); expect(hover.containingClassDescription, 'C');