Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e3fcb1a

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Remove unnecessary convertPath() invocations.
Change-Id: I57d0d2204df02bd9a5fc97986347ac0218442d39 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164722 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
1 parent fe1ed1d commit e3fcb1a

7 files changed

+35
-35
lines changed

pkg/analyzer/test/src/diagnostics/if_element_condition_from_deferred_library_test.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class IfElementConditionFromDeferredLibraryTest extends PubPackageResolutionTest
2020
mixin IfElementConditionFromDeferredLibraryTestCases
2121
on PubPackageResolutionTest {
2222
test_inList_deferred() async {
23-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
23+
newFile('$testPackageLibPath/lib1.dart', content: r'''
2424
const bool c = true;''');
2525
await assertErrorsInCode(r'''
2626
import 'lib1.dart' deferred as a;
@@ -33,7 +33,7 @@ f() {
3333
}
3434

3535
test_inList_nonConst() async {
36-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
36+
newFile('$testPackageLibPath/lib1.dart', content: r'''
3737
const bool c = true;''');
3838
await assertNoErrorsInCode(r'''
3939
import 'lib1.dart' deferred as a;
@@ -43,7 +43,7 @@ f() {
4343
}
4444

4545
test_inList_notDeferred() async {
46-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
46+
newFile('$testPackageLibPath/lib1.dart', content: r'''
4747
const bool c = true;''');
4848
await assertNoErrorsInCode(r'''
4949
import 'lib1.dart' as a;
@@ -53,7 +53,7 @@ f() {
5353
}
5454

5555
test_inMap_deferred() async {
56-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
56+
newFile('$testPackageLibPath/lib1.dart', content: r'''
5757
const bool c = true;''');
5858
await assertErrorsInCode(r'''
5959
import 'lib1.dart' deferred as a;
@@ -66,7 +66,7 @@ f() {
6666
}
6767

6868
test_inMap_notConst() async {
69-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
69+
newFile('$testPackageLibPath/lib1.dart', content: r'''
7070
const bool c = true;''');
7171
await assertNoErrorsInCode(r'''
7272
import 'lib1.dart' deferred as a;
@@ -76,7 +76,7 @@ f() {
7676
}
7777

7878
test_inMap_notDeferred() async {
79-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
79+
newFile('$testPackageLibPath/lib1.dart', content: r'''
8080
const bool c = true;''');
8181
await assertNoErrorsInCode(r'''
8282
import 'lib1.dart' as a;
@@ -86,7 +86,7 @@ f() {
8686
}
8787

8888
test_inSet_deferred() async {
89-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
89+
newFile('$testPackageLibPath/lib1.dart', content: r'''
9090
const bool c = true;''');
9191
await assertErrorsInCode(r'''
9292
import 'lib1.dart' deferred as a;
@@ -99,7 +99,7 @@ f() {
9999
}
100100

101101
test_inSet_notConst() async {
102-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
102+
newFile('$testPackageLibPath/lib1.dart', content: r'''
103103
const bool c = true;''');
104104
await assertNoErrorsInCode(r'''
105105
import 'lib1.dart' deferred as a;
@@ -109,7 +109,7 @@ f() {
109109
}
110110

111111
test_inSet_notDeferred() async {
112-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
112+
newFile('$testPackageLibPath/lib1.dart', content: r'''
113113
const bool c = true;''');
114114
await assertNoErrorsInCode(r'''
115115
import 'lib1.dart' as a;

pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ mixin NonConstantListElementFromDeferredLibraryTestCases
2323
@failingTest
2424
test_const_ifElement_thenTrue_deferredElse() async {
2525
// reports wrong error code (which is not crucial to fix)
26-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
26+
newFile('$testPackageLibPath/lib1.dart', content: r'''
2727
const int c = 1;''');
2828
await assertErrorsInCode(r'''
2929
import 'lib1.dart' deferred as a;
@@ -38,7 +38,7 @@ var v = const [ if (cond) 'a' else a.c ];
3838
}
3939

4040
test_const_ifElement_thenTrue_deferredThen() async {
41-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
41+
newFile('$testPackageLibPath/lib1.dart', content: r'''
4242
const int c = 1;''');
4343
await assertErrorsInCode(r'''
4444
import 'lib1.dart' deferred as a;
@@ -53,7 +53,7 @@ var v = const [ if (cond) a.c ];
5353
}
5454

5555
test_const_topLevel_deferred() async {
56-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
56+
newFile('$testPackageLibPath/lib1.dart', content: r'''
5757
const int c = 1;''');
5858
await assertErrorsInCode(r'''
5959
import 'lib1.dart' deferred as a;
@@ -67,7 +67,7 @@ var v = const [a.c];
6767
}
6868

6969
test_const_topLevel_deferred_nested() async {
70-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
70+
newFile('$testPackageLibPath/lib1.dart', content: r'''
7171
const int c = 1;''');
7272
await assertErrorsInCode(r'''
7373
import 'lib1.dart' deferred as a;

pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ mixin NonConstantMapKeyFromDeferredLibraryTestCases
2222
@failingTest
2323
test_const_ifElement_thenTrue_deferredElse() async {
2424
// reports wrong error code
25-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
25+
newFile('$testPackageLibPath/lib1.dart', content: r'''
2626
const int c = 1;''');
2727
await assertErrorsInCode(r'''
2828
import 'lib1.dart' deferred as a;
@@ -35,7 +35,7 @@ var v = const { if (cond) 0: 1 else a.c : 0};
3535
}
3636

3737
test_const_ifElement_thenTrue_deferredThen() async {
38-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
38+
newFile('$testPackageLibPath/lib1.dart', content: r'''
3939
const int c = 1;''');
4040
await assertErrorsInCode(r'''
4141
import 'lib1.dart' deferred as a;
@@ -48,7 +48,7 @@ var v = const { if (cond) a.c : 0};
4848
}
4949

5050
test_const_topLevel_deferred() async {
51-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
51+
newFile('$testPackageLibPath/lib1.dart', content: r'''
5252
const int c = 1;''');
5353
await assertErrorsInCode(r'''
5454
import 'lib1.dart' deferred as a;
@@ -60,7 +60,7 @@ var v = const {a.c : 0};
6060
}
6161

6262
test_const_topLevel_deferred_nested() async {
63-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
63+
newFile('$testPackageLibPath/lib1.dart', content: r'''
6464
const int c = 1;''');
6565
await assertErrorsInCode(r'''
6666
import 'lib1.dart' deferred as a;

pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ mixin NonConstantMapValueFromDeferredLibraryTestCases
2323
@failingTest
2424
test_const_ifElement_thenTrue_elseDeferred() async {
2525
// reports wrong error code
26-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
26+
newFile('$testPackageLibPath/lib1.dart', content: r'''
2727
const int c = 1;''');
2828
await assertErrorsInCode(r'''
2929
import 'lib1.dart' deferred as a;
@@ -36,7 +36,7 @@ var v = const { if (cond) 'a': 'b' else 'c' : a.c};
3636
}
3737

3838
test_const_ifElement_thenTrue_thenDeferred() async {
39-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
39+
newFile('$testPackageLibPath/lib1.dart', content: r'''
4040
const int c = 1;''');
4141
await assertErrorsInCode(r'''
4242
import 'lib1.dart' deferred as a;
@@ -49,7 +49,7 @@ var v = const { if (cond) 'a' : a.c};
4949
}
5050

5151
test_const_topLevel_deferred() async {
52-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
52+
newFile('$testPackageLibPath/lib1.dart', content: r'''
5353
const int c = 1;''');
5454
await assertErrorsInCode(r'''
5555
import 'lib1.dart' deferred as a;
@@ -61,7 +61,7 @@ var v = const {'a' : a.c};
6161
}
6262

6363
test_const_topLevel_deferred_nested() async {
64-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
64+
newFile('$testPackageLibPath/lib1.dart', content: r'''
6565
const int c = 1;''');
6666
await assertErrorsInCode(r'''
6767
import 'lib1.dart' deferred as a;

pkg/analyzer/test/src/diagnostics/set_element_from_deferred_library_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mixin SetElementFromDeferredLibraryTestCases on PubPackageResolutionTest {
2121
@failingTest
2222
test_const_ifElement_thenTrue_elseDeferred() async {
2323
// reports wrong error code
24-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
24+
newFile('$testPackageLibPath/lib1.dart', content: r'''
2525
const int c = 1;''');
2626
await assertErrorsInCode(r'''
2727
import 'lib1.dart' deferred as a;
@@ -33,7 +33,7 @@ var v = const {if (cond) null else a.c};
3333
}
3434

3535
test_const_ifElement_thenTrue_thenDeferred() async {
36-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
36+
newFile('$testPackageLibPath/lib1.dart', content: r'''
3737
const int c = 1;''');
3838
await assertErrorsInCode(r'''
3939
import 'lib1.dart' deferred as a;
@@ -45,7 +45,7 @@ var v = const {if (cond) a.c};
4545
}
4646

4747
test_const_topLevel_deferred() async {
48-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
48+
newFile('$testPackageLibPath/lib1.dart', content: r'''
4949
const int c = 1;''');
5050
await assertErrorsInCode(r'''
5151
import 'lib1.dart' deferred as a;
@@ -56,7 +56,7 @@ var v = const {a.c};
5656
}
5757

5858
test_const_topLevel_deferred_nested() async {
59-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
59+
newFile('$testPackageLibPath/lib1.dart', content: r'''
6060
const int c = 1;''');
6161
await assertErrorsInCode(r'''
6262
import 'lib1.dart' deferred as a;

pkg/analyzer/test/src/diagnostics/spread_expression_from_deferred_library_test.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SpreadExpressionFromDeferredLibraryTest extends PubPackageResolutionTest
1919

2020
mixin SpreadExpressionFromDeferredLibraryTestCases on PubPackageResolutionTest {
2121
test_inList_deferred() async {
22-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
22+
newFile('$testPackageLibPath/lib1.dart', content: r'''
2323
const List c = [];''');
2424
await assertErrorsInCode(r'''
2525
import 'lib1.dart' deferred as a;
@@ -32,7 +32,7 @@ f() {
3232
}
3333

3434
test_inList_deferred_notConst() async {
35-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
35+
newFile('$testPackageLibPath/lib1.dart', content: r'''
3636
const List c = [];''');
3737
await assertNoErrorsInCode(r'''
3838
import 'lib1.dart' deferred as a;
@@ -42,7 +42,7 @@ f() {
4242
}
4343

4444
test_inList_notDeferred() async {
45-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
45+
newFile('$testPackageLibPath/lib1.dart', content: r'''
4646
const List c = [];''');
4747
await assertNoErrorsInCode(r'''
4848
import 'lib1.dart' as a;
@@ -52,7 +52,7 @@ f() {
5252
}
5353

5454
test_inMap_deferred() async {
55-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
55+
newFile('$testPackageLibPath/lib1.dart', content: r'''
5656
const Map c = <int, int>{};''');
5757
await assertErrorsInCode(r'''
5858
import 'lib1.dart' deferred as a;
@@ -65,7 +65,7 @@ f() {
6565
}
6666

6767
test_inMap_notConst() async {
68-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
68+
newFile('$testPackageLibPath/lib1.dart', content: r'''
6969
const Map c = <int, int>{};''');
7070
await assertNoErrorsInCode(r'''
7171
import 'lib1.dart' deferred as a;
@@ -75,7 +75,7 @@ f() {
7575
}
7676

7777
test_inMap_notDeferred() async {
78-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
78+
newFile('$testPackageLibPath/lib1.dart', content: r'''
7979
const Map c = <int, int>{};''');
8080
await assertNoErrorsInCode(r'''
8181
import 'lib1.dart' as a;
@@ -85,7 +85,7 @@ f() {
8585
}
8686

8787
test_inSet_deferred() async {
88-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
88+
newFile('$testPackageLibPath/lib1.dart', content: r'''
8989
const Set c = <int>{};''');
9090
await assertErrorsInCode(r'''
9191
import 'lib1.dart' deferred as a;
@@ -98,7 +98,7 @@ f() {
9898
}
9999

100100
test_inSet_notConst() async {
101-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
101+
newFile('$testPackageLibPath/lib1.dart', content: r'''
102102
const Set c = <int>{};''');
103103
await assertNoErrorsInCode(r'''
104104
import 'lib1.dart' deferred as a;
@@ -108,7 +108,7 @@ f() {
108108
}
109109

110110
test_inSet_notDeferred() async {
111-
newFile(convertPath('$testPackageLibPath/lib1.dart'), content: r'''
111+
newFile('$testPackageLibPath/lib1.dart', content: r'''
112112
const Set c = <int>{};''');
113113
await assertNoErrorsInCode(r'''
114114
import 'lib1.dart' as a;

pkg/nnbd_migration/test/abstract_single_unit.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class AbstractSingleUnitTest extends AbstractContextTest {
6868
void setUp() {
6969
var testRoot = AbstractContextTest.testsPath;
7070
if (analyzeWithNnbd) {
71-
newFile(convertPath('$testRoot/analysis_options.yaml'), content: '''
71+
newFile('$testRoot/analysis_options.yaml', content: '''
7272
analyzer:
7373
enable-experiment:
7474
- non-nullable

0 commit comments

Comments
 (0)