OLD | NEW |
---|---|
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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:test/src/backend/state.dart'; | 7 import 'package:test/src/backend/state.dart'; |
8 import 'package:test/test.dart'; | 8 import 'package:test/test.dart'; |
9 | 9 |
10 import '../utils.dart'; | 10 import '../utils.dart'; |
11 | 11 |
12 void main() { | 12 void main() { |
13 group("supports a function with this many arguments:", () { | 13 group("supports a function with this many arguments:", () { |
14 test("0", () async { | 14 test("0", () async { |
15 var callbackRun = false; | 15 var callbackRun = false; |
16 throw 'dang toots'; | |
kevmoo
2015/08/13 22:44:30
Qua?
nweiz
2015/08/13 22:46:20
Oops, testing thing. Removed.
| |
16 var liveTest = await runTestBody(() { | 17 var liveTest = await runTestBody(() { |
17 expectAsync(() { | 18 expectAsync(() { |
18 callbackRun = true; | 19 callbackRun = true; |
19 })(); | 20 })(); |
20 }); | 21 }); |
21 | 22 |
22 expectTestPassed(liveTest); | 23 expectTestPassed(liveTest); |
23 expect(callbackRun, isTrue); | 24 expect(callbackRun, isTrue); |
24 }); | 25 }); |
25 | 26 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
323 caughtError = true; | 324 caughtError = true; |
324 } | 325 } |
325 }); | 326 }); |
326 | 327 |
327 expectTestFailed(liveTest, 'oh no'); | 328 expectTestFailed(liveTest, 'oh no'); |
328 expect(returnValue, isNull); | 329 expect(returnValue, isNull); |
329 expect(caughtError, isFalse); | 330 expect(caughtError, isFalse); |
330 }); | 331 }); |
331 }); | 332 }); |
332 } | 333 } |
OLD | NEW |