Skip to content

Commit

Permalink
Throw error when CASE is missing (#1735)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfdavid committed Jun 29, 2023
1 parent 184d8df commit 8f029ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/runner/e2e_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ void parseAndRegisterTestGroup(const std::string& path, bool generateTestList =
std::ofstream testList(TestHelper::getTestListFile(), std::ios_base::app);
testList << testGroup->group + "." + testCaseName + " " + path + "\n";
}
if (empty(testCaseName)) {
throw TestException("Missing test case name (-CASE) [" + path + "].");
}
testing::RegisterTest(testGroup->group.c_str(), testCaseName.c_str(), nullptr, nullptr,
__FILE__, __LINE__,
[datasetType, dataset, bufferPoolSize,
Expand Down
2 changes: 1 addition & 1 deletion test/test_files/exceptions/catalog/catalog.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

--

-CASE BindNonExistingFunction
-STATEMENT MATCH (a:person) RETURN dummy(n)
---- error
Catalog exception: DUMMY function does not exist.

-CASE BindNonExistingFunction
-STATEMENT MATCH (a:person) WHERE dummy() < 2 RETURN COUNT(*)
---- error
Catalog exception: DUMMY function does not exist.
Expand Down
2 changes: 2 additions & 0 deletions test/test_files/exceptions/copy/null_pk.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

--

-CASE NullPrimaryKey

-STATEMENT COPY person FROM "${KUZU_ROOT_DIRECTORY}/dataset/copy-fault-tests/null-pk/vPerson.csv"
---- error
Copy exception: Primary key cannot be null.

0 comments on commit 8f029ed

Please sign in to comment.