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

Side by Side Diff: pkg/scheduled_test/test/scheduled_test/nested_task_test.dart

Issue 54723005: Fix a broken scheduled_test test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/scheduled_test/test/metatest.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:scheduled_test/scheduled_test.dart'; 7 import 'package:scheduled_test/scheduled_test.dart';
8 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock; 8 import 'package:scheduled_test/src/mock_clock.dart' as mock_clock;
9 9
10 import '../metatest.dart'; 10 import '../metatest.dart';
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 }); 83 });
84 84
85 test('test 2', () { 85 test('test 2', () {
86 expect(errors, everyElement(new isInstanceOf<ScheduleError>())); 86 expect(errors, everyElement(new isInstanceOf<ScheduleError>()));
87 expect(errors.map((e) => e.error), equals(['error'])); 87 expect(errors.map((e) => e.error), equals(['error']));
88 }); 88 });
89 }, passing: ['test 2']); 89 }, passing: ['test 2']);
90 90
91 expectTestsPass("nested scheduled blocks whose return values are passed to " 91 expectTestsPass("nested scheduled blocks whose return values are passed to "
92 "wrapFuture should report exceptions once", () { 92 "wrapFuture should report exceptions once", () {
93 var error = new Object(); 93 var error = 'oh no!';
94 var errors; 94 var errors;
95 test('test 1', () { 95 test('test 1', () {
96 currentSchedule.onException.schedule(() { 96 currentSchedule.onException.schedule(() {
97 errors = currentSchedule.errors; 97 errors = currentSchedule.errors;
98 }); 98 });
99 99
100 schedule(() { 100 schedule(() {
101 wrapFuture(schedule(() { 101 wrapFuture(schedule(() {
102 throw error; 102 throw error;
103 })); 103 }));
(...skipping 26 matching lines...) Expand all
130 parentTaskFinished = true; 130 parentTaskFinished = true;
131 }); 131 });
132 }); 132 });
133 }); 133 });
134 134
135 test('test 2', () { 135 test('test 2', () {
136 expect(parentTaskFinishedBeforeOnComplete, isTrue); 136 expect(parentTaskFinishedBeforeOnComplete, isTrue);
137 }); 137 });
138 }, passing: ['test 2']); 138 }, passing: ['test 2']);
139 } 139 }
OLDNEW
« no previous file with comments | « pkg/scheduled_test/test/metatest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698