Commit 8b4f4805 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[test][status] print rejection info

parent 81fabcd4
......@@ -237,6 +237,8 @@ public:
const auto data = getRejectionData();
for (const auto& [reason, count] : data)
sumRejected += count;
std::cout << "Number of registered rejections: " << sumRejected << std::endl;
for (const auto& [reason, count] : data)
std::cout << "\t-" << reason << ": " << count << " / "
<< std::setprecision(2) << std::fixed
......
......@@ -53,6 +53,17 @@ int main()
status.setTargetCount(Id(0), 1);
std::cout << std::endl;
// rejection status output
status.increaseRejectedCounter();
for (int i = 0; i < 5; ++i) status.increaseRejectedCounter("reason 1");
for (int i = 0; i < 5; ++i) status.increaseRejectedCounter("reason 2");
for (int i = 0; i < 5; ++i) status.increaseRejectedCounter("reason 3");
status.printRejectionData();
// this should lead to a warning
status.increaseRejectedCounter("unspecified");
status.printRejectionData();
std::cout << "All tests passed" << std::endl;
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment