| Index: tests/compiler/dart2js_extra/deferred/deferred_constant_test.dart
|
| diff --git a/tests/compiler/dart2js_extra/deferred/deferred_constant_test.dart b/tests/compiler/dart2js_extra/deferred/deferred_constant_test.dart
|
| index 163234c9ad1eca254cc4a94dee5e69f5d0f58f40..8b9947d7164ecfc97f0ff1e024b8a5f3782d61e0 100644
|
| --- a/tests/compiler/dart2js_extra/deferred/deferred_constant_test.dart
|
| +++ b/tests/compiler/dart2js_extra/deferred/deferred_constant_test.dart
|
| @@ -7,41 +7,36 @@ import 'package:expect/expect.dart';
|
|
|
| import 'dart:async';
|
|
|
| -@lazy import 'deferred_class_library.dart';
|
| -
|
| -const lazy = const DeferredLibrary('deferred_class_library');
|
| +import 'deferred_class_library.dart' deferred as lib;
|
|
|
| main() {
|
| var x;
|
| - Expect.throws(() => const MyClass());
|
| - Expect.throws(() => const Constant(42));
|
| - Expect.throws(() => const [const Constant(42)]);
|
| + Expect.throws(() => const lib.MyClass());
|
| + Expect.throws(() => const lib.Constant(42));
|
| + Expect.throws(() => const [const lib.Constant(42)]);
|
| int counter = 0;
|
| asyncStart();
|
| - lazy.load().then((bool didLoad) {
|
| - Expect.isTrue(didLoad);
|
| + lib.loadLibrary().then((_) {
|
| Expect.equals(1, ++counter);
|
| - print('deferred_class_library was loaded');
|
| - x = const MyClass();
|
| + x = const lib.MyClass();
|
| Expect.equals(42, x.foo(87));
|
| - Expect.listEquals(const [const Constant(42)], [new Constant(42)]);
|
| + Expect.listEquals(const [const lib.Constant(42)], [new lib.Constant(42)]);
|
| asyncEnd();
|
| });
|
| Expect.equals(0, counter);
|
| Expect.isNull(x);
|
| asyncStart();
|
| - lazy.load().then((bool didLoad) {
|
| + lazy.load().then((_) {
|
| Expect.isFalse(didLoad);
|
| Expect.equals(2, ++counter);
|
| - print('deferred_class_library was loaded');
|
| - x = const MyClass();
|
| + x = const lib.MyClass();
|
| Expect.equals(42, x.foo(87));
|
| - Expect.listEquals(const [const Constant(42)], [new Constant(42)]);
|
| + Expect.listEquals(const [const lib.Constant(42)], [new lib.Constant(42)]);
|
| asyncEnd();
|
| });
|
| Expect.equals(0, counter);
|
| Expect.isNull(x);
|
| - Expect.throws(() => const Constant(42));
|
| - Expect.throws(() => const [const Constant(42)]);
|
| + Expect.throws(() => const lib.Constant(42));
|
| + Expect.throws(() => const [const lib.Constant(42)]);
|
| Expect.isNull(x);
|
| }
|
|
|