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

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

Issue 2767533002: Revert "Fix observatory tests broken by running dartfmt." (Closed)
Patch Set: 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_test.dart
diff --git a/runtime/tests/vm/dart/optimized_stacktrace_line_test.dart b/runtime/tests/vm/dart/optimized_stacktrace_line_test.dart
index abdbefa252b45f78164baa968413b3ec8334fac9..cc7157d577ec957a941443ac16bcffa151c3f9c5 100644
--- a/runtime/tests/vm/dart/optimized_stacktrace_line_test.dart
+++ b/runtime/tests/vm/dart/optimized_stacktrace_line_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;
}
@@ -25,7 +25,7 @@ test1() {
}
// 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");
@@ -37,13 +37,14 @@ test1() {
}
}
+
// (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;
}
@@ -51,7 +52,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/optimized_stacktrace_line_and_column_test.dart ('k') | runtime/tests/vm/dart/random_walk_fuzzer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698