HyriseSQLParser/src/tests/select.cpp

16 lines
373 B
C++
Raw Normal View History

2014-12-03 16:32:56 +01:00
#include "test.h"
#include "SQLParser.h"
using namespace hsql;
TEST(Select) {
StatementList* stmt_list = SQLParser::parseSQLString("SELECT * FROM students;");
ASSERT(stmt_list->isValid);
ASSERT_EQ(stmt_list->size(), 1);
ASSERT(stmt_list->at(0)->type == kStmtSelect);
SelectStatement* stmt = (SelectStatement*) stmt_list->at(0);
ASSERT_NULL(stmt->where_clause);
}