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 e201be05c8b4333791311acfcffa64d092e3ccad..97686e955b602e0bb7dfa7e6dd0960c11e8094bb 100644 |
| --- a/pkg/analyzer/test/generated/incremental_resolver_test.dart |
| +++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart |
| @@ -621,6 +621,56 @@ typedef F<A>(); |
| '''); |
| } |
| + void test_false_FunctionTypedFormalParameter_parameters_list_add() { |
| + _assertCompilationUnitMatches(false, r''' |
| +main(int callback(int a)) { |
| +} |
| +''', r''' |
| +main(int callback(int a, String b)) { |
| +} |
| +'''); |
| + } |
| + |
| + void test_false_FunctionTypedFormalParameter_parameters_list_remove() { |
| + _assertCompilationUnitMatches(false, r''' |
| +main(int callback(int a, String b)) { |
| +} |
| +''', r''' |
| +main(int callback(int a)) { |
| +} |
| +'''); |
| + } |
| + |
| + void test_false_FunctionTypedFormalParameter_parameterType() { |
| + _assertCompilationUnitMatches(false, r''' |
| +main(int callback(int p)) { |
| +} |
| +''', r''' |
| +main(int callback(String p)) { |
| +} |
| +'''); |
| + } |
| + |
| + void test_false_FunctionTypedFormalParameter_returnType() { |
| + _assertCompilationUnitMatches(false, r''' |
| +main(int callback()) { |
| +} |
| +''', r''' |
| +main(String callback()) { |
| +} |
| +'''); |
| + } |
| + |
| + void test_false_FunctionTypedFormalParameter_wasSimple() { |
| + _assertCompilationUnitMatches(false, r''' |
| +main(int callback) { |
| +} |
| +''', r''' |
| +main(int callback(int a, String b)) { |
| +} |
| +'''); |
| + } |
| + |
| void test_false_implementsClause_add() { |
| _assertCompilationUnitMatches(false, r''' |
| class A {} |
| @@ -795,6 +845,56 @@ part 'unitA.dart'; |
| '''); |
| } |
| + void test_false_SimpleFormalParameter_named_differentName() { |
|
Brian Wilkerson
2014/11/26 20:45:31
Add tests for adding and removing default values f
scheglov
2014/11/26 20:46:53
Done.
|
| + _assertCompilationUnitMatches(false, r''' |
| +main({int oldName}) { |
| +} |
| +''', r''' |
| +main({int newName}) { |
| +} |
| +'''); |
| + } |
| + |
| + void test_false_SimpleFormalParameter_namedDefault_differentValue() { |
| + _assertCompilationUnitMatches(false, r''' |
| +main({int p: 1}) { |
| +} |
| +''', r''' |
| +main({int p: 2}) { |
| +} |
| +'''); |
| + } |
| + |
| + void test_false_SimpleFormalParameter_optionalDefault_addValue() { |
| + _assertCompilationUnitMatches(false, r''' |
| +main([int p]) { |
| +} |
| +''', r''' |
| +main([int p = 2]) { |
| +} |
| +'''); |
| + } |
| + |
| + void test_false_SimpleFormalParameter_optionalDefault_differentValue() { |
| + _assertCompilationUnitMatches(false, r''' |
| +main([int p = 1]) { |
| +} |
| +''', r''' |
| +main([int p = 2]) { |
| +} |
| +'''); |
| + } |
| + |
| + void test_false_SimpleFormalParameter_optionalDefault_removeValue() { |
| + _assertCompilationUnitMatches(false, r''' |
| +main([int p = 1]) { |
| +} |
| +''', r''' |
| +main([int p]) { |
| +} |
| +'''); |
| + } |
| + |
| void test_false_topLevelAccessor_list_add() { |
| _assertCompilationUnitMatches(false, r''' |
| get a => 1; |
| @@ -1336,7 +1436,7 @@ class T { |
| '''); |
| } |
| - void test_true_fieldFormalParameterElement() { |
| + void test_true_fieldFormalParameter() { |
| _assertCompilationUnitMatches(true, r''' |
| class A { |
| int field; |
| @@ -1382,6 +1482,16 @@ typedef F<A, B, C>(); |
| '''); |
| } |
| + void test_true_FunctionTypedFormalParameter() { |
| + _assertCompilationUnitMatches(true, r''' |
| +main(int callback(int a, String b)) { |
| +} |
| +''', r''' |
| +main(int callback(int a, String b)) { |
| +} |
| +'''); |
| + } |
| + |
| void test_true_implementsClause_same() { |
| _assertCompilationUnitMatches(true, r''' |
| class A {} |
| @@ -1532,6 +1642,36 @@ part 'unitB.dart'; |
| '''); |
| } |
| + void test_true_SimpleFormalParameter_optional_differentName() { |
| + _assertCompilationUnitMatches(true, r''' |
| +main([int oldName]) { |
| +} |
| +''', r''' |
| +main([int newName]) { |
| +} |
| +'''); |
| + } |
| + |
| + void test_true_SimpleFormalParameter_optionalDefault_differentName() { |
| + _assertCompilationUnitMatches(true, r''' |
| +main([int oldName = 1]) { |
| +} |
| +''', r''' |
| +main([int newName = 1]) { |
| +} |
| +'''); |
| + } |
| + |
| + void test_true_SimpleFormalParameter_required_differentName() { |
| + _assertCompilationUnitMatches(true, r''' |
| +main(int oldName) { |
| +} |
| +''', r''' |
| +main(int newName) { |
| +} |
| +'''); |
| + } |
| + |
| void test_true_topLevelAccessor_list_reorder() { |
| _assertCompilationUnitMatches(true, r''' |
| set a(x) {} |