X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=t%2Funit%2Fparser%2Fparser_test.c;h=cbcbe2c6b2716d628adade52a9f659f6ca28e370;hp=cfc36fc36417610175455f3e7bef2a8cc844b7c6;hb=29aa1f75c4840710671488420208a2e029a308a9;hpb=2a5aff78eb32778a27b707aa99a2494b1371a5dd diff --git a/t/unit/parser/parser_test.c b/t/unit/parser/parser_test.c index cfc36fc..cbcbe2c 100644 --- a/t/unit/parser/parser_test.c +++ b/t/unit/parser/parser_test.c @@ -31,6 +31,7 @@ #include "parser/parser.h" #include "core/object.h" +#include "core/store.h" #include "testutils.h" #include @@ -634,6 +635,7 @@ START_TEST(test_parse) sdb_strbuf_t *errbuf = sdb_strbuf_create(64); sdb_llist_t *check; sdb_ast_node_t *node; + sdb_store_query_t *q; _Bool ok; check = sdb_parser_parse(parse_data[_i].query, @@ -695,7 +697,14 @@ START_TEST(test_parse) SDB_STORE_TYPE_TO_NAME(parse_data[_i].expected_extra)); } + /* TODO: this should move into front-end specific tests */ + q = sdb_store_query_prepare(node); + fail_unless(q != NULL, + "sdb_store_query_prepare(AST<%s>) = NULL; expected: ", + parse_data[_i].query); + sdb_object_deref(SDB_OBJ(node)); + sdb_object_deref(SDB_OBJ(q)); sdb_llist_destroy(check); sdb_strbuf_destroy(errbuf); }