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

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

Issue 1560433002: Test for changing method to/from getter/setter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 12 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 491fc9e744262057ee29458f9b9c05ebff55c9bd..a832ce8b16e9bca29efc0fc5c49759d6beca952e 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -25,7 +25,6 @@ import 'package:analyzer/task/dart.dart';
import 'package:unittest/unittest.dart';
import '../reflective_tests.dart';
-import 'parser_test.dart';
import 'resolver_test.dart';
import 'test_support.dart';
@@ -1547,6 +1546,34 @@ class A {
''');
}
+ void test_false_method_getKeyword_add() {
+ _assertDoesNotMatchOK(
+ r'''
+class A {
+ void foo() {}
+}
+''',
+ r'''
+class A {
+ void get foo() {}
Brian Wilkerson 2016/01/04 18:43:09 The parens are not valid on a getter (here and on
+}
+''');
+ }
+
+ void test_false_method_getKeyword_remove() {
+ _assertDoesNotMatchOK(
+ r'''
+class A {
+ void get foo() {}
+}
+''',
+ r'''
+class A {
+ void foo() {}
+}
+''');
+ }
+
void test_false_method_list_add() {
_assertDoesNotMatchOK(
r'''
@@ -1641,6 +1668,34 @@ class A {
''');
}
+ void test_false_method_setKeyword_add() {
+ _assertDoesNotMatchOK(
+ r'''
+class A {
+ void foo(x) {}
+}
+''',
+ r'''
+class A {
+ void set foo(x) {}
+}
+''');
+ }
+
+ void test_false_method_setKeyword_remove() {
+ _assertDoesNotMatchOK(
+ r'''
+class A {
+ void set foo(x) {}
+}
+''',
+ r'''
+class A {
+ void foo(x) {}
+}
+''');
+ }
+
void test_false_part_list_add() {
addNamedSource('/unitA.dart', 'part of lib; class A {}');
addNamedSource('/unitB.dart', 'part of lib; class B {}');
@@ -3003,7 +3058,7 @@ class B extends Object with A {}
LibraryElement library = resolve2(source);
CompilationUnit oldUnit = resolveCompilationUnit(source, library);
// parse
- CompilationUnit newUnit = ParserTestCase.parseCompilationUnit(newContent);
+ CompilationUnit newUnit = IncrementalResolverTest._parseUnit(newContent);
// build elements
{
ElementHolder holder = new ElementHolder();
« 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