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

Side by Side Diff: tests/language/arithmetic_canonicalization_test.dart

Issue 1759973002: Add --no-background-compilation to tests that expect to run code in optimized form (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: more Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // Test canonicalization of simple arithmetic equivalences. 4 // Test canonicalization of simple arithmetic equivalences.
5 // VMOptions=--optimization-counter-threshold=20 --no-use-osr 5 // VMOptions=--optimization-counter-threshold=20 --no-use-osr --no-background-co mpilation
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 8
9 main() { 9 main() {
10 for (var i = 0; i < 50; i++) { 10 for (var i = 0; i < 50; i++) {
11 Expect.isTrue(mul1double(i) is double); 11 Expect.isTrue(mul1double(i) is double);
12 Expect.equals(i.toDouble(), mul1double(i)); 12 Expect.equals(i.toDouble(), mul1double(i));
13 Expect.equals(0.0, mul0double(i)); 13 Expect.equals(0.0, mul0double(i));
14 Expect.equals(i.toDouble(), add0double(i)); 14 Expect.equals(i.toDouble(), add0double(i));
15 15
(...skipping 14 matching lines...) Expand all
30 mul0double(x) => 0.0 * x; 30 mul0double(x) => 0.0 * x;
31 add0double(x) => 0.0 + x; 31 add0double(x) => 0.0 + x;
32 32
33 mul1int(x) => 1 * x; 33 mul1int(x) => 1 * x;
34 mul0int(x) => 0 * x; 34 mul0int(x) => 0 * x;
35 add0int(x) => 0 + x; 35 add0int(x) => 0 + x;
36 and0(x) => 0 & x; 36 and0(x) => 0 & x;
37 or0(x) => 0 | x; 37 or0(x) => 0 | x;
38 xor0(x) => 0 ^ x; 38 xor0(x) => 0 ^ x;
39 and1(x) => (-1) & x; 39 and1(x) => (-1) & x;
OLDNEW
« no previous file with comments | « tests/language/allocation_sinking_inlining_test.dart ('k') | tests/language/arithmetic_smi_overflow_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698