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

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

Issue 747503002: Tests for matching constructors. (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 3557af751c8b4f7bb3f1555286ec121ae4a3c41c..5100f5f3166766a4f41b488ed46d7d5c82724c28 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -74,6 +74,64 @@ class B {}
''');
}
+ void test_false_constructor_parameters_list_add() {
+ _assertCompilationUnitMatches(false, r'''
+class A {
+ A();
+}
+''', r'''
+class A {
+ A(int p);
+}
+''');
+ }
+
+ void test_false_constructor_parameters_list_remove() {
+ _assertCompilationUnitMatches(false, r'''
+class A {
+ A(int p);
+}
+''', r'''
+class A {
+ A();
+}
+''');
+ }
+
+ void test_false_constructor_parameters_type_edit() {
+ _assertCompilationUnitMatches(false, r'''
+class A {
+ A(int p);
+}
+''', r'''
+class A {
+ A(String p);
+}
+''');
+ }
+
+ void test_false_constructor_unnamed_add_hadParameters() {
+ _assertCompilationUnitMatches(false, r'''
+class A {
+}
+''', r'''
+class A {
+ A(int p) {}
+}
+''');
+ }
+
+ void test_false_constructor_unnamed_remove_hadParameters() {
+ _assertCompilationUnitMatches(false, r'''
+class A {
+ A(int p) {}
+}
+''', r'''
+class A {
+}
+''');
+ }
+
void test_false_extendsClause_add() {
_assertCompilationUnitMatches(false, r'''
class A {}
@@ -272,6 +330,52 @@ class A<T> {}
''');
}
+ void test_true_constructor_named_same() {
+ _assertCompilationUnitMatches(true, r'''
+class A {
+ A.name(int p);
+}
+''', r'''
+class A {
+ A.name(int p);
+}
+''');
+ }
+
+ void test_true_constructor_unnamed_add_noParameters() {
+ _assertCompilationUnitMatches(true, r'''
+class A {
+}
+''', r'''
+class A {
+ A() {}
+}
+''');
+ }
+
+ void test_true_constructor_unnamed_remove_noParameters() {
+ _assertCompilationUnitMatches(true, r'''
+class A {
+ A() {}
+}
+''', r'''
+class A {
+}
+''');
+ }
+
+ void test_true_constructor_unnamed_same() {
+ _assertCompilationUnitMatches(true, r'''
+class A {
+ A(int p);
+}
+''', r'''
+class A {
+ A(int p);
+}
+''');
+ }
+
void test_true_extendsClause_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