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 test; | 5 library test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:path/path.dart' as p; | 9 import 'package:path/path.dart' as p; |
10 | 10 |
11 import 'src/backend/declarer.dart'; | 11 import 'src/backend/declarer.dart'; |
12 import 'src/backend/invoker.dart'; | 12 import 'src/backend/invoker.dart'; |
13 import 'src/backend/suite.dart'; | 13 import 'src/backend/suite.dart'; |
14 import 'src/backend/test_platform.dart'; | 14 import 'src/backend/test_platform.dart'; |
15 import 'src/frontend/timeout.dart'; | 15 import 'src/frontend/timeout.dart'; |
16 import 'src/runner/reporter/no_io_compact.dart'; | 16 import 'src/runner/reporter/no_io_compact.dart'; |
17 import 'src/utils.dart'; | 17 import 'src/utils.dart'; |
18 | 18 |
19 export 'package:matcher/matcher.dart'; | 19 export 'package:matcher/matcher.dart'; |
20 | 20 |
21 export 'src/frontend/expect.dart'; | 21 export 'src/frontend/expect.dart'; |
22 export 'src/frontend/expect_async.dart'; | 22 export 'src/frontend/expect_async.dart'; |
23 export 'src/frontend/future_matchers.dart'; | 23 export 'src/frontend/future_matchers.dart'; |
| 24 export 'src/frontend/on_platform.dart'; |
24 export 'src/frontend/prints_matcher.dart'; | 25 export 'src/frontend/prints_matcher.dart'; |
25 export 'src/frontend/skip.dart'; | 26 export 'src/frontend/skip.dart'; |
26 export 'src/frontend/test_on.dart'; | 27 export 'src/frontend/test_on.dart'; |
27 export 'src/frontend/throws_matcher.dart'; | 28 export 'src/frontend/throws_matcher.dart'; |
28 export 'src/frontend/throws_matchers.dart'; | 29 export 'src/frontend/throws_matchers.dart'; |
29 export 'src/frontend/timeout.dart'; | 30 export 'src/frontend/timeout.dart'; |
30 | 31 |
31 /// The global declarer. | 32 /// The global declarer. |
32 /// | 33 /// |
33 /// This is used if a test file is run directly, rather than through the runner. | 34 /// This is used if a test file is run directly, rather than through the runner. |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 169 |
169 /// Handle an error that occurs outside of any test. | 170 /// Handle an error that occurs outside of any test. |
170 void handleExternalError(error, String message, [stackTrace]) { | 171 void handleExternalError(error, String message, [stackTrace]) { |
171 // TODO(nweiz): handle this better. | 172 // TODO(nweiz): handle this better. |
172 registerException(error, stackTrace); | 173 registerException(error, stackTrace); |
173 } | 174 } |
174 | 175 |
175 /// Registers an exception that was caught for the current test. | 176 /// Registers an exception that was caught for the current test. |
176 void registerException(error, [StackTrace stackTrace]) => | 177 void registerException(error, [StackTrace stackTrace]) => |
177 Invoker.current.handleError(error, stackTrace); | 178 Invoker.current.handleError(error, stackTrace); |
OLD | NEW |