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 library unittest.returning_future_test; | 5 library unittest.returning_future_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:metatest/metatest.dart'; | 9 import 'package:metatest/metatest.dart'; |
10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 excesscallback(); | 45 excesscallback(); |
46 excesscallback(); | 46 excesscallback(); |
47 callback(); | 47 callback(); |
48 }); | 48 }); |
49 }); | 49 }); |
50 test("fail2", () { | 50 test("fail2", () { |
51 return new Future.sync(() { | 51 return new Future.sync(() { |
52 fail('failure'); | 52 fail('failure'); |
53 }); | 53 }); |
54 }); | 54 }); |
55 test('foo5', () { | 55 test('foo5', () {}); |
56 }); | 56 }, [ |
57 }, [{ | 57 {'result': 'pass'}, |
58 'result': 'pass' | 58 { |
59 }, { | 59 'result': 'fail', |
60 'result': 'fail', | 60 'message': 'Callback called more times than expected (1).' |
61 'message': 'Callback called more times than expected (1).' | 61 }, |
62 }, { | 62 {'result': 'fail', 'message': 'Expected: <false>\n Actual: <true>\n'}, |
63 'result': 'fail', | 63 { |
64 'message': 'Expected: <false>\n Actual: <true>\n' | 64 'result': 'fail', |
65 }, { | 65 'message': 'Callback called more times than expected (1).' |
66 'result': 'fail', | 66 }, |
67 'message': 'Callback called more times than expected (1).' | 67 {'result': 'fail', 'message': 'failure'}, |
68 }, { | 68 {'result': 'pass'} |
69 'result': 'fail', | 69 ]); |
70 'message': 'failure' | |
71 }, { | |
72 'result': 'pass' | |
73 }]); | |
74 } | 70 } |
OLD | NEW |