Chromium Code Reviews| Index: tests/language/deferred_shadow_load_library_test.dart |
| diff --git a/tests/compiler/dart2js_extra/deferred/deferred_constant2_test.dart b/tests/language/deferred_shadow_load_library_test.dart |
| similarity index 54% |
| copy from tests/compiler/dart2js_extra/deferred/deferred_constant2_test.dart |
| copy to tests/language/deferred_shadow_load_library_test.dart |
| index cb67911a8d038faa6105ae73375fb5489ab01b32..af7cc3ce42134fd11bb30b8a12ae1ac29f5f8162 100644 |
| --- a/tests/compiler/dart2js_extra/deferred/deferred_constant2_test.dart |
| +++ b/tests/language/deferred_shadow_load_library_test.dart |
| @@ -2,20 +2,20 @@ |
| // 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. |
| -import 'package:async_helper/async_helper.dart'; |
| +import "dart:async"; |
| import 'package:expect/expect.dart'; |
| +import 'package:async_helper/async_helper.dart'; |
| -import 'dart:async'; |
| - |
| -@lazy import 'deferred_class_library2.dart' as lib; |
| - |
| -const lazy = const DeferredLibrary('deferred_class_library2'); |
| +// This library contains a member loadLibrary. |
| +// Check that we shadow this member. |
| +import "deferred_shadow_load_library_lib.dart" deferred as lib; |
| -main() { |
| +void main() { |
| + var x = lib.loadLibrary(); |
| + Expect.isTrue(x is Future); |
| asyncStart(); |
| - lazy.load().then((bool didLoad) { |
| - Expect.isTrue(didLoad); |
| - Expect.equals(499, lib.C1.value); |
| + x.then((_) { |
| + Expect.isTrue(lib.trueVar); |
|
floitsch
2014/03/19 21:04:51
check that loadLibrary is still shadowed once the
sigurdm
2014/03/20 12:26:33
Done.
|
| asyncEnd(); |
| }); |
| -} |
| +} |