Bitcoin Core 28.99.0
P2P Digital Currency
Macros | Functions
compress_tests.cpp File Reference
#include <compressor.h>
#include <script/script.h>
#include <test/util/random.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)
 
 BOOST_AUTO_TEST_CASE (compress_p2pk_scripts_not_on_curve)
 

Macro Definition Documentation

◆ NUM_MULTIPLES_1BTC

#define NUM_MULTIPLES_1BTC   10000

Definition at line 21 of file compress_tests.cpp.

◆ NUM_MULTIPLES_50BTC

#define NUM_MULTIPLES_50BTC   420000

Definition at line 24 of file compress_tests.cpp.

◆ NUM_MULTIPLES_CENT

#define NUM_MULTIPLES_CENT   10000

Definition at line 18 of file compress_tests.cpp.

◆ NUM_MULTIPLES_UNIT

#define NUM_MULTIPLES_UNIT   100000

Definition at line 15 of file compress_tests.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/6]

BOOST_AUTO_TEST_CASE ( compress_amounts  )

Definition at line 41 of file compress_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/6]

BOOST_AUTO_TEST_CASE ( compress_p2pk_scripts_not_on_curve  )

Definition at line 135 of file compress_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/6]

BOOST_AUTO_TEST_CASE ( compress_script_to_ckey_id  )

Definition at line 66 of file compress_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/6]

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() [5/6]

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() [6/6]

BOOST_AUTO_TEST_CASE ( compress_script_to_uncompressed_pubkey_id  )

Definition at line 119 of file compress_tests.cpp.

Here is the call graph for this function:

◆ TestDecode()

static bool TestDecode ( uint64_t  in)
static

Definition at line 32 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 28 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 36 of file compress_tests.cpp.

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