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

Unified Diff: test/codegen/corelib/regress_r21715_test.dart

Issue 1945153002: Add corelib tests (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: error_test and range_error_test now pass Created 4 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 | « test/codegen/corelib/regress_11099_test.dart ('k') | test/codegen/corelib/safe_to_string_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/corelib/regress_r21715_test.dart
diff --git a/test/codegen/language/rewrite_assign_test.dart b/test/codegen/corelib/regress_r21715_test.dart
similarity index 53%
copy from test/codegen/language/rewrite_assign_test.dart
copy to test/codegen/corelib/regress_r21715_test.dart
index 5379a6ca35bf171a8d2f276529597b1355e26a57..5a0ef73d9369efcdc5c89244bfcca25cf1299657 100644
--- a/test/codegen/language/rewrite_assign_test.dart
+++ b/test/codegen/corelib/regress_r21715_test.dart
@@ -2,25 +2,16 @@
// 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.
+// VMOptions=--optimization_counter_threshold=5 --no-background_compilation
+
import "package:expect/expect.dart";
-bar(x,y) {}
-
-foo(b) {
- var x, y;
- if (b) {
- x = 1;
- y = 2;
- } else {
- x = 2;
- y = 1;
- }
- bar(x,y);
- bar(x,y);
- return x;
-}
+sll(x, shift) => x << shift;
main() {
- Expect.equals(1, foo(true));
- Expect.equals(2, foo(false));
+ for (int i = 0; i < 10; i++) {
+ var x = 0x50000000;
+ var shift = 34;
+ Expect.equals(sll(x, shift), 0x14000000000000000);
+ }
}
« no previous file with comments | « test/codegen/corelib/regress_11099_test.dart ('k') | test/codegen/corelib/safe_to_string_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698