From bce9aaf31e2b0428e686e151324f8561ad71f11f Mon Sep 17 00:00:00 2001 From: Daniel Kraft Date: Sun, 18 Nov 2018 15:55:50 +0100 Subject: Unit tests for IsWitnessProgram and IsP2WSH. The new unit test file script_segwit_tests.cpp contains some basic unit tests for CScript::IsPayToWitnessScriptHash and CScript::IsWitnessProgram. --- src/Makefile.test.include | 1 + src/test/script_segwit_tests.cpp | 164 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 src/test/script_segwit_tests.cpp (limited to 'src') diff --git a/src/Makefile.test.include b/src/Makefile.test.include index d70793ffa9..b91af5a041 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -120,6 +120,7 @@ BITCOIN_TESTS =\ test/scheduler_tests.cpp \ test/script_p2sh_tests.cpp \ test/script_parse_tests.cpp \ + test/script_segwit_tests.cpp \ test/script_standard_tests.cpp \ test/script_tests.cpp \ test/scriptnum_tests.cpp \ diff --git a/src/test/script_segwit_tests.cpp b/src/test/script_segwit_tests.cpp new file mode 100644 index 0000000000..2bad59805f --- /dev/null +++ b/src/test/script_segwit_tests.cpp @@ -0,0 +1,164 @@ +// Copyright (c) 2012-2021 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include