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:
parent
ccf349eef5
commit
ef8d005e91
@ -336,6 +336,11 @@ TEST_F(LoggerManagerTest, TooLargeMaxsize) {
|
|||||||
EXPECT_THROW_MSG(manager.process(spec), BadValue,
|
EXPECT_THROW_MSG(manager.process(spec), BadValue,
|
||||||
"expected maxsize < 2147483647MB, but instead got "
|
"expected maxsize < 2147483647MB, but instead got "
|
||||||
"18446744073709MB");
|
"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
|
namespace { // begin unnamed namespace
|
||||||
|
@ -496,9 +496,8 @@ TEST_F(LoggingTest, maxsize) {
|
|||||||
testMaxSize(TEST_MAX_SIZE, TEST_MAX_SIZE);
|
testMaxSize(TEST_MAX_SIZE, TEST_MAX_SIZE);
|
||||||
testMaxSize(std::numeric_limits<int32_t>::max(), std::numeric_limits<int32_t>::max());
|
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<uint32_t>::max(), std::numeric_limits<uint32_t>::max());
|
||||||
testMaxSize(std::numeric_limits<int64_t>::max(), std::numeric_limits<int64_t>::max());
|
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 a test for uint64_t when ElementPtr will allow it.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @todo Add tests for malformed logging configuration
|
/// @todo Add tests for malformed logging configuration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user