Bitcoin Core  24.99.0
P2P Digital Currency
Macros | Functions
compress_tests.cpp File Reference
#include <compressor.h>
#include <script/standard.h>
#include <test/util/setup_common.h>
#include <stdint.h>
#include <boost/test/unit_test.hpp>
Include dependency graph for compress_tests.cpp:

Go to the source code of this file.

Macros

#define NUM_MULTIPLES_UNIT   100000
 
#define NUM_MULTIPLES_CENT   10000
 
#define NUM_MULTIPLES_1BTC   10000
 
#define NUM_MULTIPLES_50BTC   420000
 

Functions

static bool TestEncode (uint64_t in)
 
static bool TestDecode (uint64_t in)
 
static bool TestPair (uint64_t dec, uint64_t enc)
 
 BOOST_AUTO_TEST_CASE (compress_amounts)
 
 BOOST_AUTO_TEST_CASE (compress_script_to_ckey_id)
 
 BOOST_AUTO_TEST_CASE (compress_script_to_cscript_id)
 
 BOOST_AUTO_TEST_CASE (compress_script_to_compressed_pubkey_id)
 
 BOOST_AUTO_TEST_CASE (compress_script_to_uncompressed_pubkey_id)
 

Macro Definition Documentation

◆ NUM_MULTIPLES_1BTC

#define NUM_MULTIPLES_1BTC   10000

Definition at line 20 of file compress_tests.cpp.

◆ NUM_MULTIPLES_50BTC

#define NUM_MULTIPLES_50BTC   420000

Definition at line 23 of file compress_tests.cpp.

◆ NUM_MULTIPLES_CENT

#define NUM_MULTIPLES_CENT   10000

Definition at line 17 of file compress_tests.cpp.

◆ NUM_MULTIPLES_UNIT

#define NUM_MULTIPLES_UNIT   100000

Definition at line 14 of file compress_tests.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/5]

BOOST_AUTO_TEST_CASE ( compress_amounts  )

Definition at line 40 of file compress_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/5]

BOOST_AUTO_TEST_CASE ( compress_script_to_ckey_id  )

Definition at line 65 of file compress_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/5]

BOOST_AUTO_TEST_CASE ( compress_script_to_compressed_pubkey_id  )

Definition at line 102 of file compress_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/5]

BOOST_AUTO_TEST_CASE ( compress_script_to_cscript_id  )

Definition at line 85 of file compress_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/5]

BOOST_AUTO_TEST_CASE ( compress_script_to_uncompressed_pubkey_id  )

Definition at line 120 of file compress_tests.cpp.

Here is the call graph for this function:

◆ TestDecode()

static bool TestDecode ( uint64_t  in)
static

Definition at line 31 of file compress_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestEncode()

static bool TestEncode ( uint64_t  in)
static

Definition at line 27 of file compress_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestPair()

static bool TestPair ( uint64_t  dec,
uint64_t  enc 
)
static

Definition at line 35 of file compress_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: