| OLD | NEW |
| 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 'package:scheduled_test/scheduled_test.dart'; | 5 import 'package:scheduled_test/scheduled_test.dart'; |
| 6 | 6 |
| 7 import 'package:metatest/metatest.dart'; | |
| 8 import '../utils.dart'; | 7 import '../utils.dart'; |
| 9 | 8 |
| 10 void main() { | 9 void main() { |
| 11 expectTestPasses('currentSchedule.currentTask returns the current task while ' | 10 expectTestPasses('currentSchedule.currentTask returns the current task while ' |
| 12 'executing a task', () { | 11 'executing a task', () { |
| 13 schedule(() => expect('foo', equals('foo')), 'task 1'); | 12 schedule(() => expect('foo', equals('foo')), 'task 1'); |
| 14 | 13 |
| 15 schedule(() { | 14 schedule(() { |
| 16 expect(currentSchedule.currentTask.description, equals('task 2')); | 15 expect(currentSchedule.currentTask.description, equals('task 2')); |
| 17 }, 'task 2'); | 16 }, 'task 2'); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 44 }); | 43 }); |
| 45 }); | 44 }); |
| 46 | 45 |
| 47 expectTestPasses('currentSchedule.currentQueue is tasks before the schedule ' | 46 expectTestPasses('currentSchedule.currentQueue is tasks before the schedule ' |
| 48 'has started', () { | 47 'has started', () { |
| 49 schedule(() => expect('foo', equals('foo'))); | 48 schedule(() => expect('foo', equals('foo'))); |
| 50 | 49 |
| 51 expect(currentSchedule.currentQueue.name, equals('tasks')); | 50 expect(currentSchedule.currentQueue.name, equals('tasks')); |
| 52 }); | 51 }); |
| 53 } | 52 } |
| OLD | NEW |