| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 // Test that the compiler can handle missing files used in imports, exports, | 5 // Test that the compiler can handle missing files used in imports, exports, |
| 6 // part tags or as the main source file. | 6 // part tags or as the main source file. |
| 7 | 7 |
| 8 library dart2js.test.import; | 8 library dart2js.test.import; |
| 9 | 9 |
| 10 import 'package:expect/expect.dart'; | |
| 11 import 'package:async_helper/async_helper.dart'; | 10 import 'package:async_helper/async_helper.dart'; |
| 12 import 'package:compiler/src/diagnostics/messages.dart'; | 11 import 'package:compiler/src/diagnostics/messages.dart'; |
| 13 import 'package:compiler/compiler.dart'; | |
| 14 import 'memory_compiler.dart'; | 12 import 'memory_compiler.dart'; |
| 15 | 13 |
| 16 const MEMORY_SOURCE_FILES = const { | 14 const MEMORY_SOURCE_FILES = const { |
| 17 'main.dart': ''' | 15 'main.dart': ''' |
| 18 | 16 |
| 19 library main; | 17 library main; |
| 20 | 18 |
| 21 import 'dart:thisLibraryShouldNotExist'; | 19 import 'dart:thisLibraryShouldNotExist'; |
| 22 import 'package:thisPackageShouldNotExist/thisPackageShouldNotExist.dart'; | 20 import 'package:thisPackageShouldNotExist/thisPackageShouldNotExist.dart'; |
| 23 export 'foo.dart'; | 21 export 'foo.dart'; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 86 } |
| 89 | 87 |
| 90 void main() { | 88 void main() { |
| 91 asyncTest(() async { | 89 asyncTest(() async { |
| 92 await testEntryPointIsPart(); | 90 await testEntryPointIsPart(); |
| 93 await testImportPart(); | 91 await testImportPart(); |
| 94 await testMissingImports(); | 92 await testMissingImports(); |
| 95 await testMissingMain(); | 93 await testMissingMain(); |
| 96 }); | 94 }); |
| 97 } | 95 } |
| OLD | NEW |