Chromium Code Reviews| Index: pkg/analyzer/test/generated/incremental_resolver_test.dart |
| diff --git a/pkg/analyzer/test/generated/incremental_resolver_test.dart b/pkg/analyzer/test/generated/incremental_resolver_test.dart |
| index 9bce2b0b625a467ad2d7f91fe3ac7cd2cfa2b4bf..8bd58df97e67d70f487ad9025d726eeaeaf986fa 100644 |
| --- a/pkg/analyzer/test/generated/incremental_resolver_test.dart |
| +++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart |
| @@ -266,6 +266,20 @@ class A { |
| '''); |
| } |
| + void test_false_defaultFieldFormalParameterElement_wasSimple() { |
| + _assertCompilationUnitMatches(false, r''' |
| +class A { |
| + int field; |
| + A(int field); |
| +} |
| +''', r''' |
| +class A { |
| + int field; |
| + A([this.field = 0]); |
| +} |
| +'''); |
| + } |
| + |
| void test_false_enum_constants_add() { |
| resetWithEnum(); |
| _assertCompilationUnitMatches(false, r''' |
| @@ -480,6 +494,20 @@ class T { |
| '''); |
| } |
| + void test_false_fieldFormalParameterElement_wasSimple() { |
| + _assertCompilationUnitMatches(false, r''' |
| +class A { |
| + int field; |
| + A(int field); |
| +} |
| +''', r''' |
| +class A { |
| + int field; |
| + A(this.field); |
| +} |
| +'''); |
| + } |
| + |
| void test_false_final_type_different() { |
| _assertCompilationUnitMatches(false, r''' |
| class T { |
| @@ -1024,6 +1052,20 @@ class A { |
| '''); |
| } |
| + void test_true_defaultFieldFormalParameterElement() { |
| + _assertCompilationUnitMatches(true, r''' |
| +class A { |
| + int field; |
| + A([this.field = 0]); |
| +} |
| +''', r''' |
| +class A { |
| + int field; |
| + A([this.field = 0]); |
| +} |
| +'''); |
| + } |
| + |
| void test_true_enum_constants_reorder() { |
| resetWithEnum(); |
| _assertCompilationUnitMatches(true, r''' |
| @@ -1161,6 +1203,20 @@ class T { |
| '''); |
| } |
| + void test_true_fieldFormalParameterElement() { |
| + _assertCompilationUnitMatches(true, r''' |
| +class A { |
| + int field; |
| + A(this.field); |
| +} |
| +''', r''' |
| +class A { |
| + int field; |
| + A(this.field); |
| +} |
| +'''); |
| + } |
| + |
| void test_true_implementsClause_same() { |
| _assertCompilationUnitMatches(true, r''' |
| class A {} |
| @@ -1391,6 +1447,34 @@ Map<int, String> A; |
| '''); |
| } |
| + void test_true_type_dynamic() { |
| + _assertCompilationUnitMatches(true, r''' |
| +dynamic a() {} |
| +''', r''' |
| +dynamic a() {} |
| +'''); |
| + } |
| + |
| + void test_true_type_noTypeArguments_implyAllDynamic() { |
|
Brian Wilkerson
2014/11/24 21:06:41
Perhaps test some false cases for types, such as
scheglov
2014/11/24 21:12:03
Thank you.
Added.
|
| + _assertCompilationUnitMatches(true, r''' |
| +class A<T> {} |
| +A main() { |
| +} |
| +''', r''' |
| +class A<T> {} |
| +A main() { |
| +} |
| +'''); |
| + } |
| + |
| + void test_true_type_void() { |
| + _assertCompilationUnitMatches(true, r''' |
| +void a() {} |
| +''', r''' |
| +void a() {} |
| +'''); |
| + } |
| + |
| void test_true_withClause_same() { |
| _assertCompilationUnitMatches(true, r''' |
| class A {} |
| @@ -1882,6 +1966,13 @@ main() { |
| } |
| } |
| + static void _assertEqualsToken(Token incrToken, Token fullToken) { |
| + expect(incrToken.type, fullToken.type); |
| + expect(incrToken.offset, fullToken.offset); |
| + expect(incrToken.length, fullToken.length); |
| + expect(incrToken.lexeme, fullToken.lexeme); |
| + } |
| + |
| static void _assertEqualsTokens(CompilationUnit incrUnit, |
| CompilationUnit fullUnit) { |
| Token incrToken = incrUnit.beginToken; |
| @@ -1894,13 +1985,6 @@ main() { |
| fullToken = fullToken.next; |
| } |
| } |
| - |
| - static void _assertEqualsToken(Token incrToken, Token fullToken) { |
| - expect(incrToken.type, fullToken.type); |
| - expect(incrToken.offset, fullToken.offset); |
| - expect(incrToken.length, fullToken.length); |
| - expect(incrToken.lexeme, fullToken.lexeme); |
| - } |
| } |