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

Unified Diff: tests/language/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/optimized_string_charcodeat_test.dart
diff --git a/tests/language/optimized_string_charcodeat_test.dart b/tests/language/optimized_string_charcodeat_test.dart
index 1493db6ae8e184faf02a283e74a174c0d34f1ca6..149069cd085102651b84e7175bfeae464ecde1f2 100644
--- a/tests/language/optimized_string_charcodeat_test.dart
+++ b/tests/language/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