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

Unified Diff: tests/language/arithmetic_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, 10 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/arithmetic_smi_overflow_test.dart ('k') | tests/language/assert_assignable_type_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/arithmetic_test.dart
diff --git a/tests/language/arithmetic_test.dart b/tests/language/arithmetic_test.dart
index b660960efbfbe91c0c775c6eb48d2f6693f988fc..ec4ece918232c955b664f4d90bf520cf50e11065 100644
--- a/tests/language/arithmetic_test.dart
+++ b/tests/language/arithmetic_test.dart
@@ -2,7 +2,7 @@
// 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.
// Dart test program to test arithmetic operations.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
library arithmetic_test;
import "package:expect/expect.dart";
@@ -423,24 +423,24 @@ class ArithmeticTest {
var b = -1;
for (var i = 0; i < 10; i++) Expect.equals(0x40000000, div(a, b));
}
-
-
+
+
static int divMod(a, b) => a ~/ b + a % b;
-
+
static void testSmiDivModDeopt() {
var a = -0x40000000;
var b = -1;
for (var i = 0; i < 10; i++) Expect.equals(0x40000000, divMod(a, b));
}
-
+
static double sinCosSub(double a) => sin(a) - cos(a);
-
+
static double sinCosAddCos(double a) => sin(a) * cos(a) + cos(a);
static void testSinCos() {
var e = sin(1.234) - cos(1.234);
var f = sin(1.234) * cos(1.234) + cos(1.234);
-
+
for (var i = 0; i < 20; i++) {
Expect.approxEquals(e, sinCosSub(1.234));
Expect.approxEquals(f, sinCosAddCos(1.234));
@@ -456,7 +456,7 @@ class ArithmeticTest {
cos(i);
}
}
-
+
static mySqrt(var x) => sqrt(x);
static testSqrtDeopt() {
« no previous file with comments | « tests/language/arithmetic_smi_overflow_test.dart ('k') | tests/language/assert_assignable_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698