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

Unified Diff: pkg/stack_trace/test/chain_test.dart

Issue 116913003: Chain.terse shouldn't return an empty chain. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | « pkg/stack_trace/lib/src/chain.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/stack_trace/test/chain_test.dart
diff --git a/pkg/stack_trace/test/chain_test.dart b/pkg/stack_trace/test/chain_test.dart
index 4d31acbb47f1964a2407a51d6dc23153042fb943..9c166909e1f65f741a0d774bb445d28ffe7ed355 100644
--- a/pkg/stack_trace/test/chain_test.dart
+++ b/pkg/stack_trace/test/chain_test.dart
@@ -386,6 +386,21 @@ void main() {
'$userSlashCode 10:11 Foo.bar\n'
'dart:core Bar.baz\n'));
});
+
+ test("doesn't return in an empty chain", () {
+ var chain = new Chain([
+ new Trace.parse(
+ 'dart:core 10:11 Foo.bar\n'
+ 'package:stack_trace/stack_trace.dart 10:11 Bar.baz\n'
+ 'dart:core 10:11 Zip.zap'),
+ new Trace.parse(
+ 'dart:core 10:11 A.b\n'
+ 'package:stack_trace/stack_trace.dart 10:11 C.d\n'
+ 'dart:core 10:11 E.f')
+ ]);
+
+ expect(chain.terse.toString(), equals('dart:core E.f\n'));
+ });
});
test('Chain.toTrace eliminates asynchronous gaps', () {
« no previous file with comments | « pkg/stack_trace/lib/src/chain.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698