diff options
author | Daniel Schemmel <daniel@schemmel.net> | 2023-10-29 16:00:02 +0000 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2024-01-30 21:40:32 +0000 |
commit | 3ca81c2dc3881aec0bbf94646c73a148d706c76d (patch) | |
tree | 27852ee64e2148b2225f7d4dfd4e33b244be4cfd /unittests | |
parent | f813c88c8cb868fc9c0be78fbf92a94d72ac02b0 (diff) | |
download | klee-3ca81c2dc3881aec0bbf94646c73a148d706c76d.tar.gz |
Change `GetConstraintLog` to work with `std::string`s instead of `char*`s
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Solver/Z3SolverTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unittests/Solver/Z3SolverTest.cpp b/unittests/Solver/Z3SolverTest.cpp index 0eba3d0e..9f4a4786 100644 --- a/unittests/Solver/Z3SolverTest.cpp +++ b/unittests/Solver/Z3SolverTest.cpp @@ -63,9 +63,9 @@ TEST_F(Z3SolverTest, GetConstraintLog) { // Ensure this is not buggy as fixed in https://github.com/klee/klee/pull/1235 // If the bug is still present this fail due to an internal assertion - char *ConstraintsString = Z3Solver_->getConstraintLog(TheQuery); + std::string ConstraintsString = Z3Solver_->getConstraintLog(TheQuery); const char *ExpectedArraySelection = "(= (select const_array_0"; - const char *Occurence = std::strstr(ConstraintsString, ExpectedArraySelection); + const char *Occurence = + std::strstr(ConstraintsString.c_str(), ExpectedArraySelection); ASSERT_STRNE(Occurence, nullptr); - free(ConstraintsString); } |