Complete missing testcase
This commit is contained in:
parent
674d5af863
commit
7f5c394ca5
2 changed files with 11 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#include <nano/lib/numbers.hpp>
|
||||
#include <nano/secure/common.hpp>
|
||||
#include <nano/test_common/testutil.hpp>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
|
@ -453,6 +453,11 @@ TEST (uint256_union, operator_less_than)
|
|||
test_union_operator_less_than<nano::uint256_union, nano::uint256_t> ();
|
||||
}
|
||||
|
||||
TEST (uint256_union, operator_greater_than)
|
||||
{
|
||||
test_union_operator_greater_than<nano::uint256_union, nano::uint256_t> ();
|
||||
}
|
||||
|
||||
TEST (uint64_t, parse)
|
||||
{
|
||||
uint64_t value0 (1);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ namespace nano
|
|||
using uint128_t = boost::multiprecision::uint128_t;
|
||||
using uint256_t = boost::multiprecision::uint256_t;
|
||||
using uint512_t = boost::multiprecision::uint512_t;
|
||||
|
||||
// SI dividers
|
||||
nano::uint128_t const Knano_ratio = nano::uint128_t ("1000000000000000000000000000000000"); // 10^33 = 1000 nano
|
||||
nano::uint128_t const nano_ratio = nano::uint128_t ("1000000000000000000000000000000"); // 10^30 = 1 nano
|
||||
|
|
@ -113,6 +114,10 @@ inline bool operator< (nano::uint256_union const & lhs, nano::uint256_union cons
|
|||
{
|
||||
return std::memcmp (lhs.bytes.data (), rhs.bytes.data (), 32) < 0;
|
||||
}
|
||||
inline bool operator> (nano::uint256_union const & lhs, nano::uint256_union const & rhs)
|
||||
{
|
||||
return std::memcmp (lhs.bytes.data (), rhs.bytes.data (), 32) > 0;
|
||||
}
|
||||
static_assert (std::is_nothrow_move_constructible<uint256_union>::value, "uint256_union should be noexcept MoveConstructible");
|
||||
|
||||
class link;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue