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

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

Issue 14009004: Remove methods on StackTrace class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add dart2j issue number for unexepected stack trace. Created 7 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
« no previous file with comments | « runtime/lib/stacktrace_patch.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/core_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tests/vm/dart/optimized_stacktrace_test.dart
diff --git a/runtime/tests/vm/dart/optimized_stacktrace_test.dart b/runtime/tests/vm/dart/optimized_stacktrace_test.dart
index 40413c57702cc0ea54d5abda815176de3e137ce4..d002a2e28b0c32c11d9830998c9206ebb6e96297 100644
--- a/runtime/tests/vm/dart/optimized_stacktrace_test.dart
+++ b/runtime/tests/vm/dart/optimized_stacktrace_test.dart
@@ -4,7 +4,7 @@
// Test correct source positions in stack trace with optimized functions.
import "package:expect/expect.dart";
-// (1) Test normal exception.
+// (1) Test normal exception.
foo(x) => bar(x);
bar(x) {
@@ -19,8 +19,8 @@ test1() {
Expect.fail("Unreachable");
} catch (e, stacktrace) {
String s = stacktrace.toString();
- Expect.equals(-1, s.indexOf("-1:-1"));
- Expect.notEquals(-1, s.indexOf("11:18"));
+ Expect.isFalse(s.contains("-1:-1"));
+ Expect.isTrue(s.contains("11:18"));
}
// Optimized.
@@ -30,8 +30,8 @@ test1() {
Expect.fail("Unreachable");
} catch (e, stacktrace) {
String s = stacktrace.toString();
- Expect.equals(-1, s.indexOf("-1:-1"));
- Expect.notEquals(-1, s.indexOf("11:18"));
+ Expect.isFalse(s.contains("-1:-1"));
+ Expect.isTrue(s.contains("11:18"));
}
}
@@ -56,9 +56,9 @@ test2() {
} catch (e, stacktrace) {
String s = stacktrace.toString();
print(s);
- Expect.notEquals(-1, s.indexOf("maximus"));
- Expect.notEquals(-1, s.indexOf("moritz"));
- Expect.equals(-1, s.indexOf("-1:-1"));
+ Expect.isTrue(s.contains("maximus"));
+ Expect.isTrue(s.contains("moritz"));
+ Expect.isFalse(s.contains("-1:-1"));
}
try {
@@ -66,9 +66,9 @@ test2() {
} catch (e, stacktrace) {
String s = stacktrace.toString();
print(s);
- Expect.notEquals(-1, s.indexOf("maximus"));
- Expect.notEquals(-1, s.indexOf("moritz"));
- Expect.equals(-1, s.indexOf("-1:-1"));
+ Expect.isTrue(s.contains("maximus"));
+ Expect.isTrue(s.contains("moritz"));
+ Expect.isFalse(s.contains("-1:-1"));
}
}
« no previous file with comments | « runtime/lib/stacktrace_patch.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/core_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698