Commit 179ff699 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[master] Fix for error on long literals on 32-bit systems.

parent d18b650c
......@@ -265,7 +265,7 @@ TEST(AddrUtilitiesTest, prefixesInRange) {
EXPECT_EQ(65536, prefixesInRange(48, 64));
// How many /127 prefixes are in /64 pool?
EXPECT_EQ(uint64_t(9223372036854775808u), prefixesInRange(64, 127));
EXPECT_EQ(uint64_t(9223372036854775808ull), prefixesInRange(64, 127));
// How many /128 prefixes are in /64 pool?
EXPECT_EQ(std::numeric_limits<uint64_t>::max(),
......
......@@ -482,10 +482,10 @@ TEST(Subnet6Test, Pool6getCapacity) {
EXPECT_EQ(65536, subnet->getPoolCapacity(Lease::TYPE_NA));
subnet->addPool(pool2);
EXPECT_EQ(uint64_t(4294967296 + 65536), subnet->getPoolCapacity(Lease::TYPE_NA));
EXPECT_EQ(uint64_t(4294967296ull + 65536), subnet->getPoolCapacity(Lease::TYPE_NA));
subnet->addPool(pool3);
EXPECT_EQ(uint64_t(4294967296 + 4294967296 + 65536),
EXPECT_EQ(uint64_t(4294967296ull + 4294967296ull + 65536),
subnet->getPoolCapacity(Lease::TYPE_NA));
// This is 2^64 prefixes. We're overflown uint64_t.
......@@ -521,10 +521,10 @@ TEST(Subnet6Test, Pool6PdgetPoolCapacity) {
EXPECT_EQ(65536, subnet->getPoolCapacity(Lease::TYPE_PD));
subnet->addPool(pool2);
EXPECT_EQ(uint64_t(4294967296 + 65536), subnet->getPoolCapacity(Lease::TYPE_PD));
EXPECT_EQ(uint64_t(4294967296ull + 65536), subnet->getPoolCapacity(Lease::TYPE_PD));
subnet->addPool(pool3);
EXPECT_EQ(uint64_t(4294967296 + 4294967296 + 65536),
EXPECT_EQ(uint64_t(4294967296ull + 4294967296ull + 65536),
subnet->getPoolCapacity(Lease::TYPE_PD));
// This is 2^64.
......
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