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

Unified Diff: test/io.dart

Issue 918853005: Get new tests working on dart2js. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Code review changes Created 5 years, 10 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
« no previous file with comments | « lib/src/invoker.dart ('k') | test/loader_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/io.dart
diff --git a/test/io.dart b/test/io.dart
new file mode 100644
index 0000000000000000000000000000000000000000..3868981cf6cde478ee0da2ab376370c052da1678
--- /dev/null
+++ b/test/io.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// 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.test.io;
+
+import 'dart:io';
+
+import 'package:path/path.dart' as p;
+import 'package:stack_trace/stack_trace.dart';
+
+/// The root directory of the `unittest` package.
+final String packageDir = _computePackageDir();
+String _computePackageDir() {
+ var trace = new Trace.current();
+ return p.dirname(p.dirname(p.fromUri(trace.frames.first.uri)));
+}
+
+/// Returns a matcher that matches a [FileSystemException] with the given
+/// [message].
+Matcher isFileSystemException(String message) => predicate(
+ (error) => error is FileSystemException && error.message == message,
+ 'is a FileSystemException with message "$message"');
+
« no previous file with comments | « lib/src/invoker.dart ('k') | test/loader_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698