#include <script/script.h>
#include <test/scriptnum10.h>
#include <test/util/setup_common.h>
#include <boost/test/unit_test.hpp>
#include <limits.h>
#include <stdint.h>
Go to the source code of this file.
|
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. More...
|
|
static const int64_t | offsets [] = { 1, 0x79, 0x80, 0x81, 0xFF, 0x7FFF, 0x8000, 0xFFFF, 0x10000} |
|
◆ BOOST_AUTO_TEST_CASE() [1/2]
BOOST_AUTO_TEST_CASE |
( |
creation |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [2/2]
BOOST_AUTO_TEST_CASE |
( |
operators |
| ) |
|
◆ CheckAdd()
static void CheckAdd |
( |
const int64_t & |
num1, |
|
|
const int64_t & |
num2 |
|
) |
| |
|
static |
◆ CheckCompare()
static void CheckCompare |
( |
const int64_t & |
num1, |
|
|
const int64_t & |
num2 |
|
) |
| |
|
static |
◆ CheckCreateInt()
static void CheckCreateInt |
( |
const int64_t & |
num | ) |
|
|
static |
◆ CheckCreateVch()
static void CheckCreateVch |
( |
const int64_t & |
num | ) |
|
|
static |
◆ CheckNegate()
static void CheckNegate |
( |
const int64_t & |
num | ) |
|
|
static |
◆ CheckSubtract()
static void CheckSubtract |
( |
const int64_t & |
num1, |
|
|
const int64_t & |
num2 |
|
) |
| |
|
static |
◆ RunCreate()
static void RunCreate |
( |
const int64_t & |
num | ) |
|
|
static |
◆ RunOperators()
static void RunOperators |
( |
const int64_t & |
num1, |
|
|
const int64_t & |
num2 |
|
) |
| |
|
static |
◆ verify()
◆ offsets
const int64_t offsets[] = { 1, 0x79, 0x80, 0x81, 0xFF, 0x7FFF, 0x8000, 0xFFFF, 0x10000} |
|
static |
◆ values
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 } |
|
static |
A selection of numbers that do not trigger int64_t overflow when added/subtracted.
Definition at line 17 of file scriptnum_tests.cpp.