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

Unified Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_junit.dart

Issue 459703002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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: editor/util/plugins/com.google.dart.java2dart/resources/java_junit.dart
diff --git a/editor/util/plugins/com.google.dart.java2dart/resources/java_junit.dart b/editor/util/plugins/com.google.dart.java2dart/resources/java_junit.dart
index 81b4be08ff99d2342c072c81b9de299601521ed5..6f2c7dab1da94a5fe83afdc5e7e3fd0244f4cf3c 100644
--- a/editor/util/plugins/com.google.dart.java2dart/resources/java_junit.dart
+++ b/editor/util/plugins/com.google.dart.java2dart/resources/java_junit.dart
@@ -25,6 +25,9 @@ class JUnitTestCase {
static void assertNull(x) {
expect(x, isNull);
}
+ static void assertNullMsg(String msg, x) {
+ expect(x, isNullMsg(msg));
+ }
static void assertNotNull(x) {
expect(x, isNotNull);
}
@@ -116,6 +119,18 @@ class _IsFalseWithMessage extends Matcher {
}
}
+Matcher isNullMsg(String msg) => new _IsNullWithMessage(msg);
+class _IsNullWithMessage extends Matcher {
+ final String msg;
+ const _IsNullWithMessage(this.msg);
+ bool matches(item, Map matchState) {
+ return item == null;
+ }
+ Description describe(Description mismatchDescription) {
+ return mismatchDescription.replace(msg);
+ }
+}
+
Matcher isNotNullMsg(String msg) => new _IsNotNullWithMessage(msg);
class _IsNotNullWithMessage extends Matcher {
final String msg;

Powered by Google App Engine
This is Rietveld 408576698