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

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

Issue 569723004: Issue 19801. Fix for inlining referenced function with an expression body. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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/test/services/correction/strings_test.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 c41a5455f53dacf476f7b60dc27c60b59b8be6f6..1236fb2aaa983dccbfde95d9608a66374f8e11bc 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
@@ -999,6 +999,22 @@ main() {
''');
}
+ test_reference_expressionBody() {
+ indexTestUnit(r'''
+String message() => 'Hello, World!';
+main() {
+ print(message);
+}
+''');
+ _createRefactoring('message()');
+ // validate change
+ return _assertSuccessfulRefactoring(r'''
+main() {
+ print(() => 'Hello, World!');
+}
+''');
+ }
+
test_singleExpression_oneUsage() {
indexTestUnit(r'''
test(a, b) {
« no previous file with comments | « pkg/analysis_server/test/services/correction/strings_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698