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

Side by Side Diff: pkg/unittest/lib/html_individual_config.dart

Issue 13046006: Allow 'empty' tests if a feature is not supported in the browser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 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 /** 5 /**
6 * A unit test library for running groups of tests in a browser, instead of the 6 * A unit test library for running groups of tests in a browser, instead of the
7 * entire test file. This is especially used for large tests files that have 7 * entire test file. This is especially used for large tests files that have
8 * many subtests, so we can mark groups as failing at a finer granularity than 8 * many subtests, so we can mark groups as failing at a finer granularity than
9 * the entire test file. 9 * the entire test file.
10 * 10 *
(...skipping 19 matching lines...) Expand all
30 30
31 if(!groups.isEmpty) { 31 if(!groups.isEmpty) {
32 if(groups.length > 1) { 32 if(groups.length > 1) {
33 throw 'More than one "group" parameter provided.'; 33 throw 'More than one "group" parameter provided.';
34 } 34 }
35 35
36 var testGroupName = groups.single.split('=')[1]; 36 var testGroupName = groups.single.split('=')[1];
37 var startsWith = "$testGroupName${unittest.groupSep}"; 37 var startsWith = "$testGroupName${unittest.groupSep}";
38 unittest.filterTests((unittest.TestCase tc) => 38 unittest.filterTests((unittest.TestCase tc) =>
39 tc.description.startsWith(startsWith)); 39 tc.description.startsWith(startsWith));
40
41
42 /*if(unittest.testCases.isEmpty) {
43 throw 'No tests match group "$testGroupName".';
44 }*/
45 } 40 }
46 } 41 }
47 super.onStart(); 42 super.onStart();
48 } 43 }
49 } 44 }
50 45
51 void useHtmlIndividualConfiguration([bool isLayoutTest = false]) { 46 void useHtmlIndividualConfiguration([bool isLayoutTest = false]) {
52 unittest.unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonN otLayout; 47 unittest.unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonN otLayout;
53 } 48 }
54 49
55 final _singletonLayout = new HtmlIndividualConfiguration(true); 50 final _singletonLayout = new HtmlIndividualConfiguration(true);
56 final _singletonNotLayout = new HtmlIndividualConfiguration(false); 51 final _singletonNotLayout = new HtmlIndividualConfiguration(false);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698