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

Side by Side Diff: pkg/analysis_server/test/services/refactoring/extract_local_test.dart

Issue 701583003: Workaround for ConstantVisitor dependency issues. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.services.refactoring.extract_local; 5 library test.services.refactoring.extract_local;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart'; 9 import 'package:analysis_server/src/protocol.dart';
10 import 'package:analysis_server/src/services/refactoring/extract_local.dart'; 10 import 'package:analysis_server/src/services/refactoring/extract_local.dart';
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 return _assertSuccessfulRefactoring(''' 281 return _assertSuccessfulRefactoring('''
282 main() { 282 main() {
283 const res = 1; 283 const res = 1;
284 const [res + 2, 3]; 284 const [res + 2, 3];
285 } 285 }
286 '''); 286 ''');
287 } 287 }
288 288
289 test_const_inList_inConditionalExpression() { 289 test_const_inList_inConditionalExpression() {
290 indexTestUnit(''' 290 indexTestUnit('''
291 main(bool b) { 291 main() {
292 const [b ? 1 : 2, 3]; 292 const [true ? 1 : 2, 3];
293 } 293 }
294 '''); 294 ''');
295 _createRefactoringForString('1'); 295 _createRefactoringForString('1');
296 // apply refactoring 296 // apply refactoring
297 return _assertSuccessfulRefactoring(''' 297 return _assertSuccessfulRefactoring('''
298 main(bool b) { 298 main() {
299 const res = 1; 299 const res = 1;
300 const [b ? res : 2, 3]; 300 const [true ? res : 2, 3];
301 } 301 }
302 '''); 302 ''');
303 } 303 }
304 304
305 test_const_inList_inParenthesis() { 305 test_const_inList_inParenthesis() {
306 indexTestUnit(''' 306 indexTestUnit('''
307 main() { 307 main() {
308 const [(1), 2]; 308 const [(1), 2];
309 } 309 }
310 '''); 310 ''');
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 int length = search.length; 947 int length = search.length;
948 _createRefactoring(offset, length); 948 _createRefactoring(offset, length);
949 } 949 }
950 950
951 void _createRefactoringWithSuffix(String selectionSearch, String suffix) { 951 void _createRefactoringWithSuffix(String selectionSearch, String suffix) {
952 int offset = findOffset(selectionSearch + suffix); 952 int offset = findOffset(selectionSearch + suffix);
953 int length = selectionSearch.length; 953 int length = selectionSearch.length;
954 _createRefactoring(offset, length); 954 _createRefactoring(offset, length);
955 } 955 }
956 } 956 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698