| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.get.errors; | 5 library test.integration.analysis.get.errors; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 10 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 11 import 'package:analyzer/src/generated/sdk.dart'; | 11 import 'package:analyzer/src/generated/sdk.dart'; |
| 12 import 'package:path/path.dart' as path; | 12 import 'package:path/path.dart' as path; |
| 13 import 'package:test/test.dart'; | 13 import 'package:test/test.dart'; |
| 14 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 14 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 15 | 15 |
| 16 import '../../mock_sdk.dart'; | 16 import '../../mock_sdk.dart'; |
| 17 import '../../utils.dart'; | |
| 18 import '../integration_tests.dart'; | 17 import '../integration_tests.dart'; |
| 19 | 18 |
| 20 main() { | 19 main() { |
| 21 initializeTestEnvironment(); | |
| 22 defineReflectiveSuite(() { | 20 defineReflectiveSuite(() { |
| 23 defineReflectiveTests(AnalysisDomainGetErrorsTest); | 21 defineReflectiveTests(AnalysisDomainGetErrorsTest); |
| 24 }); | 22 }); |
| 25 } | 23 } |
| 26 | 24 |
| 27 /** | 25 /** |
| 28 * Tests that when an SDK path is specified on the command-line (via the `--sdk` | 26 * Tests that when an SDK path is specified on the command-line (via the `--sdk` |
| 29 * argument) that the specified SDK is used. | 27 * argument) that the specified SDK is used. |
| 30 */ | 28 */ |
| 31 @reflectiveTest | 29 @reflectiveTest |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 import 'dart:fake'; | 90 import 'dart:fake'; |
| 93 '''; | 91 '''; |
| 94 writeFile(pathname, text); | 92 writeFile(pathname, text); |
| 95 standardAnalysisSetup(); | 93 standardAnalysisSetup(); |
| 96 await analysisFinished; | 94 await analysisFinished; |
| 97 List<AnalysisError> errors = currentAnalysisErrors[pathname]; | 95 List<AnalysisError> errors = currentAnalysisErrors[pathname]; |
| 98 expect(errors, hasLength(1)); | 96 expect(errors, hasLength(1)); |
| 99 expect(errors[0].code, 'unused_import'); | 97 expect(errors[0].code, 'unused_import'); |
| 100 } | 98 } |
| 101 } | 99 } |
| OLD | NEW |