mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-25 14:34:04 +02:00

* fix(SQLParser): move to Data dir; add extradirs, remove vs 140,150 build scripts generation * fix(ActiveRecord): Makefile #4453 * fix(Data): Make SQLParser internal * fix(build): ODBC Makefile and Data libs CmakeLists #4453 * fix(build): Data libs CMakeLists #4453 * fix(build): regenerate VS projects #4453 * fix(CppUnit): remove Foundation dependency * fix(SQLParser): remove leftover unnecessary includes * fix(SQLParser): remove fwd header #4453 * fix(PocoDoc): remove SQLParser from include list * fix(mkrelease): remove 140,150 vs projects * fix(SQLParser): Disable SQL parsing by default #4462 * fix(test): Disable SQL parsing by default #4462 * Fix detection of odbc and apache2 for Fedora (#4461) * Fixed transaction handling in MySQL test when SQL parser is switched off * chore(ParallelSocketAcceptor): remove unnecessary include and using from header --------- Co-authored-by: Matej Kenda <matejken@gmail.com> Co-authored-by: topazus <77263945+topazus@users.noreply.github.com> Co-authored-by: Friedrich Wilckens <frwilckens@gmail.com>
20 lines
886 B
C
20 lines
886 B
C
#ifndef __HELPER_H__
|
|
#define __HELPER_H__
|
|
|
|
#define TEST_PARSE_SQL_QUERY(query, result, numStatements) \
|
|
hsql::SQLParserResult result; \
|
|
hsql::SQLParser::parse(query, &result); \
|
|
ASSERT(result.isValid()); \
|
|
ASSERT_EQ(result.size(), numStatements);
|
|
|
|
#define TEST_PARSE_SINGLE_SQL(query, stmtType, stmtClass, result, outputVar) \
|
|
TEST_PARSE_SQL_QUERY(query, result, 1); \
|
|
ASSERT_EQ(result.getStatement(0)->type(), stmtType); \
|
|
const stmtClass* outputVar = (const stmtClass*)result.getStatement(0);
|
|
|
|
#define TEST_CAST_STMT(result, stmt_index, stmtType, stmtClass, outputVar) \
|
|
ASSERT_EQ(result.getStatement(stmt_index)->type(), stmtType); \
|
|
const stmtClass* outputVar = (const stmtClass*)result.getStatement(stmt_index);
|
|
|
|
#endif
|