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

Unified Diff: pkg/analyzer/test/generated/incremental_resolver_test.dart

Issue 759763003: Function type aliases matching. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3bf42533e73cbc5b47e1583941881e8e7b8bd5ba..8b8062a27514f362d92158c03d3f8560e11f1278 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -520,6 +520,107 @@ class T {
''');
}
+ void test_false_functionTypeAlias_list_add() {
+ _assertCompilationUnitMatches(false, r'''
+typedef A(int pa);
+typedef B(String pb);
+''', r'''
+typedef A(int pa);
+typedef B(String pb);
+typedef C(pc);
+''');
+ }
+
+ void test_false_functionTypeAlias_list_remove() {
+ _assertCompilationUnitMatches(false, r'''
+typedef A(int pa);
+typedef B(String pb);
+typedef C(pc);
+''', r'''
+typedef A(int pa);
+typedef B(String pb);
+''');
+ }
+
+ void test_false_functionTypeAlias_parameters_list_add() {
+ _assertCompilationUnitMatches(false, r'''
+typedef A(a);
+''', r'''
+typedef A(a, b);
+''');
+ }
+
+ void test_false_functionTypeAlias_parameters_list_remove() {
+ _assertCompilationUnitMatches(false, r'''
+typedef A(a, b);
+''', r'''
+typedef A(a);
+''');
+ }
+
+ void test_false_functionTypeAlias_parameters_type_edit() {
+ _assertCompilationUnitMatches(false, r'''
+typedef A(int p);
+''', r'''
+typedef A(String p);
+''');
+ }
+
+ void test_false_functionTypeAlias_returnType_edit() {
+ _assertCompilationUnitMatches(false, r'''
+typedef int A();
+''', r'''
+typedef String A();
+''');
+ }
+
+ void test_false_functionTypeAlias_typeParameters_bounds_add() {
+ _assertCompilationUnitMatches(false, r'''
+class A {}
+typedef F<T>();
+''', r'''
+class A {}
+typedef F<T extends A>();
+''');
+ }
+
+ void test_false_functionTypeAlias_typeParameters_bounds_edit() {
+ _assertCompilationUnitMatches(false, r'''
+class A {}
+class B {}
+typedef F<T extends A>();
+''', r'''
+class A {}
+typedef F<T extends B>();
+''');
+ }
+
+ void test_false_functionTypeAlias_typeParameters_bounds_remove() {
+ _assertCompilationUnitMatches(false, r'''
+class A {}
+typedef F<T extends A>();
+''', r'''
+class A {}
+typedef F<T>();
+''');
+ }
+
+ void test_false_functionTypeAlias_typeParameters_list_add() {
+ _assertCompilationUnitMatches(false, r'''
+typedef F<A>();
+''', r'''
+typedef F<A, B>();
+''');
+ }
+
+ void test_false_functionTypeAlias_typeParameters_list_remove() {
+ _assertCompilationUnitMatches(false, r'''
+typedef F<A, B>();
+''', r'''
+typedef F<A>();
+''');
+ }
+
void test_false_implementsClause_add() {
_assertCompilationUnitMatches(false, r'''
class A {}
@@ -1229,6 +1330,38 @@ class A {
''');
}
+ void test_true_functionTypeAlias_list_reorder() {
+ _assertCompilationUnitMatches(true, r'''
+typedef A(int pa);
+typedef B(String pb);
+typedef C(pc);
+''', r'''
+typedef C(pc);
+typedef A(int pa);
+typedef B(String pb);
+''');
+ }
+
+ void test_true_functionTypeAlias_list_same() {
+ _assertCompilationUnitMatches(true, r'''
+typedef String A(int pa);
+typedef int B(String pb);
+typedef C(pc);
+''', r'''
+typedef String A(int pa);
+typedef int B(String pb);
+typedef C(pc);
+''');
+ }
+
+ void test_true_functionTypeAlias_typeParameters_list_same() {
+ _assertCompilationUnitMatches(true, r'''
+typedef F<A, B, C>();
+''', r'''
+typedef F<A, B, C>();
+''');
+ }
+
void test_true_implementsClause_same() {
_assertCompilationUnitMatches(true, r'''
class A {}
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698