Chromium Code Reviews| Index: tests/lib/mirrors/library_enumeration_deferred_loading_test.dart |
| diff --git a/tests/lib/mirrors/typedef_deferred_library_test.dart b/tests/lib/mirrors/library_enumeration_deferred_loading_test.dart |
| similarity index 52% |
| copy from tests/lib/mirrors/typedef_deferred_library_test.dart |
| copy to tests/lib/mirrors/library_enumeration_deferred_loading_test.dart |
| index 7dd6c2e347fd2c79861cabca27b72d6345dcce3e..05f3c30093aab0e0199fe18e3c50981f58dd718c 100644 |
| --- a/tests/lib/mirrors/typedef_deferred_library_test.dart |
| +++ b/tests/lib/mirrors/library_enumeration_deferred_loading_test.dart |
| @@ -2,21 +2,22 @@ |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| -library foo; |
| +library libray_enumeration_deferred_loading; |
|
gbracha
2015/04/18 18:00:46
libray -> library
rmacnak
2015/04/20 17:21:04
Done.
|
| -@MirrorsUsed(targets: const ["foo", "bar"]) |
| import 'dart:mirrors'; |
| -import 'typedef_library.dart' deferred as def; |
| - |
| -import 'package:async_helper/async_helper.dart'; |
| import 'package:expect/expect.dart'; |
| +import 'package:async_helper/async_helper.dart'; |
| + |
| +import 'other_library.dart' deferred as other; |
| main() { |
| + var ms = currentMirrorSystem(); |
| + Expect.throws(() => ms.findLibrary(#test.other_library), |
| + (e) => true, "should not be loaded yet"); |
| + |
| asyncStart(); |
| - def.loadLibrary().then((_) { |
| - var barLibrary = currentMirrorSystem().findLibrary(new Symbol("bar")); |
| - var gTypedef = barLibrary.declarations[new Symbol("G")]; |
| - Expect.equals("G", MirrorSystem.getName(gTypedef.simpleName)); |
| + other.loadLibrary().then((_) { |
| asyncEnd(); |
| + Expect.isNotNull(ms.findLibrary(#test.other_library)); |
| }); |
| -} |
| +} |
|
gbracha
2015/04/18 18:00:46
This is not exactly parallel to the other two (imp
rmacnak
2015/04/20 17:21:04
Filled in gap.
|