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

Unified Diff: test/utils.dart

Issue 933083002: Add a test runner executable. (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 | « test/runner_test.dart ('k') | test/vm_listener_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/utils.dart
diff --git a/test/utils.dart b/test/utils.dart
index f9b4075d70df066393024421491889b9a0561c3b..64a3da7101a1c4781ad48037ee6d04dfd605ede5 100644
--- a/test/utils.dart
+++ b/test/utils.dart
@@ -8,6 +8,7 @@ import 'dart:async';
import 'dart:collection';
import 'package:unittest/src/live_test.dart';
+import 'package:unittest/src/load_exception.dart';
import 'package:unittest/src/remote_exception.dart';
import 'package:unittest/src/state.dart';
import 'package:unittest/unittest.dart';
@@ -71,6 +72,11 @@ Matcher isRemoteException(String message) => predicate(
(error) => error is RemoteException && error.message == message,
'is a RemoteException with message "$message"');
+/// Returns a matcher that matches a [LoadException] with the given [message].
+Matcher isLoadException(String message) => predicate(
+ (error) => error is LoadException && error.innerError == message,
+ 'is a LoadException with message "$message"');
+
/// Returns a [Future] that completes after pumping the event queue [times]
/// times.
///
« no previous file with comments | « test/runner_test.dart ('k') | test/vm_listener_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698