| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 import "package:expect/expect.dart"; | |
| 6 // A deferred library that doesn't exist. | |
| 7 import 'package:foo/foo.dart' deferred as foo; | |
| 8 // A deferred library that does exist. | |
| 9 import 'deferred/exists.dart' deferred as exists; | |
| 10 // A deferred library that transitively will fail due to a file not found. | |
| 11 import 'deferred/transitive_error.dart' deferred as te; | |
| 12 | |
| 13 main() async { | |
| 14 // Attempt to load foo which will fail. | |
| 15 var fooError; | |
| 16 await foo.loadLibrary().catchError((e) { | |
| 17 fooError = e; | |
| 18 }); | |
| 19 Expect.isNotNull(fooError); | |
| 20 await exists.loadLibrary(); | |
| 21 Expect.equals(99, exists.x); | |
| 22 /* TODO(johnmccutchan): Implement transitive error reporting. | |
| 23 var teError; | |
| 24 await te.loadLibrary().catchError((e) { | |
| 25 teError = e; | |
| 26 }); | |
| 27 Expect.isNotNull(teError); | |
| 28 */ | |
| 29 } | |
| OLD | NEW |