mirror of
https://github.com/vtnerd/monero-lws.git
synced 2024-12-22 19:39:23 +00:00
Fix warnings in unit tests (#91)
This commit is contained in:
parent
e477c174e2
commit
d2ca5b4180
1 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ namespace
|
||||||
{
|
{
|
||||||
EXPECT(Target(0) == wire::integer::cast_unsigned<Target>(std::uintmax_t(0)));
|
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())));
|
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>(std::uintmax_t(limit::max()) + 1), wire::exception);
|
||||||
EXPECT_THROWS_AS(wire::integer::cast_unsigned<Target>(max), 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()))
|
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>(std::intmax_t(limit::min()) - 1), wire::exception);
|
||||||
EXPECT_THROWS_AS(wire::integer::cast_signed<Target>(min), 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(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(Target(0) == wire::integer::cast_signed<Target>(std::intmax_t(0)));
|
||||||
EXPECT(limit::max() == wire::integer::cast_signed<Target>(std::intmax_t(limit::max())));
|
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>(std::intmax_t(limit::max()) + 1), wire::exception);
|
||||||
EXPECT_THROWS_AS(wire::integer::cast_signed<Target>(max), wire::exception);
|
EXPECT_THROWS_AS(wire::integer::cast_signed<Target>(max), wire::exception);
|
||||||
|
|
Loading…
Reference in a new issue