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

Unified Diff: pkg/unittest/test/unittest_test.dart

Issue 10946038: Fixed a nasty bug in unittest, where is we have a non-async test that throws an exception, followed… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | pkg/unittest/unittest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test/unittest_test.dart
===================================================================
--- pkg/unittest/test/unittest_test.dart (revision 12573)
+++ pkg/unittest/test/unittest_test.dart (working copy)
@@ -139,6 +139,16 @@
test('testTwo', () {
_defer(expectAsync0(() {}));
});
+ } else if (testName == 'middle exception test') {
+ test('testOne', () { expect(true, isTrue); });
+ test('testTwo', () { expect(true, isFalse); });
+ test('testThree', () {
+ var done = expectAsync0((){});
+ _defer(() {
+ expect(true, isTrue);
+ done();
+ });
+ });
}
});
}
@@ -170,7 +180,8 @@
'excess callback test',
'completion test',
'async exception test',
- 'late exception test'
+ 'late exception test',
+ 'middle exception test'
];
expected = [
@@ -188,7 +199,8 @@
message: 'Callback called more times than expected (2 > 1).'),
buildStatusString(1, 0, 0, tests[9], 10),
buildStatusString(0, 1, 0, tests[10], message: 'Caught error!'),
- buildStatusString(1, 0, 1, 'testOne', message: 'Callback called after already being marked as done (1).:testTwo:')
+ buildStatusString(1, 0, 1, 'testOne', message: 'Callback called after already being marked as done (1).:testTwo:'),
+ buildStatusString(2, 1, 0, 'testOne::testTwo:Expected: false but: was <true>.:testThree')
];
actual = [];
« no previous file with comments | « no previous file | pkg/unittest/unittest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698