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

Unified Diff: tests/language_strong/modulo_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
Index: tests/language_strong/modulo_test.dart
diff --git a/tests/language_strong/modulo_test.dart b/tests/language_strong/modulo_test.dart
index f14d3c556845613d08d32d668010126c4d526b34..519c2f9be57eaae24cb09e3c5067f0d629b38969 100644
--- a/tests/language_strong/modulo_test.dart
+++ b/tests/language_strong/modulo_test.dart
@@ -6,7 +6,6 @@
import "package:expect/expect.dart";
-
main() {
// Prime IC cache.
noDom(1);
@@ -15,7 +14,7 @@ main() {
Expect.equals(i % 256, foo(i));
Expect.equals(i % -256, boo(i));
Expect.throws(() => hoo(i), (e) => e is IntegerDivisionByZeroException);
-
+
Expect.equals(i ~/ 254 + i % 254, fooTwo(i));
Expect.equals(i ~/ -254 + i % -254, booTwo(i));
Expect.throws(() => hooTwo(i), (e) => e is IntegerDivisionByZeroException);
@@ -26,7 +25,7 @@ main() {
}
Expect.equals((i ~/ 10) + (i % 10) + (i % 10), threeOp(i));
Expect.equals((i ~/ 10) + (i ~/ 12) + (i % 10) + (i % 12), fourOp(i));
-
+
// Zero test is done outside the loop.
if (i < 0) {
Expect.equals(i % -i, foo2(i));
@@ -40,7 +39,7 @@ main() {
Expect.throws(() => fooTwo2(0), (e) => e is IntegerDivisionByZeroException);
}
-foo(i) => i % 256; // This will get optimized to AND instruction.
+foo(i) => i % 256; // This will get optimized to AND instruction.
boo(i) => i % -256;
hoo(i) => i % 0;
@@ -65,17 +64,16 @@ threeOp(a) {
return x + y + z;
}
-
fourOp(a) {
var x0 = a ~/ 10;
var x1 = a ~/ 12;
- var y0 = a % 10;
+ var y0 = a % 10;
var y1 = a % 12;
return x0 + x1 + y0 + y1;
}
foo2(i) {
- // Make sure x has a range computed.
+ // Make sure x has a range computed.
var x = 0;
if (i < 0) {
x = -i;
@@ -85,9 +83,8 @@ foo2(i) {
return i % x;
}
-
fooTwo2(i) {
- // Make sure x has a range computed.
+ // Make sure x has a range computed.
var x = 0;
if (i < 0) {
x = -i;

Powered by Google App Engine
This is Rietveld 408576698