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

Side by Side Diff: pkg/analysis_server/test/services/completion/statement/statement_completion_test.dart

Issue 2864813002: Switch the default from non-driver to driver in several tests (Closed)
Patch Set: Created 3 years, 7 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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.completion.statement; 5 library test.services.completion.statement;
6 6
7 import 'package:analysis_server/src/protocol_server.dart'; 7 import 'package:analysis_server/src/protocol_server.dart';
8 import 'package:analysis_server/src/services/completion/statement/statement_comp letion.dart'; 8 import 'package:analysis_server/src/services/completion/statement/statement_comp letion.dart';
9 import 'package:analyzer/src/dart/analysis/driver.dart'; 9 import 'package:analyzer/src/dart/analysis/driver.dart';
10 import 'package:test/test.dart'; 10 import 'package:test/test.dart';
(...skipping 12 matching lines...) Expand all
23 defineReflectiveTests(_SimpleCompletionTest); 23 defineReflectiveTests(_SimpleCompletionTest);
24 defineReflectiveTests(_SwitchCompletionTest); 24 defineReflectiveTests(_SwitchCompletionTest);
25 defineReflectiveTests(_TryCompletionTest); 25 defineReflectiveTests(_TryCompletionTest);
26 defineReflectiveTests(_WhileCompletionTest); 26 defineReflectiveTests(_WhileCompletionTest);
27 }); 27 });
28 } 28 }
29 29
30 class StatementCompletionTest extends AbstractSingleUnitTest { 30 class StatementCompletionTest extends AbstractSingleUnitTest {
31 SourceChange change; 31 SourceChange change;
32 32
33 bool get enableNewAnalysisDriver => true;
34
35 int _after(String source, String match) => 33 int _after(String source, String match) =>
36 source.indexOf(match) + match.length; 34 source.indexOf(match) + match.length;
37 35
38 int _afterLast(String source, String match) => 36 int _afterLast(String source, String match) =>
39 source.lastIndexOf(match) + match.length; 37 source.lastIndexOf(match) + match.length;
40 38
41 void _assertHasChange(String message, String expectedCode, [Function cmp]) { 39 void _assertHasChange(String message, String expectedCode, [Function cmp]) {
42 if (change.message == message) { 40 if (change.message == message) {
43 if (!change.edits.isEmpty) { 41 if (!change.edits.isEmpty) {
44 String resultCode = 42 String resultCode =
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 ''' 1465 '''
1468 main() { 1466 main() {
1469 while () { 1467 while () {
1470 //// 1468 ////
1471 } 1469 }
1472 } 1470 }
1473 ''', 1471 ''',
1474 (s) => _after(s, 'while (')); 1472 (s) => _after(s, 'while ('));
1475 } 1473 }
1476 } 1474 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698