Skip to content

Commit

Permalink
update test ground truth
Browse files Browse the repository at this point in the history
  • Loading branch information
jumormt committed Sep 25, 2024
1 parent d3cd3e5 commit 06097ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Assignment-2/Test2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void Test1()
gt->reachability(src, snk);
}
}
std::set<std::string> expected = {"START->16->1->2->END"};
std::set<std::string> expected = {"START->17->1->7->END"};
assert(expected == gt->getPaths() && "test1 failed!");
std::cout << "test1 passed!" << "\n";
SVFIR::releaseSVFIR();
Expand Down Expand Up @@ -80,7 +80,7 @@ void Test2()
}
}

std::set<std::string> expected = {"START->5->6->7->8->11->1->2->3->12->15->END", "START->5->6->7->8->9->1->2->3->10->13->END"};
std::set<std::string> expected = {"START->6->7->8->9->10->1->5->2->11->14->END", "START->6->7->8->9->12->1->5->2->13->16->END"};
assert(expected == gt->getPaths() && "test2 failed!");
std::cout << "test2 passed!" << "\n";
LLVMModuleSet::releaseLLVMModuleSet();
Expand Down Expand Up @@ -110,9 +110,9 @@ void Test3()
}
}

std::set<std::string> expected = {"START->10->11->12->13->4->5->6->7->14->15->4->5->6->7->16->17->18->END"};
std::set<std::string> expected = {"START->11->12->13->14->3->8->9->4->15->16->3->8->9->4->17->18->19->END"};
assert(expected == gt->getPaths() && "test3 failed!");
std::cout << "test2 passed!" << "\n";
std::cout << "test3 passed!" << "\n";
LLVMModuleSet::releaseLLVMModuleSet();
SVFIR::releaseSVFIR();
delete gt;
Expand Down
4 changes: 2 additions & 2 deletions Assignment-4/Test4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void Test1()
SVF::SVFIR *pag = builder.build();
TaintGraphTraversal* taint = new TaintGraphTraversal(pag);
taint->taintChecking();
set<string> expected = {"START->5->1->2->3->6->7->8->9->END"};
set<string> expected = {"START->6->1->5->2->7->8->9->10->END"};
assert(taint->getPaths() == expected && " \n wrong paths generated - test1 failed !");
cout << "\n test1 passed !" << endl;
SVF::LLVMModuleSet::releaseLLVMModuleSet();
Expand Down Expand Up @@ -97,7 +97,7 @@ void Test4()
TaintGraphTraversal* taint = new TaintGraphTraversal(pag);

taint->taintChecking();
set<string> expected = {"START->5->1->2->3->6->7->8->9->10->12->14->END"};
set<string> expected = {"START->6->1->5->2->7->8->9->10->11->13->14->END"};
assert(taint->getPaths() == expected && " \n wrong paths generated - test4 failed !");
cout << "\n test4 passed !" << endl;
SVF::LLVMModuleSet::releaseLLVMModuleSet();
Expand Down

0 comments on commit 06097ae

Please sign in to comment.