Index: tests/language/optimized_constant_array_string_access_test.dart |
diff --git a/tests/language/optimized_constant_array_string_access_test.dart b/tests/language/optimized_constant_array_string_access_test.dart |
index 632e6bba832a610792f9ef49da113b97e3cfdb07..f50561e1fc7914844c9e01342e343b3949ff73ef 100644 |
--- a/tests/language/optimized_constant_array_string_access_test.dart |
+++ b/tests/language/optimized_constant_array_string_access_test.dart |
@@ -18,16 +18,15 @@ int testConstantStringAndIndexCodeUnitAt() { |
Expect.throws(() => test(true)); |
} |
- |
int testConstantArrayAndIndexAt() { |
int testPositive(b) { |
- var a = const [1,2,3,4]; |
+ var a = const [1, 2, 3, 4]; |
if (b) return a[400]; |
return a[2]; |
} |
int testNegative(b) { |
- var a = const [1,2,3,4]; |
+ var a = const [1, 2, 3, 4]; |
if (b) return a[-1]; |
return a[2]; |
} |
@@ -41,20 +40,21 @@ int testConstantArrayAndIndexAt() { |
Expect.throws(() => testNegative(true)); |
} |
- |
foo(a) { |
- if (a == 1) { return 2; } |
+ if (a == 1) { |
+ return 2; |
+ } |
var aa = const [1, 2]; |
return aa[2.3]; |
} |
- |
int testNonSmiIndex() { |
- for (int i = 0; i < 20; i++) { foo(1); } |
+ for (int i = 0; i < 20; i++) { |
+ foo(1); |
+ } |
Expect.throws(() => foo(2)); |
} |
- |
main() { |
testConstantStringAndIndexCodeUnitAt(); |
testConstantArrayAndIndexAt(); |