Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/proof_tests.cpp
Show All 12 Lines | |||||
#include <util/translation.h> | #include <util/translation.h> | ||||
#include <test/util/setup_common.h> | #include <test/util/setup_common.h> | ||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
using namespace avalanche; | using namespace avalanche; | ||||
BOOST_FIXTURE_TEST_SUITE(proof_tests, TestingSetup) | BOOST_FIXTURE_TEST_SUITE(proof_tests, TestChain100Setup) | ||||
BOOST_AUTO_TEST_CASE(proof_random) { | BOOST_AUTO_TEST_CASE(proof_random) { | ||||
for (int i = 0; i < 1000; i++) { | for (int i = 0; i < 1000; i++) { | ||||
const uint32_t score = InsecureRand32(); | const uint32_t score = InsecureRand32(); | ||||
auto p = buildRandomProof(score); | auto p = buildRandomProof(score); | ||||
BOOST_CHECK_EQUAL(p->getScore(), score); | BOOST_CHECK_EQUAL(p->getScore(), score); | ||||
ProofValidationResult expected_state = | ProofValidationResult expected_state = | ||||
▲ Show 20 Lines • Show All 1,049 Lines • Show Last 20 Lines |