@@ -718,7 +718,7 @@ void main() {
718
718
});
719
719
720
720
test ('correctly finds all the classes' , () {
721
- expect (classes, hasLength (26 ));
721
+ expect (classes, hasLength (28 ));
722
722
});
723
723
724
724
test ('abstract' , () {
@@ -1849,7 +1849,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
1849
1849
prettyColorsConstant,
1850
1850
deprecated;
1851
1851
1852
- Field aStaticConstField;
1852
+ Field aStaticConstField, aName ;
1853
1853
1854
1854
setUp (() {
1855
1855
greenConstant =
@@ -1861,9 +1861,16 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
1861
1861
cat = exLibrary.constants.firstWhere ((c) => c.name == 'MY_CAT' );
1862
1862
deprecated =
1863
1863
exLibrary.constants.firstWhere ((c) => c.name == 'deprecated' );
1864
+ Class Dog = exLibrary.allClasses.firstWhere ((c) => c.name == 'Dog' );
1864
1865
aStaticConstField =
1865
- exLibrary.allClasses.firstWhere ((c) => c.name == 'Dog' )
1866
- .allFields.firstWhere ((f) => f.name == 'aStaticConstField' );
1866
+ Dog .allFields.firstWhere ((f) => f.name == 'aStaticConstField' );
1867
+ aName =
1868
+ Dog .allFields.firstWhere ((f) => f.name == 'aName' );
1869
+ });
1870
+
1871
+ test ('substrings of the constant values type are not linked (#1535)' , () {
1872
+ expect (aName.constantValue,
1873
+ 'const ExtendedShortName("hello there")' );
1867
1874
});
1868
1875
1869
1876
test ('constant field values are escaped' , () {
0 commit comments