Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3354)

Unified Diff: pkg/analyzer/test/src/summary/summary_test.dart

Issue 1526243002: Introduce code to resynthesize element models from summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/src/summary/summary_test.dart
diff --git a/pkg/analyzer/test/src/summary/summary_test.dart b/pkg/analyzer/test/src/summary/summary_test.dart
index 1ca1a7f3698ad025f0b0e55d1f2896538e85aa66..c20532b3593db54c1b585b58af2ad0fc151382cf 100644
--- a/pkg/analyzer/test/src/summary/summary_test.dart
+++ b/pkg/analyzer/test/src/summary/summary_test.dart
@@ -1437,21 +1437,31 @@ typedef F();
test_field() {
UnlinkedClass cls = serializeClassText('class C { int i; }');
- expect(findVariable('i', variables: cls.fields), isNotNull);
+ UnlinkedVariable variable = findVariable('i', variables: cls.fields);
+ expect(variable, isNotNull);
+ expect(variable.isConst, isFalse);
+ expect(variable.isStatic, isFalse);
+ expect(variable.isFinal, isFalse);
expect(findExecutable('i', executables: cls.executables), isNull);
expect(findExecutable('i=', executables: cls.executables), isNull);
}
+ test_field_const() {
+ UnlinkedVariable variable =
+ serializeClassText('class C { static const int i = 0; }').fields[0];
+ expect(variable.isConst, isTrue);
+ }
+
test_field_final() {
UnlinkedVariable variable =
serializeClassText('class C { final int i = 0; }').fields[0];
expect(variable.isFinal, isTrue);
}
- test_field_non_final() {
+ test_field_static() {
UnlinkedVariable variable =
- serializeClassText('class C { int i; }').fields[0];
- expect(variable.isFinal, isFalse);
+ serializeClassText('class C { static int i; }').fields[0];
+ expect(variable.isStatic, isTrue);
}
test_generic_method_in_generic_class() {

Powered by Google App Engine
This is Rietveld 408576698