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

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

Issue 2394683006: Switch analysis_server to use 'package:test'. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
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; 5 library test.services.refactoring;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/services/correction/status.dart'; 10 import 'package:analysis_server/src/services/correction/status.dart';
11 import 'package:analysis_server/src/services/index/index.dart'; 11 import 'package:analysis_server/src/services/index/index.dart';
12 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; 12 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
13 import 'package:analysis_server/src/services/search/search_engine_internal.dart' ; 13 import 'package:analysis_server/src/services/search/search_engine_internal.dart' ;
14 import 'package:analyzer/dart/ast/ast.dart'; 14 import 'package:analyzer/dart/ast/ast.dart';
15 import 'package:analyzer/file_system/file_system.dart'; 15 import 'package:analyzer/file_system/file_system.dart';
16 import 'package:analyzer/src/generated/source.dart'; 16 import 'package:analyzer/src/generated/source.dart';
17 import 'package:unittest/unittest.dart'; 17 import 'package:test/test.dart';
18 18
19 import '../../abstract_single_unit.dart'; 19 import '../../abstract_single_unit.dart';
20 20
21 int findIdentifierLength(String search) { 21 int findIdentifierLength(String search) {
22 int length = 0; 22 int length = 0;
23 while (length < search.length) { 23 while (length < search.length) {
24 int c = search.codeUnitAt(length); 24 int c = search.codeUnitAt(length);
25 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) || 25 if (!(c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0) ||
26 c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) || 26 c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0) ||
27 c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0))) { 27 c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0))) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 CompilationUnit unit = resolveLibraryUnit(source); 155 CompilationUnit unit = resolveLibraryUnit(source);
156 index.indexUnit(unit); 156 index.indexUnit(unit);
157 } 157 }
158 158
159 void setUp() { 159 void setUp() {
160 super.setUp(); 160 super.setUp();
161 index = createMemoryIndex(); 161 index = createMemoryIndex();
162 searchEngine = new SearchEngineImpl(index); 162 searchEngine = new SearchEngineImpl(index);
163 } 163 }
164 } 164 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698