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

Unified Diff: tests/language_strong/rewrite_swap_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/rewrite_swap_test.dart
diff --git a/tests/language_strong/rewrite_swap_test.dart b/tests/language_strong/rewrite_swap_test.dart
index acb4e8f662ca3bacdeb905f1f2db471c599b7879..5c6d1159c08be24a2f7fdff1165cdaaa19549e58 100644
--- a/tests/language_strong/rewrite_swap_test.dart
+++ b/tests/language_strong/rewrite_swap_test.dart
@@ -4,87 +4,87 @@
import "package:expect/expect.dart";
-swap1(x,y,b) {
- if (b) {
- var t = x;
- x = y;
- y = t;
- }
- Expect.equals(2, x);
- Expect.equals(1, y);
+swap1(x, y, b) {
+ if (b) {
+ var t = x;
+ x = y;
+ y = t;
+ }
+ Expect.equals(2, x);
+ Expect.equals(1, y);
}
-swap2(x,y,z,w,b) {
- if (b) {
- var t = x;
- x = y;
- y = t;
+swap2(x, y, z, w, b) {
+ if (b) {
+ var t = x;
+ x = y;
+ y = t;
- var q = z;
- z = w;
- w = q;
- }
- Expect.equals(2, x);
- Expect.equals(1, y);
- Expect.equals(4, z);
- Expect.equals(3, w);
+ var q = z;
+ z = w;
+ w = q;
+ }
+ Expect.equals(2, x);
+ Expect.equals(1, y);
+ Expect.equals(4, z);
+ Expect.equals(3, w);
}
-swap3(x,y,z,b) {
- if (b) {
- var t = x;
- x = y;
- y = z;
- z = t;
- }
- Expect.equals(2, x);
- Expect.equals(3, y);
- Expect.equals(1, z);
+swap3(x, y, z, b) {
+ if (b) {
+ var t = x;
+ x = y;
+ y = z;
+ z = t;
+ }
+ Expect.equals(2, x);
+ Expect.equals(3, y);
+ Expect.equals(1, z);
}
-swap4(x,y,z,b) {
- if (b) {
- var t = x;
- x = y;
- y = z; // swap cycle involves unused variable 'y'
- z = t;
- }
- Expect.equals(2, x);
- Expect.equals(1, z);
+swap4(x, y, z, b) {
+ if (b) {
+ var t = x;
+ x = y;
+ y = z; // swap cycle involves unused variable 'y'
+ z = t;
+ }
+ Expect.equals(2, x);
+ Expect.equals(1, z);
}
-swap5(x,y,z,w,b,b2) {
- if (b) {
- var t = x;
- x = y;
- y = t;
- }
- if (b2) {
- var q = z;
- z = w;
- w = q;
- }
- Expect.equals(2, x);
- Expect.equals(1, y);
- Expect.equals(4, z);
- Expect.equals(3, w);
+swap5(x, y, z, w, b, b2) {
+ if (b) {
+ var t = x;
+ x = y;
+ y = t;
+ }
+ if (b2) {
+ var q = z;
+ z = w;
+ w = q;
+ }
+ Expect.equals(2, x);
+ Expect.equals(1, y);
+ Expect.equals(4, z);
+ Expect.equals(3, w);
}
main() {
- swap1(1,2,true);
- swap1(2,1,false);
+ swap1(1, 2, true);
+ swap1(2, 1, false);
- swap2(1,2,3,4,true);
- swap2(2,1,4,3,false);
+ swap2(1, 2, 3, 4, true);
+ swap2(2, 1, 4, 3, false);
- swap3(1,2,3,true);
- swap3(2,3,1,false);
+ swap3(1, 2, 3, true);
+ swap3(2, 3, 1, false);
- swap4(1,2,3,true);
- swap4(2,3,1,false);
+ swap4(1, 2, 3, true);
+ swap4(2, 3, 1, false);
- swap5(1,2,3,4,true, true);
- swap5(1,2,4,3,true, false);
- swap5(2,1,3,4,false, true);
- swap5(2,1,4,3,false, false);
+ swap5(1, 2, 3, 4, true, true);
+ swap5(1, 2, 4, 3, true, false);
+ swap5(2, 1, 3, 4, false, true);
+ swap5(2, 1, 4, 3, false, false);
}

Powered by Google App Engine
This is Rietveld 408576698