2014-11-26 16:20:55 +01:00
|
|
|
#ifndef __HELPER_H__
|
|
|
|
#define __HELPER_H__
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-18 12:11:26 +01:00
|
|
|
#define TEST_PARSE_SINGLE_SQL(query, stmt_type, stmt_class, output_var) \
|
|
|
|
SQLStatementList* stmt_list = SQLParser::parseSQLString(query); \
|
|
|
|
ASSERT(stmt_list->isValid); \
|
2015-01-06 19:47:59 +01:00
|
|
|
ASSERT_EQ(stmt_list->numStatements(), 1); \
|
|
|
|
ASSERT_EQ(stmt_list->getStatement(0)->type(), stmt_type); \
|
|
|
|
stmt_class* output_var = (stmt_class*) stmt_list->getStatement(0);
|
2014-12-18 12:11:26 +01:00
|
|
|
|
2014-11-26 16:20:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|