| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analysis_server/protocol/protocol_generated.dart'; | 7 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 8 import 'package:analyzer_plugin/protocol/protocol_common.dart'; | 8 import 'package:analyzer_plugin/protocol/protocol_common.dart'; |
| 9 import 'package:test/test.dart'; | 9 import 'package:test/test.dart'; |
| 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 expect(result.edits, hasLength(0)); | 54 expect(result.edits, hasLength(0)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 setUp() { | 57 setUp() { |
| 58 return super.setUp().then((_) { | 58 return super.setUp().then((_) { |
| 59 pathname = sourcePath('test.dart'); | 59 pathname = sourcePath('test.dart'); |
| 60 }); | 60 }); |
| 61 } | 61 } |
| 62 | 62 |
| 63 test_getImportedElements() async { | 63 test_getImportedElements_noEdits() async { |
| 64 writeFile(pathname, text); | 64 writeFile(pathname, text); |
| 65 standardAnalysisSetup(); | 65 standardAnalysisSetup(); |
| 66 await analysisFinished; | 66 await analysisFinished; |
| 67 | 67 |
| 68 List<Future> tests = []; | 68 List<Future> tests = []; |
| 69 // Test that an empty list of elements produces no edits. | 69 // Test that an empty list of elements produces no edits. |
| 70 tests.add(checkNoEdits(<ImportedElements>[])); | 70 tests.add(checkNoEdits(<ImportedElements>[])); |
| 71 return Future.wait(tests); | 71 return Future.wait(tests); |
| 72 } | 72 } |
| 73 } | 73 } |
| OLD | NEW |