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

Side by Side Diff: pkg/analysis_server/test/integration/analysis/error_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.error;
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(AnalysisErrorIntegrationTest); 13 defineReflectiveTests(AnalysisErrorIntegrationTest);
14 defineReflectiveTests(AnalysisErrorIntegrationTest_Driver);
16 }); 15 });
17 } 16 }
18 17
19 @reflectiveTest 18 class AbstractAnalysisErrorIntegrationTest
20 class AnalysisErrorIntegrationTest
21 extends AbstractAnalysisServerIntegrationTest { 19 extends AbstractAnalysisServerIntegrationTest {
22 test_detect_simple_error() { 20 test_detect_simple_error() {
23 String pathname = sourcePath('test.dart'); 21 String pathname = sourcePath('test.dart');
24 writeFile( 22 writeFile(
25 pathname, 23 pathname,
26 ''' 24 '''
27 main() { 25 main() {
28 print(null) // parse error: missing ';' 26 print(null) // parse error: missing ';'
29 }'''); 27 }''');
30 standardAnalysisSetup(); 28 standardAnalysisSetup();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 '''); 87 ''');
90 await sendAnalysisUpdateOptions( 88 await sendAnalysisUpdateOptions(
91 new AnalysisOptions()..enableSuperMixins = true); 89 new AnalysisOptions()..enableSuperMixins = true);
92 standardAnalysisSetup(); 90 standardAnalysisSetup();
93 await analysisFinished; 91 await analysisFinished;
94 expect(currentAnalysisErrors[pathname], isList); 92 expect(currentAnalysisErrors[pathname], isList);
95 List<AnalysisError> errors = currentAnalysisErrors[pathname]; 93 List<AnalysisError> errors = currentAnalysisErrors[pathname];
96 expect(errors, isEmpty); 94 expect(errors, isEmpty);
97 } 95 }
98 } 96 }
97
98 @reflectiveTest
99 class AnalysisErrorIntegrationTest
100 extends AbstractAnalysisErrorIntegrationTest {}
101
102 @reflectiveTest
103 class AnalysisErrorIntegrationTest_Driver
104 extends AbstractAnalysisErrorIntegrationTest {
105 @override
106 bool get enableNewAnalysisDriver => true;
107
108 @failingTest
109 test_super_mixins_enabled() async {
110 // Expected: empty
111 // Actual: [
112 // AnalysisError:{"severity":"ERROR","type":"COMPILE_TIME_ERROR","locatio n":{"file":"/var/folders/00/0w95r000h01000cxqpysvccm003j4q/T/analysisServerfbuOQ b/test.dart","offset":31,"length":1,"startLine":1,"startColumn":32},"message":"T he class 'C' can't be used as a mixin because it extends a class other than Obje ct.","correction":"","code":"mixin_inherits_from_not_object","hasFix":false},
113 // AnalysisError:{"severity":"ERROR","type":"COMPILE_TIME_ERROR","locatio n":{"file":"/var/folders/00/0w95r000h01000cxqpysvccm003j4q/T/analysisServerfbuOQ b/test.dart","offset":31,"length":1,"startLine":1,"startColumn":32},"message":"T he class 'C' can't be used as a mixin because it references 'super'.","correctio n":"","code":"mixin_references_super","hasFix":false}
114 // ]
115 return super.test_super_mixins_enabled();
116 }
117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698