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

Unified Diff: tests/language/lazy_static7_test.dart

Issue 1264283003: dart2js: Fix lazy statics in the startup-emitter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add check. Created 5 years, 4 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 | « pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/lazy_static7_test.dart
diff --git a/tests/language/call_function_apply_test.dart b/tests/language/lazy_static7_test.dart
similarity index 61%
copy from tests/language/call_function_apply_test.dart
copy to tests/language/lazy_static7_test.dart
index 935cfaf832aff599478847534822d651a4ddcd51..ff74912259a11aa65a3e9499f4126300a07b489d 100644
--- a/tests/language/call_function_apply_test.dart
+++ b/tests/language/lazy_static7_test.dart
@@ -4,12 +4,13 @@
import "package:expect/expect.dart";
-class A {
- call({a: 42}) {
- return 499 + a;
- }
-}
+var sideEffect = 0;
+var x = (() { sideEffect++; return 499; })();
main() {
- Expect.equals(497, Function.apply(new A(), [], {#a: -2}));
+ if (new DateTime.now().day >= -1) {
+ x = 42;
+ }
+ Expect.equals(42, x);
+ Expect.equals(0, sideEffect);
}
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698