about summary refs log tree commit diff homepage
path: root/unittests/Searcher
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Searcher')
-rw-r--r--unittests/Searcher/CMakeLists.txt4
-rw-r--r--unittests/Searcher/SearcherTest.cpp26
2 files changed, 15 insertions, 15 deletions
diff --git a/unittests/Searcher/CMakeLists.txt b/unittests/Searcher/CMakeLists.txt
index c35b407f..bad3504a 100644
--- a/unittests/Searcher/CMakeLists.txt
+++ b/unittests/Searcher/CMakeLists.txt
@@ -1,8 +1,8 @@
 add_klee_unit_test(SearcherTest
   SearcherTest.cpp)
-target_link_libraries(SearcherTest PRIVATE kleeCore)
+target_link_libraries(SearcherTest PRIVATE kleeCore ${SQLITE3_LIBRARIES})
 target_include_directories(SearcherTest BEFORE PRIVATE "${CMAKE_SOURCE_DIR}/lib")
 target_compile_options(SearcherTest PRIVATE ${KLEE_COMPONENT_CXX_FLAGS})
 target_compile_definitions(SearcherTest PRIVATE ${KLEE_COMPONENT_CXX_DEFINES})
 
-target_include_directories(SearcherTest PRIVATE ${KLEE_INCLUDE_DIRS})
\ No newline at end of file
+target_include_directories(SearcherTest PRIVATE ${KLEE_INCLUDE_DIRS} ${SQLITE3_INCLUDE_DIRS})
diff --git a/unittests/Searcher/SearcherTest.cpp b/unittests/Searcher/SearcherTest.cpp
index 0a7c8797..fc0d30ac 100644
--- a/unittests/Searcher/SearcherTest.cpp
+++ b/unittests/Searcher/SearcherTest.cpp
@@ -24,11 +24,11 @@ namespace {
 TEST(SearcherTest, RandomPath) {
   // First state
   ExecutionState es;
-  PTree processTree(&es);
+  InMemoryPTree processTree(es);
   es.ptreeNode = processTree.root.getPointer();
 
   RNG rng;
-  RandomPathSearcher rp(processTree, rng);
+  RandomPathSearcher rp(&processTree, rng);
   EXPECT_TRUE(rp.empty());
 
   rp.update(nullptr, {&es}, {});
@@ -64,15 +64,15 @@ TEST(SearcherTest, RandomPath) {
 TEST(SearcherTest, TwoRandomPath) {
   // Root state
   ExecutionState root;
-  PTree processTree(&root);
+  InMemoryPTree processTree(root);
   root.ptreeNode = processTree.root.getPointer();
 
   ExecutionState es(root);
   processTree.attach(root.ptreeNode, &es, &root, BranchType::NONE);
 
   RNG rng, rng1;
-  RandomPathSearcher rp(processTree, rng);
-  RandomPathSearcher rp1(processTree, rng1);
+  RandomPathSearcher rp(&processTree, rng);
+  RandomPathSearcher rp1(&processTree, rng1);
   EXPECT_TRUE(rp.empty());
   EXPECT_TRUE(rp1.empty());
 
@@ -122,7 +122,7 @@ TEST(SearcherTest, TwoRandomPathDot) {
 
   // Root state
   ExecutionState root;
-  PTree processTree(&root);
+  InMemoryPTree processTree(root);
   root.ptreeNode = processTree.root.getPointer();
   rootPNode = root.ptreeNode;
 
@@ -132,8 +132,8 @@ TEST(SearcherTest, TwoRandomPathDot) {
   esParentPNode = es.ptreeNode;
 
   RNG rng;
-  RandomPathSearcher rp(processTree, rng);
-  RandomPathSearcher rp1(processTree, rng);
+  RandomPathSearcher rp(&processTree, rng);
+  RandomPathSearcher rp1(&processTree, rng);
 
   rp.update(nullptr, {&es}, {});
 
@@ -204,14 +204,14 @@ TEST(SearcherTest, TwoRandomPathDot) {
 TEST(SearcherDeathTest, TooManyRandomPaths) {
   // First state
   ExecutionState es;
-  PTree processTree(&es);
+  InMemoryPTree processTree(es);
   es.ptreeNode = processTree.root.getPointer();
   processTree.remove(es.ptreeNode); // Need to remove to avoid leaks
 
   RNG rng;
-  RandomPathSearcher rp(processTree, rng);
-  RandomPathSearcher rp1(processTree, rng);
-  RandomPathSearcher rp2(processTree, rng);
-  ASSERT_DEATH({ RandomPathSearcher rp3(processTree, rng); }, "");
+  RandomPathSearcher rp(&processTree, rng);
+  RandomPathSearcher rp1(&processTree, rng);
+  RandomPathSearcher rp2(&processTree, rng);
+  ASSERT_DEATH({ RandomPathSearcher rp3(&processTree, rng); }, "");
 }
 }