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

Unified Diff: pkg/analysis_server/test/services/refactoring/inline_method_test.dart

Issue 2619053002: Run 'Inline Method' refactoring tests with the new analysis driver. (Closed)
Patch Set: Created 3 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/analysis_server/lib/src/services/refactoring/inline_method.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/refactoring/inline_method_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
index ee14c780241f430ad264c610d732ef29c8664aa6..19fead0bb44ad6d2ad69a522d1967dc1152072aa 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
@@ -19,6 +19,7 @@ import 'abstract_refactoring.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(InlineMethodTest);
+ defineReflectiveTests(InlineMethodTest_Driver);
});
}
@@ -788,8 +789,8 @@ class A {
import 'dart:async';
class A {
Future<int> get test async => 42;
- Stream<int> foo() async {
- return await test;
+ Stream<int> foo() async* {
+ yield await test;
}
}
''');
@@ -798,8 +799,8 @@ class A {
return _assertSuccessfulRefactoring(r'''
import 'dart:async';
class A {
- Stream<int> foo() async {
- return await 42;
+ Stream<int> foo() async* {
+ yield await 42;
}
}
''');
@@ -973,9 +974,10 @@ class A {
await indexTestUnit(r'''
import 'dart:async';
class A {
- Future<int> test() async => 42;
- Future foo() {
- return [test(), test()];
+ Future<int> foo() async => 42;
+ Future<int> test() async => await foo();
+ Future bar() {
+ return new Future.value([test(), test()]);
}
}
''');
@@ -984,8 +986,9 @@ class A {
return _assertSuccessfulRefactoring(r'''
import 'dart:async';
class A {
- Future foo() async {
- return [42, 42];
+ Future<int> foo() async => 42;
+ Future bar() async {
+ return new Future.value([(await foo()), (await foo())]);
}
}
''');
@@ -1051,7 +1054,6 @@ class A {
class B extends A {
static var FB = 2;
test() {
- print(FA);
print(FB);
print(A.FA);
print(B.FB);
@@ -1073,7 +1075,6 @@ class B extends A {
}
main() {
B b = new B();
- print(A.FA);
print(B.FB);
print(A.FA);
print(B.FB);
@@ -1716,3 +1717,9 @@ main(bool p, bool p2, bool p3) {
searchEngine, getResolvedUnitWithElement, testUnit, offset);
}
}
+
+@reflectiveTest
+class InlineMethodTest_Driver extends InlineMethodTest {
+ @override
+ bool get enableNewAnalysisDriver => true;
+}
« no previous file with comments | « pkg/analysis_server/lib/src/services/refactoring/inline_method.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698