Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: tests/language/deferred_shadow_load_library_test.dart

Issue 201613006: Introduces the new syntax for deferred loading (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Ambigous elements are not top-level. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
});
-}
+}

Powered by Google App Engine
This is Rietveld 408576698