diff --git a/src/Makefile.test.include b/src/Makefile.test.include --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -79,12 +79,12 @@ test/script_commitment_tests.cpp \ test/script_P2SH_tests.cpp \ test/script_tests.cpp \ - test/script_sighashtype_tests.cpp \ test/scriptflags.cpp \ test/scriptflags.h \ test/scriptnum_tests.cpp \ test/serialize_tests.cpp \ test/sighash_tests.cpp \ + test/sighashtype_tests.cpp \ test/sigopcount_tests.cpp \ test/sigutil.cpp \ test/sigutil.h \ diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -94,11 +94,11 @@ script_commitment_tests.cpp script_P2SH_tests.cpp script_tests.cpp - script_sighashtype_tests.cpp scriptflags.cpp scriptnum_tests.cpp serialize_tests.cpp sighash_tests.cpp + sighashtype_tests.cpp sigopcount_tests.cpp sigutil.cpp skiplist_tests.cpp diff --git a/src/test/script_sighashtype_tests.cpp b/src/test/sighashtype_tests.cpp rename from src/test/script_sighashtype_tests.cpp rename to src/test/sighashtype_tests.cpp --- a/src/test/script_sighashtype_tests.cpp +++ b/src/test/sighashtype_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016 The Bitcoin Core developers +// Copyright (c) 2018 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -9,7 +9,7 @@ #include -BOOST_FIXTURE_TEST_SUITE(script_sighashtype_tests, BasicTestingSetup) +BOOST_FIXTURE_TEST_SUITE(sighashtype_tests, BasicTestingSetup) static void CheckSigHashType(SigHashType t, BaseSigHashType baseType, bool isDefined, uint32_t forkValue, bool hasForkId, @@ -38,11 +38,12 @@ for (uint32_t forkValue : forkValues) { for (bool hasForkId : forkIdFlagValues) { for (bool hasAnyoneCanPay : anyoneCanPayFlagValues) { - SigHashType t = SigHashType() - .withBaseType(baseType) - .withForkValue(forkValue) - .withForkId(hasForkId) - .withAnyoneCanPay(hasAnyoneCanPay); + const SigHashType t = + SigHashType() + .withBaseType(baseType) + .withForkValue(forkValue) + .withForkId(hasForkId) + .withAnyoneCanPay(hasAnyoneCanPay); bool isDefined = baseType != BaseSigHashType::UNSUPPORTED; CheckSigHashType(t, baseType, isDefined, forkValue, @@ -97,7 +98,7 @@ sigHashType & ~(SIGHASH_FORKID | SIGHASH_ANYONECANPAY); bool isDefined = (noflag != 0) && (noflag <= SIGHASH_SINGLE); - SigHashType tbase(rawType); + const SigHashType tbase(rawType); // Check deserialization. CheckSigHashType(tbase, BaseSigHashType(baseType), isDefined,