Index: pkg/scheduled_test/test/scheduled_test/nested_task_test.dart |
diff --git a/pkg/scheduled_test/test/scheduled_test/nested_task_test.dart b/pkg/scheduled_test/test/scheduled_test/nested_task_test.dart |
index 2e7a10b4752006b8baed729e04b3b602e8c30bd6..047cd3bd862527a80dd42e3e5421b6865198e7f9 100644 |
--- a/pkg/scheduled_test/test/scheduled_test/nested_task_test.dart |
+++ b/pkg/scheduled_test/test/scheduled_test/nested_task_test.dart |
@@ -89,6 +89,7 @@ void main() { |
expectTestsPass("nested scheduled blocks whose return values are passed to " |
"wrapFuture should report exceptions once", () { |
+ var error = new Object(); |
var errors; |
test('test 1', () { |
currentSchedule.onException.schedule(() { |
@@ -97,7 +98,7 @@ void main() { |
schedule(() { |
wrapFuture(schedule(() { |
- throw 'error'; |
+ throw error; |
})); |
return pumpEventQueue(); |
@@ -106,7 +107,7 @@ void main() { |
test('test 2', () { |
expect(errors, everyElement(new isInstanceOf<ScheduleError>())); |
- expect(errors.map((e) => e.error), equals(['error'])); |
+ expect(errors.map((e) => e.error), equals([error])); |
}); |
}, passing: ['test 2']); |