@@ -34,6 +34,7 @@ void _checkConsts() {
3434 print ('Checking for expected constants.' );
3535 final ConstFinder finder = ConstFinder (
3636 kernelFilePath: constsDill,
37+ targetLibraryUri: 'package:const_finder_fixtures/consts.dart' ,
3738 classLibraryUri: 'package:const_finder_fixtures/target.dart' ,
3839 className: 'Target' ,
3940 );
@@ -42,15 +43,8 @@ void _checkConsts() {
4243 jsonEncode (finder.findInstances ()),
4344 jsonEncode (< String , dynamic > {
4445 'constantInstances' : < Map <String , dynamic >> [
45- < String , dynamic > {'stringValue' : '1' , 'intValue' : 1 , 'targetValue' : null },
46- < String , dynamic > {'stringValue' : '4' , 'intValue' : 4 , 'targetValue' : null },
47- < String , dynamic > {'stringValue' : '2' , 'intValue' : 2 },
48- < String , dynamic > {'stringValue' : '6' , 'intValue' : 6 , 'targetValue' : null },
49- < String , dynamic > {'stringValue' : '8' , 'intValue' : 8 , 'targetValue' : null },
50- < String , dynamic > {'stringValue' : '10' , 'intValue' : 10 , 'targetValue' : null },
51- < String , dynamic > {'stringValue' : '9' , 'intValue' : 9 },
52- < String , dynamic > {'stringValue' : '7' , 'intValue' : 7 , 'targetValue' : null },
53- < String , dynamic > {'stringValue' : 'package' , 'intValue' : - 1 , 'targetValue' : null },
46+ < String , dynamic > {'stringValue' : '1' , 'intValue' : 1 },
47+ < String , dynamic > {'stringValue' : '2' , 'intValue' : 2 }
5448 ],
5549 'nonConstantLocations' : < dynamic > [],
5650 }),
@@ -61,6 +55,7 @@ void _checkNonConsts() {
6155 print ('Checking for non-constant instances.' );
6256 final ConstFinder finder = ConstFinder (
6357 kernelFilePath: constsAndNonDill,
58+ targetLibraryUri: 'package:const_finder_fixtures/consts_and_non.dart' ,
6459 classLibraryUri: 'package:const_finder_fixtures/target.dart' ,
6560 className: 'Target' ,
6661 );
@@ -69,34 +64,19 @@ void _checkNonConsts() {
6964 jsonEncode (finder.findInstances ()),
7065 jsonEncode (< String , dynamic > {
7166 'constantInstances' : < dynamic > [
72- < String , dynamic > {'stringValue' : '1' , 'intValue' : 1 , 'targetValue' : null },
73- < String , dynamic > {'stringValue' : '6' , 'intValue' : 6 , 'targetValue' : null },
74- < String , dynamic > {'stringValue' : '8' , 'intValue' : 8 , 'targetValue' : null },
75- < String , dynamic > {'stringValue' : '10' , 'intValue' : 10 , 'targetValue' : null },
76- < String , dynamic > {'stringValue' : '9' , 'intValue' : 9 },
77- < String , dynamic > {'stringValue' : '7' , 'intValue' : 7 , 'targetValue' : null },
67+ < String , dynamic > {'stringValue' : '1' , 'intValue' : 1 }
7868 ],
7969 'nonConstantLocations' : < dynamic > [
8070 < String , dynamic > {
8171 'file' : 'file://$fixtures /lib/consts_and_non.dart' ,
82- 'line' : 14 ,
83- 'column' : 26 ,
84- },
85- < String , dynamic > {
86- 'file' : 'file://$fixtures /lib/consts_and_non.dart' ,
87- 'line' : 17 ,
88- 'column' : 26 ,
72+ 'line' : 12 ,
73+ 'column' : 26
8974 },
9075 < String , dynamic > {
9176 'file' : 'file://$fixtures /lib/consts_and_non.dart' ,
92- 'line' : 19 ,
93- 'column' : 26 ,
77+ 'line' : 14 ,
78+ 'column' : 26
9479 },
95- < String , dynamic > {
96- 'file' : 'file://$fixtures /pkg/package.dart' ,
97- 'line' : 10 ,
98- 'column' : 25 ,
99- }
10080 ]
10181 }),
10282 );
0 commit comments