Skip to content

Commit 787b3c1

Browse files
committed
Add unit test for validation of unknown identifiers
1 parent d60f030 commit 787b3c1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

unit/solvers/smt2_incremental/smt_response_validation.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,14 @@ TEST_CASE("smt get-value response validation", "[core][smt2_incremental]")
275275
CHECK(
276276
*empty_value_response.get_if_error() ==
277277
std::vector<std::string>{"Unrecognised SMT term - \"\"."});
278+
const response_or_errort<smt_responset> unknown_identifier_response =
279+
validate_smt_response(
280+
*smt2irep("((foo bar)))").parsed_output, identifier_table);
281+
CHECK(
282+
*unknown_identifier_response.get_if_error() ==
283+
std::vector<std::string>{
284+
"Unrecognised SMT term - \"foo\".",
285+
"Unrecognised SMT term - \"bar\"."});
278286
const response_or_errort<smt_responset> pair_value_response =
279287
validate_smt_response(
280288
*smt2irep("((a (#xF00D #xBAD))))").parsed_output, identifier_table);

0 commit comments

Comments
 (0)