aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-10-26 13:54:21 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-10-26 14:19:15 +0100
commitfafc5290538fde76c3780976f4b2c11dc9f24d19 (patch)
tree39e6fdafa2888737235d872188b6dfbc2640ee43 /src/test/script_tests.cpp
parentfaf58ab139949ca35b33217d010b350c9a59c61d (diff)
test: Run AssetTest even if built --with-libs=no
Diffstat (limited to 'src/test/script_tests.cpp')
-rw-r--r--src/test/script_tests.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 7c53bd0002..a1746ecee3 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -1470,8 +1470,6 @@ BOOST_AUTO_TEST_CASE(script_HasValidOps)
BOOST_CHECK(!script.HasValidOps());
}
-#if defined(HAVE_CONSENSUS_LIB)
-
static CMutableTransaction TxFromHex(const std::string& str)
{
CMutableTransaction tx;
@@ -1502,6 +1500,8 @@ static CScriptWitness ScriptWitnessFromJSON(const UniValue& univalue)
return scriptwitness;
}
+#if defined(HAVE_CONSENSUS_LIB)
+
/* Test simple (successful) usage of bitcoinconsensus_verify_script */
BOOST_AUTO_TEST_CASE(bitcoinconsensus_verify_script_returns_true)
{
@@ -1640,6 +1640,8 @@ BOOST_AUTO_TEST_CASE(bitcoinconsensus_verify_script_invalid_flags)
BOOST_CHECK_EQUAL(err, bitcoinconsensus_ERR_INVALID_FLAGS);
}
+#endif // defined(HAVE_CONSENSUS_LIB)
+
static std::vector<unsigned int> AllConsensusFlags()
{
std::vector<unsigned int> ret;
@@ -1742,5 +1744,4 @@ BOOST_AUTO_TEST_CASE(script_assets_test)
file.close();
}
-#endif
BOOST_AUTO_TEST_SUITE_END()