HyriseSQLParser/src/tests/helper.h

15 lines
386 B
C
Raw Normal View History

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); \
ASSERT_EQ(stmt_list->size(), 1); \
ASSERT_EQ(stmt_list->at(0)->type(), stmt_type); \
stmt_class* output_var = (stmt_class*) stmt_list->at(0);
2014-11-26 16:20:55 +01:00
#endif