| 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; | 5 library unittest; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:matcher/matcher.dart' show TestFailure, wrapAsync; | |
| 11 | |
| 12 import 'src/configuration.dart'; | 10 import 'src/configuration.dart'; |
| 13 import 'src/expected_function.dart'; | 11 import 'src/expected_function.dart'; |
| 14 import 'src/group_context.dart'; | 12 import 'src/group_context.dart'; |
| 15 import 'src/internal_test_case.dart'; | 13 import 'src/internal_test_case.dart'; |
| 14 import 'src/matcher.dart' show TestFailure, wrapAsync; |
| 16 import 'src/test_case.dart'; | 15 import 'src/test_case.dart'; |
| 17 import 'src/test_environment.dart'; | 16 import 'src/test_environment.dart'; |
| 18 | 17 |
| 19 export 'package:matcher/matcher.dart'; | |
| 20 | |
| 21 export 'src/configuration.dart'; | 18 export 'src/configuration.dart'; |
| 19 export 'src/matcher.dart'; |
| 22 export 'src/simple_configuration.dart'; | 20 export 'src/simple_configuration.dart'; |
| 23 export 'src/test_case.dart'; | 21 export 'src/test_case.dart'; |
| 24 | 22 |
| 25 /// The signature for a function passed to [test]. | 23 /// The signature for a function passed to [test]. |
| 26 typedef dynamic TestFunction(); | 24 typedef dynamic TestFunction(); |
| 27 | 25 |
| 28 /// [Configuration] used by the unittest library. | 26 /// [Configuration] used by the unittest library. |
| 29 /// | 27 /// |
| 30 /// Note that if a configuration has not been set, calling this getter will | 28 /// Note that if a configuration has not been set, calling this getter will |
| 31 /// create a default configuration. | 29 /// create a default configuration. |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 /// Creates a test environment running in its own zone scope. | 431 /// Creates a test environment running in its own zone scope. |
| 434 /// | 432 /// |
| 435 /// This allows for multiple invocations of the unittest library in the same | 433 /// This allows for multiple invocations of the unittest library in the same |
| 436 /// application instance. This is useful when, for example, creating a test | 434 /// application instance. This is useful when, for example, creating a test |
| 437 /// runner application which needs to create a new pristine test environment on | 435 /// runner application which needs to create a new pristine test environment on |
| 438 /// each invocation to run a given set of tests. | 436 /// each invocation to run a given set of tests. |
| 439 withTestEnvironment(callback()) { | 437 withTestEnvironment(callback()) { |
| 440 return runZoned(callback, | 438 return runZoned(callback, |
| 441 zoneValues: {#unittest.environment: new TestEnvironment()}); | 439 zoneValues: {#unittest.environment: new TestEnvironment()}); |
| 442 } | 440 } |
| OLD | NEW |