Bitcoin Core 28.99.0
P2P Digital Currency
|
#include <streams.h>
#include <test/util/setup_common.h>
#include <uint256.h>
#include <util/strencodings.h>
#include <util/transaction_identifier.h>
#include <boost/test/unit_test.hpp>
#include <iomanip>
#include <sstream>
#include <string>
#include <string_view>
#include <vector>
Go to the source code of this file.
Functions | |
static std::string | ArrayToString (const unsigned char A[], unsigned int width) |
BOOST_AUTO_TEST_CASE (basics) | |
BOOST_AUTO_TEST_CASE (comparison) | |
BOOST_AUTO_TEST_CASE (methods) | |
template<typename T > | |
void | TestFromHex () |
Implemented as a templated function so it can be reused by other classes that have a FromHex() method that wraps base_blob::FromHex(), such as transaction_identifier::FromHex(). More... | |
BOOST_AUTO_TEST_CASE (from_hex) | |
BOOST_AUTO_TEST_CASE (from_user_hex) | |
BOOST_AUTO_TEST_CASE (check_ONE) | |
BOOST_AUTO_TEST_CASE (FromHex_vs_uint256) | |
Variables | |
const unsigned char | R1Array [] |
const char | R1ArrayHex [] = "7D1DE5EAF9B156D53208F033B5AA8122D2d2355d5e12292b121156cfdb4a529c" |
const uint256 | R1L = uint256(std::vector<unsigned char>(R1Array,R1Array+32)) |
const uint160 | R1S = uint160(std::vector<unsigned char>(R1Array,R1Array+20)) |
const unsigned char | R2Array [] |
const uint256 | R2L = uint256(std::vector<unsigned char>(R2Array,R2Array+32)) |
const uint160 | R2S = uint160(std::vector<unsigned char>(R2Array,R2Array+20)) |
const unsigned char | ZeroArray [] |
const uint256 | ZeroL = uint256(std::vector<unsigned char>(ZeroArray,ZeroArray+32)) |
const uint160 | ZeroS = uint160(std::vector<unsigned char>(ZeroArray,ZeroArray+20)) |
const unsigned char | OneArray [] |
const uint256 | OneL = uint256(std::vector<unsigned char>(OneArray,OneArray+32)) |
const uint160 | OneS = uint160(std::vector<unsigned char>(OneArray,OneArray+20)) |
const unsigned char | MaxArray [] |
const uint256 | MaxL = uint256(std::vector<unsigned char>(MaxArray,MaxArray+32)) |
const uint160 | MaxS = uint160(std::vector<unsigned char>(MaxArray,MaxArray+20)) |
|
static |
BOOST_AUTO_TEST_CASE | ( | basics | ) |
BOOST_AUTO_TEST_CASE | ( | check_ONE | ) |
Definition at line 329 of file uint256_tests.cpp.
BOOST_AUTO_TEST_CASE | ( | comparison | ) |
BOOST_AUTO_TEST_CASE | ( | from_hex | ) |
Definition at line 292 of file uint256_tests.cpp.
BOOST_AUTO_TEST_CASE | ( | from_user_hex | ) |
BOOST_AUTO_TEST_CASE | ( | FromHex_vs_uint256 | ) |
BOOST_AUTO_TEST_CASE | ( | methods | ) |
void TestFromHex | ( | ) |
Implemented as a templated function so it can be reused by other classes that have a FromHex() method that wraps base_blob::FromHex(), such as transaction_identifier::FromHex().
Definition at line 252 of file uint256_tests.cpp.
const unsigned char MaxArray[] |
Definition at line 46 of file uint256_tests.cpp.
Definition at line 49 of file uint256_tests.cpp.
Definition at line 50 of file uint256_tests.cpp.
const unsigned char OneArray[] |
Definition at line 40 of file uint256_tests.cpp.
Definition at line 43 of file uint256_tests.cpp.
Definition at line 44 of file uint256_tests.cpp.
const unsigned char R1Array[] |
Definition at line 21 of file uint256_tests.cpp.
const char R1ArrayHex[] = "7D1DE5EAF9B156D53208F033B5AA8122D2d2355d5e12292b121156cfdb4a529c" |
Definition at line 24 of file uint256_tests.cpp.
Definition at line 25 of file uint256_tests.cpp.
Definition at line 26 of file uint256_tests.cpp.
const unsigned char R2Array[] |
Definition at line 28 of file uint256_tests.cpp.
Definition at line 31 of file uint256_tests.cpp.
Definition at line 32 of file uint256_tests.cpp.
const unsigned char ZeroArray[] |
Definition at line 34 of file uint256_tests.cpp.
Definition at line 37 of file uint256_tests.cpp.