![]() |
Bitcoin Core 31.0.0
P2P Digital Currency
|
#include <script/script.h>#include <test/scriptnum10.h>#include <test/util/setup_common.h>#include <boost/test/unit_test.hpp>#include <climits>#include <cstdint>Go to the source code of this file.
Functions | |
| static bool | verify (const CScriptNum10 &bignum, const CScriptNum &scriptnum) |
| static void | CheckCreateVch (const int64_t &num) |
| static void | CheckCreateInt (const int64_t &num) |
| static void | CheckAdd (const int64_t &num1, const int64_t &num2) |
| static void | CheckNegate (const int64_t &num) |
| static void | CheckSubtract (const int64_t &num1, const int64_t &num2) |
| static void | CheckCompare (const int64_t &num1, const int64_t &num2) |
| static void | RunCreate (const int64_t &num) |
| static void | RunOperators (const int64_t &num1, const int64_t &num2) |
| BOOST_AUTO_TEST_CASE (creation) | |
| BOOST_AUTO_TEST_CASE (operators) | |
Variables | |
| static const int64_t | values [] = { 0, 1, -2, 127, 128, -255, 256, (1LL << 15) - 1, -(1LL << 16), (1LL << 24) - 1, (1LL << 31), 1 - (1LL << 32), 1LL << 40 } |
| A selection of numbers that do not trigger int64_t overflow when added/subtracted. | |
| static const int64_t | offsets [] = { 1, 0x79, 0x80, 0x81, 0xFF, 0x7FFF, 0x8000, 0xFFFF, 0x10000} |
| BOOST_AUTO_TEST_CASE | ( | creation | ) |
| BOOST_AUTO_TEST_CASE | ( | operators | ) |
Definition at line 52 of file scriptnum_tests.cpp.
Definition at line 109 of file scriptnum_tests.cpp.
Definition at line 41 of file scriptnum_tests.cpp.
Definition at line 26 of file scriptnum_tests.cpp.
Definition at line 74 of file scriptnum_tests.cpp.
Definition at line 84 of file scriptnum_tests.cpp.
Definition at line 145 of file scriptnum_tests.cpp.
Definition at line 157 of file scriptnum_tests.cpp.
|
static |
Definition at line 21 of file scriptnum_tests.cpp.
|
static |
Definition at line 19 of file scriptnum_tests.cpp.