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

Side by Side Diff: pkg/analysis_server/test/integration/analysis/occurrences_test.dart

Issue 2564863003: Get all integration tests running with the new driver (Closed)
Patch Set: Created 4 years 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.integration.analysis.occurrences;
6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 5 import 'package:analysis_server/plugin/protocol/protocol.dart';
8 import 'package:test/test.dart'; 6 import 'package:test/test.dart';
9 import 'package:test_reflective_loader/test_reflective_loader.dart'; 7 import 'package:test_reflective_loader/test_reflective_loader.dart';
10 8
11 import '../integration_tests.dart'; 9 import '../integration_tests.dart';
12 10
13 main() { 11 main() {
14 defineReflectiveSuite(() { 12 defineReflectiveSuite(() {
15 defineReflectiveTests(Test); 13 defineReflectiveTests(OccurrencesTest);
14 defineReflectiveTests(OccurrencesTest_Driver);
16 }); 15 });
17 } 16 }
18 17
19 @reflectiveTest 18 class AbstractOccurrencesTest extends AbstractAnalysisServerIntegrationTest {
20 class Test extends AbstractAnalysisServerIntegrationTest {
21 test_occurrences() { 19 test_occurrences() {
22 String pathname = sourcePath('test.dart'); 20 String pathname = sourcePath('test.dart');
23 String text = r''' 21 String text = r'''
24 main() { 22 main() {
25 int sum = 0; 23 int sum = 0;
26 for (int i = 0; i < 10; i++) { 24 for (int i = 0; i < 10; i++) {
27 for (int j = 0; j < i; j++) { 25 for (int j = 0; j < i; j++) {
28 sum += j; 26 sum += j;
29 } 27 }
30 } 28 }
(...skipping 29 matching lines...) Expand all
60 Set<int> foundOffsets = findOffsets(elementName); 58 Set<int> foundOffsets = findOffsets(elementName);
61 expect(foundOffsets, equals(expectedOffsets)); 59 expect(foundOffsets, equals(expectedOffsets));
62 } 60 }
63 61
64 check('i', ['i = 0', 'i < 10', 'i++', 'i;']); 62 check('i', ['i = 0', 'i < 10', 'i++', 'i;']);
65 check('j', ['j = 0', 'j < i', 'j++', 'j;']); 63 check('j', ['j = 0', 'j < i', 'j++', 'j;']);
66 check('sum', ['sum = 0', 'sum +=', 'sum)']); 64 check('sum', ['sum = 0', 'sum +=', 'sum)']);
67 }); 65 });
68 } 66 }
69 } 67 }
68
69 @reflectiveTest
70 class OccurrencesTest extends AbstractOccurrencesTest {}
71
72 @reflectiveTest
73 class OccurrencesTest_Driver extends AbstractOccurrencesTest {
74 @override
75 bool get enableNewAnalysisDriver => true;
76
77 @failingTest
78 test_occurrences() {
79 // NoSuchMethodError: The getter 'iterator' was called on null.
80 return super.test_occurrences();
81 }
82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698