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); |