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.services.correction.util; | 5 library test.services.correction.util; |
6 | 6 |
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 7 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
8 import 'package:analysis_server/src/services/correction/strings.dart'; | 8 import 'package:analysis_server/src/services/correction/strings.dart'; |
9 import 'package:analysis_server/src/services/correction/util.dart'; | 9 import 'package:analysis_server/src/services/correction/util.dart'; |
10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
11 import 'package:analyzer/src/generated/source.dart'; | 11 import 'package:analyzer/src/generated/source.dart'; |
12 import 'package:test/test.dart'; | 12 import 'package:test/test.dart'; |
13 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 13 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
14 | 14 |
15 import '../../abstract_single_unit.dart'; | 15 import '../../abstract_single_unit.dart'; |
16 import '../../utils.dart'; | |
17 | 16 |
18 main() { | 17 main() { |
19 initializeTestEnvironment(); | |
20 defineReflectiveSuite(() { | 18 defineReflectiveSuite(() { |
21 defineReflectiveTests(UtilTest); | 19 defineReflectiveTests(UtilTest); |
22 }); | 20 }); |
23 } | 21 } |
24 | 22 |
25 @reflectiveTest | 23 @reflectiveTest |
26 class UtilTest extends AbstractSingleUnitTest { | 24 class UtilTest extends AbstractSingleUnitTest { |
27 test_addLibraryImports_dart_hasImports_between() { | 25 test_addLibraryImports_dart_hasImports_between() { |
28 resolveTestUnit(''' | 26 resolveTestUnit(''' |
29 import 'dart:async'; | 27 import 'dart:async'; |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 @override | 284 @override |
287 final String fullName; | 285 final String fullName; |
288 | 286 |
289 @override | 287 @override |
290 final Uri uri; | 288 final Uri uri; |
291 | 289 |
292 _SourceMock(this.fullName, this.uri); | 290 _SourceMock(this.fullName, this.uri); |
293 | 291 |
294 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 292 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
295 } | 293 } |
OLD | NEW |