v31.1-roots.1 · Commit 7: [PATCH 07/17] feat(rpc): preserve Roots operator interfaces on v31
src/test/util_tests.cpp
Before: src/test/util_tests.cpp · After: src/test/util_tests.cpp
File metadata
index d8d70d53a475c8ecba92cc2c8fa4b5a79519318b..f52a82b029b89ade8e4f91f9b524269ead459b35 100644
Download original patch · Release notes
Diff rows 1–12 of 12. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
src/test/util_tests.cpp
CHANGED
|
@@ -1834,4 +1834,12 @@ BOOST_AUTO_TEST_CASE(mib_string_literal_test)
|
|
|
1834
1834
|
BOOST_CHECK_EXCEPTION(operator""_MiB(static_cast<unsigned long long>(max_mib) + 1), std::overflow_error, HasReason("MiB value too large for size_t byte conversion"));
|
|
1835
1835
|
}
|
|
1836
1836
|
|
|
1837
|
+
BOOST_AUTO_TEST_CASE(gib_string_literal_test)
|
|
1838
|
+
{
|
|
1839
|
+
BOOST_CHECK_EQUAL(0_GiB, 0);
|
|
1840
|
+
BOOST_CHECK_EQUAL(1_GiB, 1024 * 1024 * 1024);
|
|
1841
|
+
const auto max_gib{std::numeric_limits<size_t>::max() >> 30};
|
|
1842
|
+
BOOST_CHECK_EXCEPTION(operator""_GiB(static_cast<unsigned long long>(max_gib) + 1), std::overflow_error, HasReason("GiB value too large for size_t byte conversion"));
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1837
1845
|
BOOST_AUTO_TEST_SUITE_END()
|