Skip to content

Commit f8604b2

Browse files
committed
Add test
1 parent 07e7a26 commit f8604b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/model_test.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,6 +1849,8 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
18491849
prettyColorsConstant,
18501850
deprecated;
18511851

1852+
Field aStaticConstField;
1853+
18521854
setUp(() {
18531855
greenConstant =
18541856
exLibrary.constants.firstWhere((c) => c.name == 'COLOR_GREEN');
@@ -1859,6 +1861,13 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
18591861
cat = exLibrary.constants.firstWhere((c) => c.name == 'MY_CAT');
18601862
deprecated =
18611863
exLibrary.constants.firstWhere((c) => c.name == 'deprecated');
1864+
aStaticConstField =
1865+
exLibrary.allClasses.firstWhere((c) => c.name == 'Dog')
1866+
.allFields.firstWhere((f) => f.name == 'aStaticConstField');
1867+
});
1868+
1869+
test('constant field values are escaped', () {
1870+
expect(aStaticConstField.constantValue, '"A Constant Dog"');
18621871
});
18631872

18641873
test('has a fully qualified name', () {

0 commit comments

Comments
 (0)