PIVX Core  5.6.99
P2P Digital Currency
Macros | Functions
merkletree_tests.cpp File Reference
#include "test/test_pivx.h"
#include "test/data/merkle_roots_sapling.json.h"
#include "test/data/merkle_serialization_sapling.json.h"
#include "test/data/merkle_witness_serialization_sapling.json.h"
#include "test/data/merkle_path_sapling.json.h"
#include "test/data/merkle_commitments_sapling.json.h"
#include <iostream>
#include <stdexcept>
#include "utilstrencodings.h"
#include "version.h"
#include "serialize.h"
#include "streams.h"
#include "sapling/incrementalmerkletree.h"
#include "sapling/sapling_util.h"
#include "json_test_vectors.h"
#include <boost/test/unit_test.hpp>
Include dependency graph for merkletree_tests.cpp:

Go to the source code of this file.

Macros

#define MAKE_STRING(x)   std::string((x), (x)+sizeof(x))
 

Functions

template<typename A , typename B , typename C >
void expect_ser_test_vector (B &b, const C &c, const A &tree)
 
template<typename Tree , typename Witness >
void test_tree (UniValue commitment_tests, UniValue root_tests, UniValue ser_tests, UniValue witness_ser_tests, UniValue path_tests)
 
 BOOST_AUTO_TEST_CASE (SaplingVectors)
 
 BOOST_AUTO_TEST_CASE (emptyroots)
 
 BOOST_AUTO_TEST_CASE (EmptyrootsSapling)
 
 BOOST_AUTO_TEST_CASE (EmptyrootSapling)
 

Macro Definition Documentation

◆ MAKE_STRING

#define MAKE_STRING (   x)    std::string((x), (x)+sizeof(x))

Definition at line 119 of file merkletree_tests.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/4]

BOOST_AUTO_TEST_CASE ( emptyroots  )

Definition at line 137 of file merkletree_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/4]

BOOST_AUTO_TEST_CASE ( EmptyrootSapling  )

Definition at line 167 of file merkletree_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/4]

BOOST_AUTO_TEST_CASE ( EmptyrootsSapling  )

Definition at line 152 of file merkletree_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/4]

BOOST_AUTO_TEST_CASE ( SaplingVectors  )

Definition at line 121 of file merkletree_tests.cpp.

Here is the call graph for this function:

◆ expect_ser_test_vector()

template<typename A , typename B , typename C >
void expect_ser_test_vector ( B b,
const C &  c,
const A &  tree 
)

Definition at line 33 of file merkletree_tests.cpp.

Here is the caller graph for this function:

◆ test_tree()

template<typename Tree , typename Witness >
void test_tree ( UniValue  commitment_tests,
UniValue  root_tests,
UniValue  ser_tests,
UniValue  witness_ser_tests,
UniValue  path_tests 
)

Definition at line 38 of file merkletree_tests.cpp.

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