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:analyzer_plugin/protocol/protocol_common.dart'; | 5 import 'package:analyzer_plugin/protocol/protocol_common.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 '../support/integration_tests.dart'; | 9 import '../support/integration_tests.dart'; |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // Now there should be errors again, because the contents on disk are no | 56 // Now there should be errors again, because the contents on disk are no |
57 // longer overridden. | 57 // longer overridden. |
58 sendAnalysisUpdateContent({path: new RemoveContentOverlay()}); | 58 sendAnalysisUpdateContent({path: new RemoveContentOverlay()}); |
59 await analysisFinished; | 59 await analysisFinished; |
60 expect(currentAnalysisErrors[path], isNotEmpty); | 60 expect(currentAnalysisErrors[path], isNotEmpty); |
61 } | 61 } |
62 | 62 |
63 @failingTest | 63 @failingTest |
64 test_updateContent_multipleAdds() async { | 64 test_updateContent_multipleAdds() async { |
65 String pathname = sourcePath('test.dart'); | 65 String pathname = sourcePath('test.dart'); |
66 writeFile( | 66 writeFile(pathname, r''' |
67 pathname, | |
68 r''' | |
69 class Person { | 67 class Person { |
70 String _name; | 68 String _name; |
71 Person(this._name); | 69 Person(this._name); |
72 String get name => this._name; | 70 String get name => this._name; |
73 String toString() => "Name: ${name}"; | 71 String toString() => "Name: ${name}"; |
74 } | 72 } |
75 void main() { | 73 void main() { |
76 var p = new Person("Skeletor"); | 74 var p = new Person("Skeletor"); |
77 p.xname = "Faker"; | 75 p.xname = "Faker"; |
78 print(p); | 76 print(p); |
(...skipping 21 matching lines...) Expand all Loading... |
100 } | 98 } |
101 ''') | 99 ''') |
102 }); | 100 }); |
103 await analysisFinished; | 101 await analysisFinished; |
104 expect(currentAnalysisErrors[pathname], isList); | 102 expect(currentAnalysisErrors[pathname], isList); |
105 List<AnalysisError> errors2 = currentAnalysisErrors[pathname]; | 103 List<AnalysisError> errors2 = currentAnalysisErrors[pathname]; |
106 expect(errors2, hasLength(1)); | 104 expect(errors2, hasLength(1)); |
107 expect(errors2[0].location.file, equals(pathname)); | 105 expect(errors2[0].location.file, equals(pathname)); |
108 } | 106 } |
109 } | 107 } |
OLD | NEW |