diff options
author | Frank Busse <bb0xfb@gmail.com> | 2023-03-30 22:25:09 +0100 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2024-01-12 12:00:35 +0000 |
commit | 5ca8f5a020cca251a0d5d08bc855bf945735c1af (patch) | |
tree | 2df0f2a9e84de990acf2b8201456eabf77eb72a4 /unittests/Searcher/SearcherTest.cpp | |
parent | 19b6ae578b0658115d15848604a28434845bb3e3 (diff) | |
download | klee-5ca8f5a020cca251a0d5d08bc855bf945735c1af.tar.gz |
SearcherTest: remove redundant root init, fix branch type
Diffstat (limited to 'unittests/Searcher/SearcherTest.cpp')
-rw-r--r-- | unittests/Searcher/SearcherTest.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/unittests/Searcher/SearcherTest.cpp b/unittests/Searcher/SearcherTest.cpp index fc0d30ac..f9089615 100644 --- a/unittests/Searcher/SearcherTest.cpp +++ b/unittests/Searcher/SearcherTest.cpp @@ -25,7 +25,6 @@ TEST(SearcherTest, RandomPath) { // First state ExecutionState es; InMemoryPTree processTree(es); - es.ptreeNode = processTree.root.getPointer(); RNG rng; RandomPathSearcher rp(&processTree, rng); @@ -37,7 +36,7 @@ TEST(SearcherTest, RandomPath) { // Two states ExecutionState es1(es); - processTree.attach(es.ptreeNode, &es1, &es, BranchType::NONE); + processTree.attach(es.ptreeNode, &es1, &es, BranchType::Conditional); rp.update(&es, {&es1}, {}); // Random path seed dependant @@ -65,10 +64,9 @@ TEST(SearcherTest, TwoRandomPath) { // Root state ExecutionState root; InMemoryPTree processTree(root); - root.ptreeNode = processTree.root.getPointer(); ExecutionState es(root); - processTree.attach(root.ptreeNode, &es, &root, BranchType::NONE); + processTree.attach(root.ptreeNode, &es, &root, BranchType::Conditional); RNG rng, rng1; RandomPathSearcher rp(&processTree, rng); @@ -83,7 +81,7 @@ TEST(SearcherTest, TwoRandomPath) { // Two states ExecutionState es1(es); - processTree.attach(es.ptreeNode, &es1, &es, BranchType::NONE); + processTree.attach(es.ptreeNode, &es1, &es, BranchType::Conditional); rp.update(&es, {}, {}); rp1.update(nullptr, {&es1}, {}); @@ -123,7 +121,6 @@ TEST(SearcherTest, TwoRandomPathDot) { // Root state ExecutionState root; InMemoryPTree processTree(root); - root.ptreeNode = processTree.root.getPointer(); rootPNode = root.ptreeNode; ExecutionState es(root); @@ -201,11 +198,11 @@ TEST(SearcherTest, TwoRandomPathDot) { processTree.remove(es1.ptreeNode); processTree.remove(root.ptreeNode); } + TEST(SearcherDeathTest, TooManyRandomPaths) { // First state ExecutionState es; InMemoryPTree processTree(es); - es.ptreeNode = processTree.root.getPointer(); processTree.remove(es.ptreeNode); // Need to remove to avoid leaks RNG rng; |