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

Unified Diff: lib/src/util/io.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 side-by-side diff with in-line comments
Download patch
Index: lib/src/util/io.dart
diff --git a/lib/src/util/io.dart b/lib/src/util/io.dart
index 9a00ad642be035a69a0a350f4eebd6ecb4b48bc3..c14e32f56bc86eda13003b87f9b34482c18a9654 100644
--- a/lib/src/util/io.dart
+++ b/lib/src/util/io.dart
@@ -10,12 +10,22 @@ import 'dart:mirrors';
import 'package:path/path.dart' as p;
+import '../backend/operating_system.dart';
import '../runner/load_exception.dart';
/// The root directory of the Dart SDK.
final String sdkDir =
p.dirname(p.dirname(Platform.executable));
+/// Returns the current operating system.
+final OperatingSystem currentOS = (() {
+ var name = Platform.operatingSystem;
+ var os = OperatingSystem.findByIoName(name);
+ if (os != null) return os;
+
+ throw new UnsupportedError('Unsupported operating system "$name".');
+})();
+
/// The path to the `lib` directory of the `unittest` package.
String libDir({String packageRoot}) {
var pathToIo = libraryPath(#unittest.util.io, packageRoot: packageRoot);

Powered by Google App Engine
This is Rietveld 408576698