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

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

Issue 561373002: Issue 19682. New analyzer snapshot that fixes an inline refactoring problem. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changes for mock_sdk 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/mock_sdk.dart ('k') | pkg/analyzer/lib/src/generated/ast.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/refactoring/inline_local_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
index 336bd66baa0e4eb4f53fadfdbbfab1ac69a8d2ae..7af239514772d3b5da51587169b7d246c7e4e4df 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
@@ -164,6 +164,40 @@ main() {
''');
}
+ test_OK_parenthesis_instanceCreation_intoList() {
+ indexTestUnit('''
+class A {}
+main() {
+ var test = new A();
+ var list = [test];
+}
+''');
+ _createRefactoring('test =');
+ // validate change
+ return assertSuccessfulRefactoring('''
+class A {}
+main() {
+ var list = [new A()];
+}
+''');
+ }
+
+ test_OK_parenthesis_plus_intoMultiply() {
+ indexTestUnit('''
+main() {
+ var test = 1 + 2;
+ print(test * 3);
+}
+''');
+ _createRefactoring('test =');
+ // validate change
+ return assertSuccessfulRefactoring('''
+main() {
+ print((1 + 2) * 3);
+}
+''');
+ }
+
test_OK_twoUsages() {
indexTestUnit('''
main() {
« no previous file with comments | « pkg/analysis_server/test/mock_sdk.dart ('k') | pkg/analyzer/lib/src/generated/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698