diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-03-07 12:38:25 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-04-03 14:04:21 -0400 |
commit | 87b9931bed5ec6633348ac506f0e9b5a96446df8 (patch) | |
tree | 9c18dd857082fecc140261a40961d94611f3c2ac /src/test/sigopcount_tests.cpp | |
parent | 36fdfb989e383324b00e250040aadaeb8286256b (diff) |
Fix signed/unsigned comparison warnings
Diffstat (limited to 'src/test/sigopcount_tests.cpp')
-rw-r--r-- | src/test/sigopcount_tests.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp index 59673f9b3d..1762680adf 100644 --- a/src/test/sigopcount_tests.cpp +++ b/src/test/sigopcount_tests.cpp @@ -21,21 +21,21 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount) { // Test CScript::GetSigOpCount() CScript s1; - BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 0); - BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 0); + BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 0U); + BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 0U); uint160 dummy; s1 << OP_1 << dummy << dummy << OP_2 << OP_CHECKMULTISIG; - BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 2); + BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 2U); s1 << OP_IF << OP_CHECKSIG << OP_ENDIF; - BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 3); - BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 21); + BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 3U); + BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 21U); CScript p2sh; p2sh.SetDestination(s1.GetID()); CScript scriptSig; scriptSig << OP_0 << Serialize(s1); - BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig), 3); + BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig), 3U); std::vector<CKey> keys; for (int i = 0; i < 3; i++) @@ -46,15 +46,15 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount) } CScript s2; s2.SetMultisig(1, keys); - BOOST_CHECK_EQUAL(s2.GetSigOpCount(true), 3); - BOOST_CHECK_EQUAL(s2.GetSigOpCount(false), 20); + BOOST_CHECK_EQUAL(s2.GetSigOpCount(true), 3U); + BOOST_CHECK_EQUAL(s2.GetSigOpCount(false), 20U); p2sh.SetDestination(s2.GetID()); - BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(true), 0); - BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(false), 0); + BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(true), 0U); + BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(false), 0U); CScript scriptSig2; scriptSig2 << OP_1 << dummy << dummy << Serialize(s2); - BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig2), 3); + BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig2), 3U); } BOOST_AUTO_TEST_SUITE_END() |