aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/pmt_tests.cpp6
-rw-r--r--src/test/script_P2SH_tests.cpp2
-rw-r--r--src/test/sigopcount_tests.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp
index 56e0541664..af3d90f2eb 100644
--- a/src/test/pmt_tests.cpp
+++ b/src/test/pmt_tests.cpp
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(pmt_test1)
// calculate actual merkle root and height
uint256 merkleRoot1 = block.BuildMerkleTree();
- std::vector<uint256> vTxid(nTx, 0);
+ std::vector<uint256> vTxid(nTx, uint256());
for (unsigned int j=0; j<nTx; j++)
vTxid[j] = block.vtx[j].GetHash();
int nHeight = 1, nTx_ = nTx;
@@ -88,7 +88,7 @@ BOOST_AUTO_TEST_CASE(pmt_test1)
// check that it has the same merkle root as the original, and a valid one
BOOST_CHECK(merkleRoot1 == merkleRoot2);
- BOOST_CHECK(merkleRoot2 != 0);
+ BOOST_CHECK(!merkleRoot2.IsNull());
// check that it contains the matched transactions (in the same order!)
BOOST_CHECK(vMatchTxid1 == vMatchTxid2);
@@ -112,7 +112,7 @@ BOOST_AUTO_TEST_CASE(pmt_malleability)
CPartialMerkleTree tree(vTxid, vMatch);
std::vector<uint256> vTxid2;
- BOOST_CHECK(tree.ExtractMatches(vTxid) == 0);
+ BOOST_CHECK(tree.ExtractMatches(vTxid).IsNull());
}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index 63553556ec..77e70022df 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -210,7 +210,7 @@ BOOST_AUTO_TEST_CASE(set)
BOOST_AUTO_TEST_CASE(is)
{
// Test CScript::IsPayToScriptHash()
- uint160 dummy(0);
+ uint160 dummy;
CScript p2sh;
p2sh << OP_HASH160 << ToByteVector(dummy) << OP_EQUAL;
BOOST_CHECK(p2sh.IsPayToScriptHash());
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp
index 3326601492..3c8264d89d 100644
--- a/src/test/sigopcount_tests.cpp
+++ b/src/test/sigopcount_tests.cpp
@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 0U);
BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 0U);
- uint160 dummy(0);
+ uint160 dummy;
s1 << OP_1 << ToByteVector(dummy) << ToByteVector(dummy) << OP_2 << OP_CHECKMULTISIG;
BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 2U);
s1 << OP_IF << OP_CHECKSIG << OP_ENDIF;