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

Unified Diff: pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart

Issue 227193002: pkg/scheduled_test: handle null currentSchedule due to timeout (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: added test Created 6 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: pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart
diff --git a/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart b/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart
index 048745ddbea01962ea143e10181ebf1d7e6832d9..39a2fcf51674b6711b9219c17b96ffae1421d92b 100644
--- a/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart
+++ b/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart
@@ -13,6 +13,20 @@ void main(_, message) {
setUpTimeout();
+ expectTests('a scheduled test with an out-of-band error should fail', () {
+ test('test 1', () {
+ pumpEventQueue().then((_) => throw 'error');
+
+ return pumpEventQueue();
+ });
+
+ test('test 2', () {
+ schedule(() {
+ return pumpEventQueue();
+ });
+ });
+ }, {'test 1': ERROR, 'test 2': PASS});
nweiz 2014/04/08 19:27:36 Where are ERROR and PASS defined?
kevmoo 2014/04/08 20:17:51 toplevel consts in unittest
+
expectTestsPass('currentSchedule.errors contains the error in the onComplete '
'queue', () {
var errors;
« pkg/scheduled_test/test/metatest.dart ('K') | « pkg/scheduled_test/test/metatest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698