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

Unified Diff: pkg/unittest/lib/src/expect.dart

Issue 12328143: pkg/unittest: Moved `fail` to matcher library (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes to align with r19166 Created 7 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 | « pkg/unittest/lib/src/core_matchers.dart ('k') | pkg/unittest/lib/src/future_matchers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/expect.dart
diff --git a/pkg/unittest/lib/src/expect.dart b/pkg/unittest/lib/src/expect.dart
index 49561476f038aa1d8973899e279f7a879ed64920..c1e2f47334bf35c8374eb5f9273cd0c920d6a733 100644
--- a/pkg/unittest/lib/src/expect.dart
+++ b/pkg/unittest/lib/src/expect.dart
@@ -68,6 +68,13 @@ void expect(actual, matcher, {String reason, FailureHandler failureHandler,
}
}
+void fail(String message, {FailureHandler failureHandler}) {
+ if (failureHandler == null) {
+ failureHandler = getOrCreateExpectFailureHandler();
+ }
+ failureHandler.fail(message);
+}
+
/**
* Takes an argument and returns an equivalent matcher.
* If the argument is already a matcher this does nothing,
« no previous file with comments | « pkg/unittest/lib/src/core_matchers.dart ('k') | pkg/unittest/lib/src/future_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698