Package org.apache.calcite.sql.parser
Interface SqlParserTest.Tester
- All Known Implementing Classes:
SqlParserTest.TesterImpl
,SqlParserTest.UnparsingTesterImpl
- Enclosing class:
SqlParserTest
protected static interface SqlParserTest.Tester
Callback to control how test actions are performed.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
check
(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) void
checkExp
(SqlTestFactory factory, StringAndPos sap, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) void
checkExpFails
(SqlTestFactory factory, StringAndPos sap, String expectedMsgPattern) Tests that an expression throws an exception that matches the given pattern.void
checkFails
(SqlTestFactory factory, StringAndPos sap, boolean list, String expectedMsgPattern) void
checkList
(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, List<String> expected) void
checkNode
(SqlTestFactory factory, StringAndPos sap, org.hamcrest.Matcher<SqlNode> matcher) default boolean
Whether this is a sub-class that tests un-parsing as well as parsing.
-
Method Details
-
checkList
void checkList(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, List<String> expected) -
check
void check(SqlTestFactory factory, StringAndPos sap, @Nullable SqlDialect dialect, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) -
checkExp
void checkExp(SqlTestFactory factory, StringAndPos sap, UnaryOperator<String> converter, String expected, Consumer<SqlParser> parserChecker) -
checkFails
-
checkExpFails
Tests that an expression throws an exception that matches the given pattern. -
checkNode
-
isUnparserTest
default boolean isUnparserTest()Whether this is a sub-class that tests un-parsing as well as parsing.
-