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

Side by Side Diff: pkg/unittest/test/unittest_skipped_soloed_nested_test.dart

Issue 319983005: pkg/unittest: test cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library unittestTest;
6 import 'dart:isolate';
7 import 'dart:async';
8 import 'package:unittest/unittest.dart';
9
10 part 'unittest_test_utils.dart';
11
12 var testName = 'skipped/soloed nested groups with setup/teardown';
13
14 var testFunction = (_) {
15 StringBuffer s = null;
16 setUp(() {
17 if (s == null) s = new StringBuffer();
18 });
19 test('top level', () {
20 s.write('A');
21 });
22 skip_test('skipped top level', () {
23 s.write('B');
24 });
25 skip_group('skipped top level group', () {
26 setUp(() {
27 s.write('C');
28 });
29 solo_test('skipped solo nested test', () {
30 s.write('D');
31 });
32 });
33 group('non-solo group', () {
34 setUp(() {
35 s.write('E');
36 });
37 test('in non-solo group', () {
38 s.write('F');
39 });
40 solo_test('solo_test in non-solo group', () {
41 s.write('G');
42 });
43 });
44 solo_group('solo group', () {
45 setUp(() {
46 s.write('H');
47 });
48 test('solo group non-solo test', () {
49 s.write('I');
50 });
51 solo_test('solo group solo test', () {
52 s.write('J');
53 });
54 group('nested non-solo group in solo group', () {
55 test('nested non-solo group non-solo test', () {
56 s.write('K');
57 });
58 solo_test('nested non-solo group solo test', () {
59 s.write('L');
60 });
61 });
62 });
63 solo_test('final', () {
64 expect(s.toString(), "EGHIHJHKHL");
65 });
66 };
67
68 var expected = buildStatusString(6, 0, 0,
69 'non-solo group solo_test in non-solo group::'
70 'solo group solo group non-solo test::'
71 'solo group solo group solo test::'
72 'solo group nested non-solo group in solo group nested non-'
73 'solo group non-solo test::'
74 'solo group nested non-solo group in solo'
75 ' group nested non-solo group solo test::'
76 'final');
OLDNEW
« no previous file with comments | « pkg/unittest/test/unittest_single_failing_test.dart ('k') | pkg/unittest/test/unittest_teardown_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698