aboutsummaryrefslogtreecommitdiff
path: root/src/test/bignum_tests.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-03-07 12:38:25 -0500
committerGavin Andresen <gavinandresen@gmail.com>2013-04-03 14:04:21 -0400
commit87b9931bed5ec6633348ac506f0e9b5a96446df8 (patch)
tree9c18dd857082fecc140261a40961d94611f3c2ac /src/test/bignum_tests.cpp
parent36fdfb989e383324b00e250040aadaeb8286256b (diff)
Fix signed/unsigned comparison warnings
Diffstat (limited to 'src/test/bignum_tests.cpp')
-rw-r--r--src/test/bignum_tests.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/test/bignum_tests.cpp b/src/test/bignum_tests.cpp
index 5b898d1499..196b7274f4 100644
--- a/src/test/bignum_tests.cpp
+++ b/src/test/bignum_tests.cpp
@@ -128,51 +128,51 @@ BOOST_AUTO_TEST_CASE(bignum_SetCompact)
CBigNum num;
num.SetCompact(0);
BOOST_CHECK_EQUAL(num.GetHex(), "0");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
num.SetCompact(0x00123456);
BOOST_CHECK_EQUAL(num.GetHex(), "0");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
num.SetCompact(0x01123456);
BOOST_CHECK_EQUAL(num.GetHex(), "12");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0x01120000);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0x01120000U);
// Make sure that we don't generate compacts with the 0x00800000 bit set
num = 0x80;
- BOOST_CHECK_EQUAL(num.GetCompact(), 0x02008000);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0x02008000U);
num.SetCompact(0x01fedcba);
BOOST_CHECK_EQUAL(num.GetHex(), "-7e");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0x01fe0000);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0x01fe0000U);
num.SetCompact(0x02123456);
BOOST_CHECK_EQUAL(num.GetHex(), "1234");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0x02123400);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0x02123400U);
num.SetCompact(0x03123456);
BOOST_CHECK_EQUAL(num.GetHex(), "123456");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0x03123456);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0x03123456U);
num.SetCompact(0x04123456);
BOOST_CHECK_EQUAL(num.GetHex(), "12345600");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0x04123456);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0x04123456U);
num.SetCompact(0x04923456);
BOOST_CHECK_EQUAL(num.GetHex(), "-12345600");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0x04923456);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0x04923456U);
num.SetCompact(0x05009234);
BOOST_CHECK_EQUAL(num.GetHex(), "92340000");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0x05009234);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0x05009234U);
num.SetCompact(0x20123456);
BOOST_CHECK_EQUAL(num.GetHex(), "1234560000000000000000000000000000000000000000000000000000000000");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0x20123456);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0x20123456U);
num.SetCompact(0xff123456);
BOOST_CHECK_EQUAL(num.GetHex(), "123456000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
- BOOST_CHECK_EQUAL(num.GetCompact(), 0xff123456);
+ BOOST_CHECK_EQUAL(num.GetCompact(), 0xff123456U);
}
BOOST_AUTO_TEST_SUITE_END()