| OLD | NEW |
| 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 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 5 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 6 import 'package:test/test.dart'; | 6 import 'package:test/test.dart'; |
| 7 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 7 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 8 | 8 |
| 9 import '../integration_tests.dart'; | 9 import '../integration_tests.dart'; |
| 10 | 10 |
| 11 main() { | 11 main() { |
| 12 defineReflectiveSuite(() { | 12 defineReflectiveSuite(() { |
| 13 defineReflectiveTests(AnalysisErrorIntegrationTest); | 13 defineReflectiveTests(AnalysisErrorIntegrationTest); |
| 14 defineReflectiveTests(AnalysisErrorIntegrationTest_Driver); | |
| 15 }); | 14 }); |
| 16 } | 15 } |
| 17 | 16 |
| 18 class AbstractAnalysisErrorIntegrationTest | 17 class AbstractAnalysisErrorIntegrationTest |
| 19 extends AbstractAnalysisServerIntegrationTest { | 18 extends AbstractAnalysisServerIntegrationTest { |
| 20 test_detect_simple_error() { | 19 test_detect_simple_error() { |
| 21 String pathname = sourcePath('test.dart'); | 20 String pathname = sourcePath('test.dart'); |
| 22 writeFile( | 21 writeFile( |
| 23 pathname, | 22 pathname, |
| 24 ''' | 23 ''' |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 await analysisFinished; | 90 await analysisFinished; |
| 92 expect(currentAnalysisErrors[pathname], isList); | 91 expect(currentAnalysisErrors[pathname], isList); |
| 93 List<AnalysisError> errors = currentAnalysisErrors[pathname]; | 92 List<AnalysisError> errors = currentAnalysisErrors[pathname]; |
| 94 expect(errors, isEmpty); | 93 expect(errors, isEmpty); |
| 95 } | 94 } |
| 96 } | 95 } |
| 97 | 96 |
| 98 @reflectiveTest | 97 @reflectiveTest |
| 99 class AnalysisErrorIntegrationTest | 98 class AnalysisErrorIntegrationTest |
| 100 extends AbstractAnalysisErrorIntegrationTest {} | 99 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 } | |
| OLD | NEW |