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

Unified Diff: tests/language_strong/optimized_string_charcodeat_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_string_charcodeat_test.dart
diff --git a/tests/language_strong/optimized_string_charcodeat_test.dart b/tests/language_strong/optimized_string_charcodeat_test.dart
index 98f4397dc0be318cd03517c150e522e118445f6b..93cf41a13d914a37299a51a452ed6ac9a5daeb72 100644
--- a/tests/language_strong/optimized_string_charcodeat_test.dart
+++ b/tests/language_strong/optimized_string_charcodeat_test.dart
@@ -7,7 +7,6 @@
import "package:expect/expect.dart";
-
String one_byte = "hest";
String two_byte = "h\u{2029}ns";
@@ -15,38 +14,38 @@ int testOneByteCodeUnitAt(String x, int j) {
int test() {
return x.codeUnitAt(j);
}
+
for (int i = 0; i < 20; i++) test();
return test();
}
-
int testTwoByteCodeUnitAt(String x, int j) {
int test() {
return x.codeUnitAt(j);
}
+
for (int i = 0; i < 20; i++) test();
return test();
}
-
int testConstantStringCodeUnitAt(int j) {
int test() {
return "høns".codeUnitAt(j);
}
+
for (int i = 0; i < 20; i++) test();
return test();
}
-
int testConstantIndexCodeUnitAt(String x) {
int test() {
return x.codeUnitAt(1);
}
+
for (int i = 0; i < 20; i++) test();
return test();
}
-
int testOneByteCodeUnitAtInLoop(var x) {
var result = 0;
for (int i = 0; i < x.length; i++) {
@@ -55,7 +54,6 @@ int testOneByteCodeUnitAtInLoop(var x) {
return result;
}
-
int testTwoByteCodeUnitAtInLoop(var x) {
var result = 0;
for (int i = 0; i < x.length; i++) {
@@ -64,7 +62,6 @@ int testTwoByteCodeUnitAtInLoop(var x) {
return result;
}
-
main() {
for (int j = 0; j < 10; j++) {
Expect.equals(101, testOneByteCodeUnitAt(one_byte, 1));

Powered by Google App Engine
This is Rietveld 408576698