1 #include "elog_errorwrap_test.hpp"
2 
3 namespace phosphor
4 {
5 namespace logging
6 {
7 namespace internal
8 {
9 
10 TEST_F(TestLogManager, logCap)
11 {
12     for (size_t i = 0; i < ERROR_INFO_CAP + 20; i++)
13     {
14         manager.commitWithLvl(i, "FOO", 6);
15     }
16 
17     // Max num of Info( and below Sev) errors can be created is qual to
18     // ERROR_INFO_CAP
19     EXPECT_EQ(ERROR_INFO_CAP, manager.getInfoErrSize());
20 
21     for (size_t i = 0; i < ERROR_CAP + 20; i++)
22     {
23         manager.commitWithLvl(i, "FOO", 0);
24     }
25     // Max num of high severity errors can be created is qual to ERROR_CAP
26     EXPECT_EQ(ERROR_CAP, manager.getRealErrSize());
27 }
28 
29 } // namespace internal
30 } // namespace logging
31 } // namespace phosphor
32