| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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'; | |
| 6 | |
| 7 import 'package:scheduled_test/scheduled_test.dart'; | 5 import 'package:scheduled_test/scheduled_test.dart'; |
| 8 | 6 |
| 9 import 'utils.dart'; | 7 import '../utils.dart'; |
| 10 | 8 |
| 11 main() { | 9 sharedTests() { |
| 12 initConfig(); | |
| 13 | |
| 14 setUp(createSandbox); | |
| 15 | |
| 16 test('ready does not complete until after subscription', () { | 10 test('ready does not complete until after subscription', () { |
| 17 var watcher = createWatcher(waitForReady: false); | 11 var watcher = createWatcher(waitForReady: false); |
| 18 | 12 |
| 19 var ready = false; | 13 var ready = false; |
| 20 watcher.ready.then((_) { | 14 watcher.ready.then((_) { |
| 21 ready = true; | 15 ready = true; |
| 22 }); | 16 }); |
| 23 | 17 |
| 24 // Should not be ready yet. | 18 // Should not be ready yet. |
| 25 schedule(() { | 19 schedule(() { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 ready = true; | 89 ready = true; |
| 96 }); | 90 }); |
| 97 }); | 91 }); |
| 98 | 92 |
| 99 // Should be back to not ready. | 93 // Should be back to not ready. |
| 100 schedule(() { | 94 schedule(() { |
| 101 expect(ready, isFalse); | 95 expect(ready, isFalse); |
| 102 }); | 96 }); |
| 103 }); | 97 }); |
| 104 } | 98 } |
| OLD | NEW |