| 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;
|
|
|