mirror of
https://codeberg.org/wownero/wownero-lws
synced 2026-01-09 23:25:16 -08:00
Fix warnings in unit tests (#91)
This commit is contained in:
committed by
Lee *!* Clagett
parent
e477c174e2
commit
d2ca5b4180
@@ -47,7 +47,7 @@ namespace
|
||||
{
|
||||
EXPECT(Target(0) == wire::integer::cast_unsigned<Target>(std::uintmax_t(0)));
|
||||
EXPECT(limit::max() == wire::integer::cast_unsigned<Target>(std::uintmax_t(limit::max())));
|
||||
if (limit::max() < max)
|
||||
if constexpr (limit::max() < max)
|
||||
{
|
||||
EXPECT_THROWS_AS(wire::integer::cast_unsigned<Target>(std::uintmax_t(limit::max()) + 1), wire::exception);
|
||||
EXPECT_THROWS_AS(wire::integer::cast_unsigned<Target>(max), wire::exception);
|
||||
@@ -68,7 +68,7 @@ namespace
|
||||
|
||||
SETUP("intmax_t to " + boost::core::demangle(typeid(Target).name()))
|
||||
{
|
||||
if (min < limit::min())
|
||||
if constexpr (min < limit::min())
|
||||
{
|
||||
EXPECT_THROWS_AS(wire::integer::cast_signed<Target>(std::intmax_t(limit::min()) - 1), wire::exception);
|
||||
EXPECT_THROWS_AS(wire::integer::cast_signed<Target>(min), wire::exception);
|
||||
@@ -76,7 +76,7 @@ namespace
|
||||
EXPECT(limit::min() == wire::integer::cast_signed<Target>(std::intmax_t(limit::min())));
|
||||
EXPECT(Target(0) == wire::integer::cast_signed<Target>(std::intmax_t(0)));
|
||||
EXPECT(limit::max() == wire::integer::cast_signed<Target>(std::intmax_t(limit::max())));
|
||||
if (limit::max() < max)
|
||||
if constexpr (limit::max() < max)
|
||||
{
|
||||
EXPECT_THROWS_AS(wire::integer::cast_signed<Target>(std::intmax_t(limit::max()) + 1), wire::exception);
|
||||
EXPECT_THROWS_AS(wire::integer::cast_signed<Target>(max), wire::exception);
|
||||
|
||||
Reference in New Issue
Block a user