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

Unified Diff: tests/language_strong/closure_shared_state_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/closure_shared_state_test.dart
diff --git a/tests/language_strong/closure_shared_state_test.dart b/tests/language_strong/closure_shared_state_test.dart
index 8a063a127aead845f648621a4bceba1d5da891d2..85c99085ad73a1b26ff27faafaef7eeba8667395 100644
--- a/tests/language_strong/closure_shared_state_test.dart
+++ b/tests/language_strong/closure_shared_state_test.dart
@@ -12,16 +12,32 @@ var g;
setupPlain() {
int j = 1000;
// Two closures sharing variable 'j'; j initially is 1000.
- f = (int x) { var q = j; j = x; return q;};
- g = (int x) { var q = j; j = x; return q;};
+ f = (int x) {
+ var q = j;
+ j = x;
+ return q;
+ };
+ g = (int x) {
+ var q = j;
+ j = x;
+ return q;
+ };
}
setupLoop() {
for (int i = 0; i < 2; i++) {
- int j = i * 1000; // The last stored closure has j initially 1000.
+ int j = i * 1000; // The last stored closure has j initially 1000.
// Two closures sharing variable 'j'.
- f = (int x) { var q = j; j = x; return q;};
- g = (int x) { var q = j; j = x; return q;};
+ f = (int x) {
+ var q = j;
+ j = x;
+ return q;
+ };
+ g = (int x) {
+ var q = j;
+ j = x;
+ return q;
+ };
}
}
@@ -30,8 +46,16 @@ setupNestedLoop() {
int j = outer * 1000;
for (int i = 0; i < 2; i++) {
// Two closures sharing variable 'j' in a loop at different nesting.
- f = (int x) { var q = j; j = x; return q;};
- g = (int x) { var q = j; j = x; return q;};
+ f = (int x) {
+ var q = j;
+ j = x;
+ return q;
+ };
+ g = (int x) {
+ var q = j;
+ j = x;
+ return q;
+ };
}
}
}
@@ -45,7 +69,6 @@ test(setup) {
Expect.equals(400, g(500));
}
-
main() {
test(setupPlain);
test(setupLoop);

Powered by Google App Engine
This is Rietveld 408576698