2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 13:07:50 +00:00

[#2172] fixed unittests

This commit is contained in:
Razvan Becheriu 2021-11-19 19:55:52 +02:00 committed by Andrei Pavel
parent ccf349eef5
commit ef8d005e91
No known key found for this signature in database
GPG Key ID: 86E9385BC2203766
2 changed files with 7 additions and 3 deletions

View File

@ -336,6 +336,11 @@ TEST_F(LoggerManagerTest, TooLargeMaxsize) {
EXPECT_THROW_MSG(manager.process(spec), BadValue,
"expected maxsize < 2147483647MB, but instead got "
"18446744073709MB");
opt->maxsize = 1000000LL * (std::numeric_limits<int32_t>::max() + 1LL); // bytes
EXPECT_THROW_MSG(manager.process(spec), BadValue,
"expected maxsize < 2147483647MB, but instead got "
"2147483648MB");
}
namespace { // begin unnamed namespace

View File

@ -496,9 +496,8 @@ TEST_F(LoggingTest, maxsize) {
testMaxSize(TEST_MAX_SIZE, TEST_MAX_SIZE);
testMaxSize(std::numeric_limits<int32_t>::max(), std::numeric_limits<int32_t>::max());
testMaxSize(std::numeric_limits<uint32_t>::max(), std::numeric_limits<uint32_t>::max());
testMaxSize(std::numeric_limits<int64_t>::max(), std::numeric_limits<int64_t>::max());
// @todo: add a test for uint64_t when ElementPtr will allow it.
testMaxSize(1000LL * std::numeric_limits<int32_t>::max(), 1000LL * std::numeric_limits<int32_t>::max());
testMaxSize(1000000LL * std::numeric_limits<int32_t>::max(), 1000000LL * std::numeric_limits<int32_t>::max());
}
/// @todo Add tests for malformed logging configuration