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

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

Issue 13472016: Split apart several asynchronous tests to reduce timeouts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:async';
6 import 'dart:io';
7
8 import 'package:scheduled_test/scheduled_test.dart';
9
10 import '../metatest.dart';
11 import '../utils.dart';
12
13 void main() {
14 setUpTimeout();
15
16 expectTestsPass('currentSchedule.state starts out as SET_UP', () {
17 test('test', () {
18 expect(currentSchedule.state, equals(ScheduleState.SET_UP));
19 });
20 });
21
22 expectTestsPass('currentSchedule.state is RUNNING in tasks', () {
23 test('test', () {
24 schedule(() {
25 expect(currentSchedule.state, equals(ScheduleState.RUNNING));
26 });
27
28 currentSchedule.onComplete.schedule(() {
29 expect(currentSchedule.state, equals(ScheduleState.RUNNING));
30 });
31 });
32 });
33
34 expectTestsPass('currentSchedule.state is DONE after the test', () {
35 var oldSchedule;
36 test('test 1', () {
37 oldSchedule = currentSchedule;
38 });
39
40 test('test 2', () {
41 expect(oldSchedule.state, equals(ScheduleState.DONE));
42 });
43 });
44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698