MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / RunCreate

Function RunCreate

src/test/scriptnum_tests.cpp:125–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125static void RunCreate(const int64_t &num) {
126 CScriptNum scriptnum(num);
127 if (scriptnum.getvch().size() <= MAX_SCRIPTNUM_BYTE_SIZE) {
128 CheckCreateVch(num, MAX_SCRIPTNUM_BYTE_SIZE);
129 } else {
130 BOOST_CHECK_EXCEPTION(CheckCreateVch(num, MAX_SCRIPTNUM_BYTE_SIZE),
131 scriptnum_overflow_error,
132 HasReason("script number overflow"));
133 }
134}
135
136static void RunOperators(const int64_t &num1, const int64_t &num2) {
137 CheckAdd(num1, num2);

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 4

CheckCreateVchFunction · 0.85
HasReasonClass · 0.85
getvchMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected