| 10 | BOOST_FIXTURE_TEST_SUITE(script_segwit_tests, BasicTestingSetup) |
| 11 | |
| 12 | BOOST_AUTO_TEST_CASE(IsPayToWitnessScriptHash_Valid) |
| 13 | { |
| 14 | uint256 dummy; |
| 15 | CScript p2wsh; |
| 16 | p2wsh << OP_0 << ToByteVector(dummy); |
| 17 | BOOST_CHECK(p2wsh.IsPayToWitnessScriptHash()); |
| 18 | |
| 19 | std::vector<unsigned char> bytes = {OP_0, 32}; |
| 20 | bytes.insert(bytes.end(), 32, 0); |
| 21 | BOOST_CHECK(CScript(bytes.begin(), bytes.end()).IsPayToWitnessScriptHash()); |
| 22 | } |
| 23 | |
| 24 | BOOST_AUTO_TEST_CASE(IsPayToWitnessScriptHash_Invalid_NotOp0) |
| 25 | { |
nothing calls this directly
no test coverage detected