Chromium Code Reviews| 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:", () |
|
kevmoo
2015/06/10 14:24:10
Oops?
nweiz
2015/06/10 21:22:01
Done.
| |
| 14 test("0", () async { | 14 test("0", () async { |
| 15 var callbackRun = false; | 15 var callbackRun = false; |
| 16 var liveTest = await runTestBody(() { | 16 var liveTest = await runTestBody(() { |
| 17 expectAsync(() { | 17 expectAsync(() { |
| 18 callbackRun = true; | 18 callbackRun = true; |
| 19 })(); | 19 })(); |
| 20 }); | 20 }); |
| 21 | 21 |
| 22 expectTestPassed(liveTest); | 22 expectTestPassed(liveTest); |
| 23 expect(callbackRun, isTrue); | 23 expect(callbackRun, isTrue); |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 323 caughtError = true; | 323 caughtError = true; |
| 324 } | 324 } |
| 325 }); | 325 }); |
| 326 | 326 |
| 327 expectTestFailed(liveTest, 'oh no'); | 327 expectTestFailed(liveTest, 'oh no'); |
| 328 expect(returnValue, isNull); | 328 expect(returnValue, isNull); |
| 329 expect(caughtError, isFalse); | 329 expect(caughtError, isFalse); |
| 330 }); | 330 }); |
| 331 }); | 331 }); |
| 332 } | 332 } |
| OLD | NEW |