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 library test.integration.analysis.error; | 5 library test.integration.analysis.error; |
6 | 6 |
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 7 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
8 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 8 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 test_super_mixins_disabled() async { | 39 test_super_mixins_disabled() async { |
40 String pathname = sourcePath('test.dart'); | 40 String pathname = sourcePath('test.dart'); |
41 writeFile( | 41 writeFile( |
42 pathname, | 42 pathname, |
43 ''' | 43 ''' |
44 class Test extends Object with C { | 44 class Test extends Object with C { |
45 void foo() {} | 45 void foo() {} |
46 } | 46 } |
47 abstract class B { | 47 abstract class B { |
48 void foo(); | 48 void foo() {} |
49 } | 49 } |
50 abstract class C extends B { | 50 abstract class C extends B { |
51 void bar() { | 51 void bar() { |
52 super.foo(); | 52 super.foo(); |
53 } | 53 } |
54 } | 54 } |
55 '''); | 55 '''); |
56 standardAnalysisSetup(); | 56 standardAnalysisSetup(); |
57 await analysisFinished; | 57 await analysisFinished; |
58 expect(currentAnalysisErrors[pathname], isList); | 58 expect(currentAnalysisErrors[pathname], isList); |
(...skipping 13 matching lines...) Expand all Loading... |
72 | 72 |
73 test_super_mixins_enabled() async { | 73 test_super_mixins_enabled() async { |
74 String pathname = sourcePath('test.dart'); | 74 String pathname = sourcePath('test.dart'); |
75 writeFile( | 75 writeFile( |
76 pathname, | 76 pathname, |
77 ''' | 77 ''' |
78 class Test extends Object with C { | 78 class Test extends Object with C { |
79 void foo() {} | 79 void foo() {} |
80 } | 80 } |
81 abstract class B { | 81 abstract class B { |
82 void foo(); | 82 void foo() {} |
83 } | 83 } |
84 abstract class C extends B { | 84 abstract class C extends B { |
85 void bar() { | 85 void bar() { |
86 super.foo(); | 86 super.foo(); |
87 } | 87 } |
88 } | 88 } |
89 '''); | 89 '''); |
90 await sendAnalysisUpdateOptions( | 90 await sendAnalysisUpdateOptions( |
91 new AnalysisOptions()..enableSuperMixins = true); | 91 new AnalysisOptions()..enableSuperMixins = true); |
92 standardAnalysisSetup(); | 92 standardAnalysisSetup(); |
93 await analysisFinished; | 93 await analysisFinished; |
94 expect(currentAnalysisErrors[pathname], isList); | 94 expect(currentAnalysisErrors[pathname], isList); |
95 List<AnalysisError> errors = currentAnalysisErrors[pathname]; | 95 List<AnalysisError> errors = currentAnalysisErrors[pathname]; |
96 expect(errors, isEmpty); | 96 expect(errors, isEmpty); |
97 } | 97 } |
98 } | 98 } |
OLD | NEW |