| OLD | NEW |
| (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) |
| 18 s = new StringBuffer(); |
| 19 }); |
| 20 test('top level', () { |
| 21 s.write('A'); |
| 22 }); |
| 23 skip_test('skipped top level', () { |
| 24 s.write('B'); |
| 25 }); |
| 26 skip_group('skipped top level group', () { |
| 27 setUp(() { |
| 28 s.write('C'); |
| 29 }); |
| 30 solo_test('skipped solo nested test', () { |
| 31 s.write('D'); |
| 32 }); |
| 33 }); |
| 34 group('non-solo group', () { |
| 35 setUp(() { |
| 36 s.write('E'); |
| 37 }); |
| 38 test('in non-solo group', () { |
| 39 s.write('F'); |
| 40 }); |
| 41 solo_test('solo_test in non-solo group', () { |
| 42 s.write('G'); |
| 43 }); |
| 44 }); |
| 45 solo_group('solo group', () { |
| 46 setUp(() { |
| 47 s.write('H'); |
| 48 }); |
| 49 test('solo group non-solo test', () { |
| 50 s.write('I'); |
| 51 }); |
| 52 solo_test('solo group solo test', () { |
| 53 s.write('J'); |
| 54 }); |
| 55 group('nested non-solo group in solo group', () { |
| 56 test('nested non-solo group non-solo test', () { |
| 57 s.write('K'); |
| 58 }); |
| 59 solo_test('nested non-solo group solo test', () { |
| 60 s.write('L'); |
| 61 }); |
| 62 }); |
| 63 }); |
| 64 solo_test('final', () { |
| 65 expect(s.toString(), "EGHIHJHKHL"); |
| 66 }); |
| 67 }; |
| 68 |
| 69 var expected = buildStatusString(6, 0, 0, |
| 70 'non-solo group solo_test in non-solo group::' |
| 71 'solo group solo group non-solo test::' |
| 72 'solo group solo group solo test::' |
| 73 'solo group nested non-solo group in solo group nested non-' |
| 74 'solo group non-solo test::' |
| 75 'solo group nested non-solo group in solo' |
| 76 ' group nested non-solo group solo test::' |
| 77 'final'); |
| OLD | NEW |