aboutsummaryrefslogtreecommitdiff
path: root/src/test/bignum_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/bignum_tests.cpp')
-rw-r--r--src/test/bignum_tests.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/test/bignum_tests.cpp b/src/test/bignum_tests.cpp
index f16c26fd18..9d67324c76 100644
--- a/src/test/bignum_tests.cpp
+++ b/src/test/bignum_tests.cpp
@@ -1,8 +1,9 @@
-#include <boost/test/unit_test.hpp>
+#include "bignum.h"
+
#include <limits>
+#include <stdint.h>
-#include "bignum.h"
-#include "util.h"
+#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(bignum_tests)
@@ -46,7 +47,7 @@ BOOST_AUTO_TEST_SUITE(bignum_tests)
// Let's force this code not to be inlined, in order to actually
// test a generic version of the function. This increases the chance
// that -ftrapv will detect overflows.
-NOINLINE void mysetint64(CBigNum& num, int64 n)
+NOINLINE void mysetint64(CBigNum& num, int64_t n)
{
num.setint64(n);
}
@@ -55,7 +56,7 @@ NOINLINE void mysetint64(CBigNum& num, int64 n)
// value to 0, then the second one with a non-inlined function.
BOOST_AUTO_TEST_CASE(bignum_setint64)
{
- int64 n;
+ int64_t n;
{
n = 0;
@@ -103,7 +104,7 @@ BOOST_AUTO_TEST_CASE(bignum_setint64)
BOOST_CHECK(num.ToString() == "-5");
}
{
- n = std::numeric_limits<int64>::min();
+ n = std::numeric_limits<int64_t>::min();
CBigNum num(n);
BOOST_CHECK(num.ToString() == "-9223372036854775808");
num.setulong(0);
@@ -112,7 +113,7 @@ BOOST_AUTO_TEST_CASE(bignum_setint64)
BOOST_CHECK(num.ToString() == "-9223372036854775808");
}
{
- n = std::numeric_limits<int64>::max();
+ n = std::numeric_limits<int64_t>::max();
CBigNum num(n);
BOOST_CHECK(num.ToString() == "9223372036854775807");
num.setulong(0);