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

Unified Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 2999163002: fasta parser test for analyzer error codes (Closed)
Patch Set: Created 3 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
« no previous file with comments | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/parser_test.dart
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 8485b1ca26664ae5b3613dc4b06ec7b4da81a443..6eb0bfcf606957c62c5723a373c97397b4b9e7e6 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -56,6 +56,13 @@ abstract class AbstractParserTestCase implements ParserTestHelpers {
*/
void set enableUriInPartOf(bool value);
+ /**
+ * The error listener to which scanner and parser errors will be reported.
+ *
+ * This field is typically initialized by invoking [createParser].
+ */
+ GatheringErrorListener get listener;
+
/**
* Get the parser used by the test.
*
@@ -89,6 +96,8 @@ abstract class AbstractParserTestCase implements ParserTestHelpers {
*/
void createParser(String content);
+ void expectNotNullIfNoErrors(Object result);
+
Expression parseAdditiveExpression(String code);
Expression parseAssignableExpression(String code, bool primaryAllowed);
@@ -2042,11 +2051,14 @@ void f() {
}
/**
- * The class `ErrorParserTest` defines parser tests that test the parsing of code to ensure
- * that errors are correctly reported, and in some cases, not reported.
+ * The class `ErrorParserTest` defines parser tests that test the parsing
+ * of code to ensure that errors are correctly reported,
+ * and in some cases, not reported.
*/
@reflectiveTest
-class ErrorParserTest extends ParserTestCase {
+class ErrorParserTest extends ParserTestCase with ErrorParserTestMixin {}
+
+abstract class ErrorParserTestMixin implements AbstractParserTestCase {
void test_abstractClassMember_constructor() {
createParser('abstract C.c();');
ClassMember member = parser.parseClassMember('C');
@@ -8306,11 +8318,7 @@ class ParserTestCase extends EngineTestCase
*/
bool enableUriInPartOf = false;
- /**
- * The error listener to which scanner and parser errors will be reported.
- *
- * This field is typically initialized by invoking [createParser].
- */
+ @override
GatheringErrorListener listener;
/**
@@ -8361,6 +8369,7 @@ class ParserTestCase extends EngineTestCase
parser.currentToken = tokenStream;
}
+ @override
void expectNotNullIfNoErrors(Object result) {
if (!listener.hasErrors) {
expect(result, isNotNull);
« no previous file with comments | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698