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

Unified Diff: tests/language/argument_definition2_test.dart

Issue 10825386: Use JavaScript runtime semantics when constant folding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 3 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/corelib/expression_test.dart ('k') | tests/language/canonical_const2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/argument_definition2_test.dart
diff --git a/tests/language/argument_definition2_test.dart b/tests/language/argument_definition2_test.dart
index d6abb8022393a239fb06af248cbf5d7166f6ee87..c59b061b03868311663b7a1dd4aa6845c6ac1777 100644
--- a/tests/language/argument_definition2_test.dart
+++ b/tests/language/argument_definition2_test.dart
@@ -41,6 +41,18 @@ class A {
}
}
+
+test4(bool passed, [a]) {
+ if (passed) {
+ Expect.equals(54, a);
+ Expect.isTrue(?a);
+ } else {
+ Expect.equals(null, a);
+ Expect.isFalse(?a);
+ }
+ Expect.isTrue(?passed);
+}
+
int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
main() {
@@ -62,4 +74,7 @@ main() {
closure = things[inscrutable(2)];
closure(true, 54);
closure(false);
+
+ test4(true, 54);
+ test4(false);
}
« no previous file with comments | « tests/corelib/expression_test.dart ('k') | tests/language/canonical_const2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698