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

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

Issue 847173002: Match some constructor-based annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 6f3f8484fd4604b7c86a2574f46539d19ba692a7..5a7994b6511d7421f217cb61d3b3b3241e7e36a4 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -70,7 +70,7 @@ class DeclarationMatcherTest extends ResolverTestCase {
test_resolveApiChanges = true;
}
- void test_false_class_annotation_edit() {
+ void test_false_class_annotation_accessor_edit() {
_assertDoesNotMatch(r'''
const my_annotationA = const Object();
const my_annotationB = const Object();
@@ -86,6 +86,30 @@ class A {
''');
}
+ void test_false_class_annotation_constructor_edit() {
+ _assertDoesNotMatch(r'''
+class MyAnnotationA {
+ const MyAnnotationA();
+}
+class MyAnnotationB {
+ const MyAnnotationB();
+}
+@MyAnnotationA()
+class A {
+}
+''', r'''
+class MyAnnotationA {
+ const MyAnnotationA();
+}
+class MyAnnotationB {
+ const MyAnnotationB();
+}
+@MyAnnotationB()
+class A {
+}
+''');
+ }
+
void test_false_class_annotations_add() {
_assertDoesNotMatch(r'''
const my_annotation = const Object();
@@ -1715,7 +1739,7 @@ import 'dart:async' show Stream, Future;
''');
}
- void test_true_method_annotations_same() {
+ void test_true_method_annotation_accessor_same() {
_assertMatches(r'''
const my_annotation = const Object();
class A {
@@ -1731,6 +1755,26 @@ class A {
''');
}
+ void test_true_method_annotation_constructor_same() {
+ _assertMatches(r'''
+class MyAnnotation {
+ const MyAnnotation();
+}
+class A {
+ @MyAnnotation()
+ void m() {}
+}
+''', r'''
+class MyAnnotation {
+ const MyAnnotation();
+}
+class A {
+ @MyAnnotation()
+ void m() {}
+}
+''');
+ }
+
void test_true_method_list_reorder() {
_assertMatches(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