Index: pkg/analyzer/test/generated/resolver_test.dart |
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart |
index beef6de7ea2dc8cfa14fc74bfd0fe03bc85c7afc..1a6c459aa6b6f2a92c3abaf4d78a5b9ea58023c3 100644 |
--- a/pkg/analyzer/test/generated/resolver_test.dart |
+++ b/pkg/analyzer/test/generated/resolver_test.dart |
@@ -8371,6 +8371,19 @@ class ResolverTestCase extends EngineTestCase { |
} |
/** |
+ * Asserts that [code] has errors with the given error codes. |
+ * |
+ * Like [assertErrors], but takes a string of source code. |
+ */ |
+ // TODO(rnystrom): Use this in more tests that have the same structure. |
+ void assertErrorsInCode(String code, List<ErrorCode> errors) { |
+ Source source = addSource(code); |
+ computeLibrarySourceErrors(source); |
+ assertErrors(source, errors); |
+ verify([source]); |
+ } |
+ |
+ /** |
* Assert that no errors have been reported against the given source. |
* |
* @param source the source against which no errors should have been reported |
@@ -8382,6 +8395,17 @@ class ResolverTestCase extends EngineTestCase { |
} |
/** |
+ * Asserts that [code] has no errors or warnings. |
+ */ |
+ // TODO(rnystrom): Use this in more tests that have the same structure. |
+ void assertNoErrorsInCode(String code) { |
+ Source source = addSource(code); |
+ computeLibrarySourceErrors(source); |
+ assertNoErrors(source); |
+ verify([source]); |
+ } |
+ |
+ /** |
* Cache the source file content in the source factory but don't add the source to the analysis |
* context. The file path should be absolute. |
* |