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

Unified Diff: runtime/tests/vm/dart/optimized_stacktrace_line_and_column_test.dart

Issue 2751423005: Run dartfmt on all files under runtime. (Closed)
Patch Set: Run dartfmt on all files under runtime. Created 3 years, 9 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: runtime/tests/vm/dart/optimized_stacktrace_line_and_column_test.dart
diff --git a/runtime/tests/vm/dart/optimized_stacktrace_line_and_column_test.dart b/runtime/tests/vm/dart/optimized_stacktrace_line_and_column_test.dart
index 0460aaef00dd6de21b6828f72fa2dfe0d13c11c5..4bcb31e2b824833f8aee82af9e427a9a843df8c4 100644
--- a/runtime/tests/vm/dart/optimized_stacktrace_line_and_column_test.dart
+++ b/runtime/tests/vm/dart/optimized_stacktrace_line_and_column_test.dart
@@ -8,7 +8,7 @@ import "package:expect/expect.dart";
foo(x) => bar(x);
bar(x) {
- if (x == null) throw 42; // throw at position 11:18
+ if (x == null) throw 42; // throw at position 11:18
return x + 1;
}
@@ -21,11 +21,13 @@ test1() {
String s = stacktrace.toString();
print(s);
Expect.isFalse(s.contains("-1:-1"), "A");
- Expect.isTrue(s.contains("optimized_stacktrace_line_and_column_test.dart:11:18"), "B");
+ Expect.isTrue(
+ s.contains("optimized_stacktrace_line_and_column_test.dart:11:18"),
+ "B");
}
// Optimized.
- for (var i=0; i<10000; i++) foo(42);
+ for (var i = 0; i < 10000; i++) foo(42);
try {
foo(null);
Expect.fail("Unreachable");
@@ -33,18 +35,19 @@ test1() {
String s = stacktrace.toString();
print(s);
Expect.isFalse(s.contains("-1:-1"), "C");
- Expect.isTrue(s.contains("optimized_stacktrace_line_and_column_test.dart:11:18"), "D");
+ Expect.isTrue(
+ s.contains("optimized_stacktrace_line_and_column_test.dart:11:18"),
+ "D");
}
}
-
// (2) Test checked mode exceptions.
maximus(x) => moritz(x);
moritz(x) {
- if (x == 333) return 42 ? 0 : 1; // Throws in checked mode.
- if (x == 777) {
- bool b = x; // Throws in checked mode.
+ if (x == 333) return 42 ? 0 : 1; // Throws in checked mode.
+ if (x == 777) {
+ bool b = x; // Throws in checked mode.
return b;
}
@@ -52,7 +55,7 @@ moritz(x) {
}
test2() {
- for (var i=0; i<100000; i++) maximus(42);
+ for (var i = 0; i < 100000; i++) maximus(42);
try {
maximus(333);
} catch (e, stacktrace) {
« no previous file with comments | « runtime/tests/vm/dart/inline_stack_frame_test.dart ('k') | runtime/tests/vm/dart/optimized_stacktrace_line_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698