| 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.update.content; | 5 library test.integration.analysis.update.content; |
| 6 | 6 |
| 7 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 7 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 8 import 'package:test/test.dart'; |
| 8 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 9 import 'package:unittest/unittest.dart'; | |
| 10 | 10 |
| 11 import '../../utils.dart'; | 11 import '../../utils.dart'; |
| 12 import '../integration_tests.dart'; | 12 import '../integration_tests.dart'; |
| 13 | 13 |
| 14 main() { | 14 main() { |
| 15 initializeTestEnvironment(); | 15 initializeTestEnvironment(); |
| 16 defineReflectiveTests(Test); | 16 defineReflectiveSuite(() { |
| 17 defineReflectiveTests(Test); |
| 18 }); |
| 17 } | 19 } |
| 18 | 20 |
| 19 @reflectiveTest | 21 @reflectiveTest |
| 20 class Test extends AbstractAnalysisServerIntegrationTest { | 22 class Test extends AbstractAnalysisServerIntegrationTest { |
| 21 test_updateContent() { | 23 test_updateContent() { |
| 22 String pathname = sourcePath('test.dart'); | 24 String pathname = sourcePath('test.dart'); |
| 23 String goodText = r''' | 25 String goodText = r''' |
| 24 main() { | 26 main() { |
| 25 print("Hello, world!"); | 27 print("Hello, world!"); |
| 26 }'''; | 28 }'''; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 {pathname: new RemoveContentOverlay()}); | 63 {pathname: new RemoveContentOverlay()}); |
| 62 }) | 64 }) |
| 63 .then((result) => analysisFinished) | 65 .then((result) => analysisFinished) |
| 64 .then((_) { | 66 .then((_) { |
| 65 // Now there should be errors again, because the contents on disk are
no | 67 // Now there should be errors again, because the contents on disk are
no |
| 66 // longer overridden. | 68 // longer overridden. |
| 67 expect(currentAnalysisErrors[pathname], isNotEmpty); | 69 expect(currentAnalysisErrors[pathname], isNotEmpty); |
| 68 }); | 70 }); |
| 69 } | 71 } |
| 70 } | 72 } |
| OLD | NEW |