Changeset View
Changeset View
Standalone View
Standalone View
src/test/monolith_opcodes.cpp
// Copyright (c) 2018 The Bitcoin developers | // Copyright (c) 2018 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "test/test_bitcoin.h" | #include "test/test_bitcoin.h" | ||||
#include "policy/policy.h" | #include "policy/policy.h" | ||||
#include "script/interpreter.h" | #include "script/interpreter.h" | ||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
#include <array> | #include <array> | ||||
typedef std::vector<uint8_t> valtype; | typedef std::vector<uint8_t> valtype; | ||||
typedef std::vector<valtype> stacktype; | typedef std::vector<valtype> stacktype; | ||||
BOOST_FIXTURE_TEST_SUITE(monolith_opcodes_tests, BasicTestingSetup) | |||||
std::array<uint32_t, 3> flagset{ | std::array<uint32_t, 3> flagset{ | ||||
{0, STANDARD_SCRIPT_VERIFY_FLAGS, MANDATORY_SCRIPT_VERIFY_FLAGS}}; | {0, STANDARD_SCRIPT_VERIFY_FLAGS, MANDATORY_SCRIPT_VERIFY_FLAGS}}; | ||||
BOOST_FIXTURE_TEST_SUITE(monolith_opcodes_tests, BasicTestingSetup) | |||||
/** | /** | ||||
* General utility functions to check for script passing/failing. | * General utility functions to check for script passing/failing. | ||||
*/ | */ | ||||
static void CheckTestResultForAllFlags(const stacktype &original_stack, | static void CheckTestResultForAllFlags(const stacktype &original_stack, | ||||
const CScript &script, | const CScript &script, | ||||
const stacktype &expected) { | const stacktype &expected) { | ||||
BaseSignatureChecker sigchecker; | BaseSignatureChecker sigchecker; | ||||
▲ Show 20 Lines • Show All 743 Lines • Show Last 20 Lines |