| Index: lib/src/backend/test_platform.dart
|
| diff --git a/lib/src/runner/test_platform.dart b/lib/src/backend/test_platform.dart
|
| similarity index 52%
|
| rename from lib/src/runner/test_platform.dart
|
| rename to lib/src/backend/test_platform.dart
|
| index 406dad0cefc4ebef5222cde9bb661282007de23d..a52d3075fa91011cd0e8b2891cc76c96c8c5b3e8 100644
|
| --- a/lib/src/runner/test_platform.dart
|
| +++ b/lib/src/backend/test_platform.dart
|
| @@ -2,14 +2,20 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| +library unittest.backend.test_platform;
|
| +
|
| // TODO(nweiz): support pluggable platforms.
|
| /// An enum of all platforms on which tests can run.
|
| class TestPlatform {
|
| + // When adding new platforms, be sure to update the baseline and derived
|
| + // variable tests in test/backend/platform_selector/evaluate_test.
|
| +
|
| /// The command-line Dart VM.
|
| - static const vm = const TestPlatform._("VM", "vm");
|
| + static const vm = const TestPlatform._("VM", "vm", isDartVm: true);
|
|
|
| /// Google Chrome.
|
| - static const chrome = const TestPlatform._("Chrome", "chrome");
|
| + static const chrome = const TestPlatform._("Chrome", "chrome",
|
| + isBrowser: true, isJS: true, isBlink: true);
|
|
|
| /// A list of all instances of [TestPlatform].
|
| static const all = const [vm, chrome];
|
| @@ -27,7 +33,20 @@ class TestPlatform {
|
| /// The identifier used to look up the platform.
|
| final String identifier;
|
|
|
| - const TestPlatform._(this.name, this.identifier);
|
| + /// Whether this platform runs the Dart VM in any capacity.
|
| + final bool isDartVm;
|
| +
|
| + /// Whether this platform is a browser.
|
| + final bool isBrowser;
|
| +
|
| + /// Whether this platform runs Dart compiled to JavaScript.
|
| + final bool isJS;
|
| +
|
| + /// Whether this platform uses the Blink rendering engine.
|
| + final bool isBlink;
|
| +
|
| + const TestPlatform._(this.name, this.identifier, {this.isDartVm: false,
|
| + this.isBrowser: false, this.isJS: false, this.isBlink: false});
|
|
|
| String toString() => name;
|
| }
|
|
|