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 import '../../../async_helper.dart'; | 5 import 'package:async_helper/async_helper.dart'; |
6 | |
7 import 'package:expect/expect.dart'; | 6 import 'package:expect/expect.dart'; |
8 | 7 |
9 import 'dart:async'; | 8 import 'dart:async'; |
10 | 9 |
11 @lazy import 'deferred_class_library.dart'; | 10 @lazy import 'deferred_class_library.dart'; |
12 | 11 |
13 const lazy = const DeferredLibrary('deferred_class_library'); | 12 const lazy = const DeferredLibrary('deferred_class_library'); |
14 | 13 |
15 isNoSuchMethodError(e) => e is NoSuchMethodError; | 14 isNoSuchMethodError(e) => e is NoSuchMethodError; |
16 | 15 |
(...skipping 20 matching lines...) Expand all Loading... |
37 print('deferred_class_library was loaded'); | 36 print('deferred_class_library was loaded'); |
38 x = new MyClass(); | 37 x = new MyClass(); |
39 Expect.equals(42, x.foo(87)); | 38 Expect.equals(42, x.foo(87)); |
40 asyncEnd(); | 39 asyncEnd(); |
41 }); | 40 }); |
42 Expect.equals(0, counter); | 41 Expect.equals(0, counter); |
43 Expect.isNull(x); | 42 Expect.isNull(x); |
44 Expect.throws(() { x = new MyClass(); }, isNoSuchMethodError); | 43 Expect.throws(() { x = new MyClass(); }, isNoSuchMethodError); |
45 Expect.isNull(x); | 44 Expect.isNull(x); |
46 } | 45 } |
OLD | NEW |