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

Unified Diff: tests/language/deferred_call_empty_before_load_test.dart

Issue 1127043003: Add test for calling an empty function from unloaded deferred library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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
« no previous file with comments | « tests/language/deferred_call_empty_before_load_lib.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/deferred_call_empty_before_load_test.dart
diff --git a/tests/compiler/dart2js_extra/22776_test.dart b/tests/language/deferred_call_empty_before_load_test.dart
similarity index 50%
copy from tests/compiler/dart2js_extra/22776_test.dart
copy to tests/language/deferred_call_empty_before_load_test.dart
index e9f12ea96362d55bb9fa50148f31bb5ea0c2e8d0..c241c6a90b494433cfe120f5771335444a333233 100644
--- a/tests/compiler/dart2js_extra/22776_test.dart
+++ b/tests/language/deferred_call_empty_before_load_test.dart
@@ -2,22 +2,12 @@
// 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.
-// Regression test for http://dartbug.com/22776/
+// Test that calling a function, even though it itself has no effect, will
+// trigger an error if the corresponding deferred library has not been loaded.
import "package:expect/expect.dart";
-
-class A {}
+import "deferred_call_empty_before_load_lib.dart" deferred as lib1;
main() {
- try {
- print(id(new Duration(milliseconds: 10)));
- print(id(3) ~/ new A());
- } catch (e) {
- print("Error '$e' ${e.runtimeType}");
- }
+ Expect.throws(() => lib1.thefun());
}
-
-@AssumeDynamic()
-@NoInline()
-id(x) => x;
-
« no previous file with comments | « tests/language/deferred_call_empty_before_load_lib.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698