diff options
Diffstat (limited to 'test/elog_errorwrap_test.cpp')
-rw-r--r-- | test/elog_errorwrap_test.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/elog_errorwrap_test.cpp b/test/elog_errorwrap_test.cpp new file mode 100644 index 0000000..f341447 --- /dev/null +++ b/test/elog_errorwrap_test.cpp @@ -0,0 +1,32 @@ +#include "elog_errorwrap_test.hpp" + +namespace phosphor +{ +namespace logging +{ +namespace internal +{ + +TEST_F(TestLogManager, logCap) +{ + for (auto i = 0; i < ERROR_INFO_CAP + 20; i++) + { + manager.commitWithLvl(i, "FOO", 6); + } + + // Max num of Info( and below Sev) errors can be created is qual to + // ERROR_INFO_CAP + EXPECT_EQ(ERROR_INFO_CAP , manager.getInfoErrSize()); + + for (auto i = 0; i < ERROR_CAP + 20; i++) + { + manager.commitWithLvl(i, "FOO", 0); + } + // Max num of high severity errors can be created is qual to ERROR_CAP + EXPECT_EQ(ERROR_CAP, manager.getRealErrSize()); + +} + +}// namespace internal +}// namespace logging +}// namespace phosphor |