v30.3-roots.1 · Commit 2: [PATCH 02/68] feat(runtime): preserve Roots operator controls on Core 30.3
src/test/util_tests.cpp
Before: src/test/util_tests.cpp · After: src/test/util_tests.cpp
File metadata
index f9038c4fc9774283e31309b8fb62155268044fe5..51968a077cd38a123fade2ecb54d69c8519cc2d6 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. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/test/util_tests.cpp
CHANGED
|
@@ -1776,4 +1776,12 @@ BOOST_AUTO_TEST_CASE(mib_string_literal_test)
|
|
| 1776 |
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"));
|
| 1777 |
}
|
| 1778 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1779 |
BOOST_AUTO_TEST_SUITE_END()
|
|
|
|
| 1776 |
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"));
|
| 1777 |
}
|
| 1778 |
|
| 1779 |
+
BOOST_AUTO_TEST_CASE(gib_string_literal_test)
|
| 1780 |
+
{
|
| 1781 |
+
BOOST_CHECK_EQUAL(0_GiB, 0);
|
| 1782 |
+
BOOST_CHECK_EQUAL(1_GiB, 1024 * 1024 * 1024);
|
| 1783 |
+
const auto max_gib{std::numeric_limits<size_t>::max() >> 30};
|
| 1784 |
+
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"));
|
| 1785 |
+
}
|
| 1786 |
+
|
| 1787 |
BOOST_AUTO_TEST_SUITE_END()
|