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

Unified Diff: tests/language/full_stacktrace1_test.dart

Issue 14009004: Remove methods on StackTrace class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: tests/language/full_stacktrace1_test.dart
diff --git a/tests/language/full_stacktrace1_test.dart b/tests/language/full_stacktrace1_test.dart
index 4bef00e191ebfcedc0d60866b8b23fa6ac69789c..08cfa64b78fcc898c7642fe0e53444836839d613 100644
--- a/tests/language/full_stacktrace1_test.dart
+++ b/tests/language/full_stacktrace1_test.dart
@@ -4,8 +4,11 @@
import "package:expect/expect.dart";
+// This test assumes that all called functions occur in the stack trace.
+// This might not be the case if inlining methods.
+
void func1() {
- throw new Exception("Test peanut gallery request for Full stacktrace");
+ throw new Exception("Test full stacktrace");
}
void func2() {
func1();
@@ -14,9 +17,7 @@ void func3() {
try {
func2();
} on Object catch(e, s) {
- print(e);
-
- var full_trace = s.fullStackTrace;
+ var full_trace = s.toString();
kasperl 2013/04/11 09:29:48 full_trace -> fullTrace
Expect.isTrue(full_trace.contains("func1"));
Expect.isTrue(full_trace.contains("func2"));
Expect.isTrue(full_trace.contains("func3"));
@@ -24,24 +25,6 @@ void func3() {
Expect.isTrue(full_trace.contains("func5"));
Expect.isTrue(full_trace.contains("func6"));
Expect.isTrue(full_trace.contains("main"));
-
- var trace = s.stackTrace;
- Expect.isTrue(trace.contains("func1"));
- Expect.isTrue(trace.contains("func2"));
- Expect.isTrue(trace.contains("func3"));
-
- Expect.isFalse(trace.contains("func4"));
- Expect.isFalse(trace.contains("func5"));
- Expect.isFalse(trace.contains("func6"));
- Expect.isFalse(trace.contains("main"));
-
- print(s);
-
- print("Full stack trace");
- print(full_trace);
-
- print("Stack trace");
- print(trace);
}
}
int func4() {

Powered by Google App Engine
This is Rietveld 408576698