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

Unified Diff: tests/language/deferred_closurize_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: 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_closurize_load_library_test.dart
diff --git a/tests/compiler/dart2js_extra/deferred/deferred_constant2_test.dart b/tests/language/deferred_closurize_load_library_test.dart
similarity index 58%
copy from tests/compiler/dart2js_extra/deferred/deferred_constant2_test.dart
copy to tests/language/deferred_closurize_load_library_test.dart
index cb67911a8d038faa6105ae73375fb5489ab01b32..c910ce86fb6c1f5c3485a5137faf2da31bc8c432 100644
--- a/tests/compiler/dart2js_extra/deferred/deferred_constant2_test.dart
+++ b/tests/language/deferred_closurize_load_library_test.dart
@@ -2,20 +2,18 @@
// 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 '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_closurize_load_library_lib.dart" deferred as lib;
-main() {
+void main() {
+ var x = lib.loadLibrary;
asyncStart();
- lazy.load().then((bool didLoad) {
- Expect.isTrue(didLoad);
- Expect.equals(499, lib.C1.value);
+ x().then((_) {
+ Expect.isTrue(lib.trueVar);
asyncEnd();
});
}

Powered by Google App Engine
This is Rietveld 408576698