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

Side by Side Diff: test/with_test_environment_test.dart

Issue 846143003: Reformatted code (Closed) Base URL: https://github.com/dart-lang/unittest.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « test/skipped_soloed_nested_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.with_test_environment_test; 5 library unittest.with_test_environment_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 9
10 class TestConfiguration extends SimpleConfiguration { 10 class TestConfiguration extends SimpleConfiguration {
11 final Completer _completer = new Completer(); 11 final Completer _completer = new Completer();
12 List<TestCase> _results; 12 List<TestCase> _results;
13 13
14 TestConfiguration(); 14 TestConfiguration();
15 15
16 void onSummary(int passed, int failed, int errors, List<TestCase> results, 16 void onSummary(int passed, int failed, int errors, List<TestCase> results,
17 String uncaughtError) { 17 String uncaughtError) {
18 super.onSummary(passed, failed, errors, results, uncaughtError); 18 super.onSummary(passed, failed, errors, results, uncaughtError);
19 _results = results; 19 _results = results;
20 } 20 }
21 21
22 Future get done => _completer.future; 22 Future get done => _completer.future;
23 23
24 onDone(success) { 24 onDone(success) {
25 new Future.sync(() => super.onDone(success)) 25 new Future.sync(() => super.onDone(success))
26 .then(_completer.complete) 26 .then(_completer.complete)
27 .catchError(_completer.completeError); 27 .catchError(_completer.completeError);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 }); 75 });
76 76
77 // Third test that we can run with two nested test environments. 77 // Third test that we can run with two nested test environments.
78 withTestEnvironment(() { 78 withTestEnvironment(() {
79 runUnittests(runTests); 79 runUnittests(runTests);
80 withTestEnvironment(() { 80 withTestEnvironment(() {
81 runUnittests(runTests1); 81 runUnittests(runTests1);
82 }); 82 });
83 }); 83 });
84 } 84 }
OLDNEW
« no previous file with comments | « test/skipped_soloed_nested_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698