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

Side by Side Diff: lib/src/backend/metadata.dart

Issue 1027193004: Respect top-level @TestOn declarations. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Add another test. 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.backend.metadata; 5 library unittest.backend.metadata;
6 6
7 import 'platform_selector.dart';
8
7 /// Metadata for a test or test suite. 9 /// Metadata for a test or test suite.
8 /// 10 ///
9 /// This metadata comes from declarations on the test itself; it doesn't include 11 /// This metadata comes from declarations on the test itself; it doesn't include
10 /// configuration from the user. 12 /// configuration from the user.
11 class Metadata { 13 class Metadata {
12 /// The expressions indicating which platforms the suite supports. 14 /// The selector indicating which platforms the suite supports.
13 final String testOn; 15 final PlatformSelector testOn;
14 16
15 Metadata(this.testOn); 17 /// Creates new Metadata.
18 ///
19 /// [testOn] defaults to [PlatformSelector.all].
20 Metadata({PlatformSelector testOn})
21 : testOn = testOn == null ? PlatformSelector.all : testOn;
22
23 /// Parses metadata fields from strings.
24 ///
25 /// Throws a [FormatException] if any field is invalid.
26 Metadata.parse({String testOn})
27 : this(
28 testOn: testOn == null ? null : new PlatformSelector.parse(testOn));
16 } 29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698