Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: third_party/dart-packages/unittest/unittest/unittest.dart

Issue 971083002: Create an apptesting framework for dart. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 '../matcher/matcher.dart' show TestFailure, wrapAsync; 10 import 'package:matcher/matcher.dart' show TestFailure, wrapAsync;
11 11
12 import 'src/configuration.dart'; 12 import 'src/configuration.dart';
13 import 'src/expected_function.dart'; 13 import 'src/expected_function.dart';
14 import 'src/group_context.dart'; 14 import 'src/group_context.dart';
15 import 'src/internal_test_case.dart'; 15 import 'src/internal_test_case.dart';
16 import 'src/test_case.dart'; 16 import 'src/test_case.dart';
17 import 'src/test_environment.dart'; 17 import 'src/test_environment.dart';
18 18
19 export '../matcher/matcher.dart'; 19 export 'package:matcher/matcher.dart';
20 20
21 export 'src/configuration.dart'; 21 export 'src/configuration.dart';
22 export 'src/simple_configuration.dart'; 22 export 'src/simple_configuration.dart';
23 export 'src/test_case.dart'; 23 export 'src/test_case.dart';
24 24
25 /// The signature for a function passed to [test]. 25 /// The signature for a function passed to [test].
26 typedef dynamic TestFunction(); 26 typedef dynamic TestFunction();
27 27
28 /// [Configuration] used by the unittest library. 28 /// [Configuration] used by the unittest library.
29 /// 29 ///
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 /// Creates a test environment running in its own zone scope. 433 /// Creates a test environment running in its own zone scope.
434 /// 434 ///
435 /// This allows for multiple invocations of the unittest library in the same 435 /// This allows for multiple invocations of the unittest library in the same
436 /// application instance. This is useful when, for example, creating a test 436 /// application instance. This is useful when, for example, creating a test
437 /// runner application which needs to create a new pristine test environment on 437 /// runner application which needs to create a new pristine test environment on
438 /// each invocation to run a given set of tests. 438 /// each invocation to run a given set of tests.
439 withTestEnvironment(callback()) { 439 withTestEnvironment(callback()) {
440 return runZoned(callback, 440 return runZoned(callback,
441 zoneValues: {#unittest.environment: new TestEnvironment()}); 441 zoneValues: {#unittest.environment: new TestEnvironment()});
442 } 442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698