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

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

Issue 1053813002: Issue 23068. Constructors should have the same const/factory modifiers to match. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months 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 40dfb9c350eef21202064d2cb9eeb05540bdc9e6..d880c28f7200e9142f372d9b24f8c124eb8f884d 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -305,6 +305,66 @@ class B<T> = Object with M<T>;
''');
}
+ void test_false_constructor_keywordConst_add() {
+ _assertDoesNotMatch(r'''
+class A {
+ A();
+}
+''', r'''
+class A {
+ const A();
+}
+''');
+ }
+
+ void test_false_constructor_keywordConst_remove() {
+ _assertDoesNotMatch(r'''
+class A {
+ const A();
+}
+''', r'''
+class A {
+ A();
+}
+''');
+ }
+
+ void test_false_constructor_keywordFactory_add() {
+ _assertDoesNotMatch(r'''
+class A {
+ A();
+ A.foo() {
+ return new A();
+ }
+}
+''', r'''
+class A {
+ A();
+ factory A.foo() {
+ return new A();
+ }
+}
+''');
+ }
+
+ void test_false_constructor_keywordFactory_remove() {
+ _assertDoesNotMatch(r'''
+class A {
+ A();
+ factory A.foo() {
+ return new A();
+ }
+}
+''', r'''
+class A {
+ A();
+ A.foo() {
+ return new A();
+ }
+}
+''');
+ }
+
void test_false_constructor_parameters_list_add() {
_assertDoesNotMatch(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