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

Unified Diff: tests/language_strong/optimized_constant_array_string_access_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/optimized_constant_array_string_access_test.dart
diff --git a/tests/language_strong/optimized_constant_array_string_access_test.dart b/tests/language_strong/optimized_constant_array_string_access_test.dart
index 22f377117ecb16c8b75d20c671bda9674938e632..1f0f7644b1865ab42af2f9153bc1cc2df7f74ad8 100644
--- a/tests/language_strong/optimized_constant_array_string_access_test.dart
+++ b/tests/language_strong/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();

Powered by Google App Engine
This is Rietveld 408576698