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

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

Issue 2683033007: Revert "Reapply "Use CodeSourceMap for stack traces (still JIT only)."" (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | runtime/vm/clustered_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tests/vm/dart/inline_stack_frame_test.dart
diff --git a/runtime/tests/vm/dart/inline_stack_frame_test.dart b/runtime/tests/vm/dart/inline_stack_frame_test.dart
index d39795715b44d5d24392fb07d9c412b4ccb88165..e5538553ebe3e2f8f6ce3af36dd3acc8e26df50e 100644
--- a/runtime/tests/vm/dart/inline_stack_frame_test.dart
+++ b/runtime/tests/vm/dart/inline_stack_frame_test.dart
@@ -4,6 +4,8 @@
// VMOptions=--optimization_counter_threshold=10 --no-background-compilation
+import "package:expect/expect.dart";
+
// This test tries to verify that we produce the correct stack trace when
// throwing exceptions even when functions are inlined.
// The test invokes a bunch of functions and then does a throw. There is a
@@ -24,7 +26,7 @@ class Test {
}
return "";
} catch (e, stacktrace) {
- var result = e + "\n" + stacktrace.toString();
+ var result = e + stacktrace.toString();
return result;
}
}
@@ -55,33 +57,22 @@ class Test {
}
}
-expectHasSubstring(String string, String substring) {
- if (!string.contains(substring)) {
- var sb = new StringBuffer();
- sb.writeln("Expect string:");
- sb.writeln(string);
- sb.writeln("To have substring:");
- sb.writeln(substring);
- throw new Exception(sb.toString());
- }
-}
-
main() {
var x = new Test();
var result = x.func1(100000);
- expectHasSubstring(result, "show me inlined functions");
- expectHasSubstring(result, "Test.func1");
- expectHasSubstring(result, "Test.func2");
- expectHasSubstring(result, "Test.func3");
- expectHasSubstring(result, "Test.func4");
- expectHasSubstring(result, "Test.func5");
+ Expect.isTrue(result.contains("show me inlined functions"));
+ Expect.isTrue(result.contains("Test.func1"));
+ Expect.isTrue(result.contains("Test.func2"));
+ Expect.isTrue(result.contains("Test.func3"));
+ Expect.isTrue(result.contains("Test.func4"));
+ Expect.isTrue(result.contains("Test.func"));
for (var i = 0; i <= 10; i++) {
result = x.func1(i);
}
- expectHasSubstring(result, "show me inlined functions");
- expectHasSubstring(result, "Test.func1");
- expectHasSubstring(result, "Test.func2");
- expectHasSubstring(result, "Test.func3");
- expectHasSubstring(result, "Test.func4");
- expectHasSubstring(result, "Test.func5");
+ Expect.isTrue(result.contains("show me inlined functions"));
+ Expect.isTrue(result.contains("Test.func1"));
+ Expect.isTrue(result.contains("Test.func2"));
+ Expect.isTrue(result.contains("Test.func3"));
+ Expect.isTrue(result.contains("Test.func4"));
+ Expect.isTrue(result.contains("Test.func5"));
}
« no previous file with comments | « no previous file | runtime/vm/clustered_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698