Commit 33a531a9 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[test][status] test rejection counts

parent 1a23148e
......@@ -60,6 +60,15 @@ int main()
for (int i = 0; i < 5; ++i) status.increaseRejectedCounter("reason 3");
status.printRejectionData();
if (status.getRejectedCount() != 16)
throw std::runtime_error("Erroneous reected counter");
if (status.getRejectedCount("reason 1") != 5)
throw std::runtime_error("Erroneous reected counter (reason 1)");
if (status.getRejectedCount("reason 2") != 5)
throw std::runtime_error("Erroneous reected counter (reason 2)");
if (status.getRejectedCount("reason 3") != 5)
throw std::runtime_error("Erroneous reected counter (reason 3)");
// this should lead to a warning
status.increaseRejectedCounter("unspecified");
status.printRejectionData();
......
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