Bitcoin ABC 0.30.5
P2P Digital Currency
Classes | Macros | Functions
voterecord_tests.cpp File Reference
#include <avalanche/voterecord.h>
#include <test/util/random.h>
#include <test/util/setup_common.h>
#include <boost/test/unit_test.hpp>
Include dependency graph for voterecord_tests.cpp:

Go to the source code of this file.

Classes

struct  VoteRecordFixture
 

Macros

#define REGISTER_VOTE_AND_CHECK(vr, vote, state, finalized, stale, confidence)
 

Functions

 BOOST_AUTO_TEST_CASE (vote_record)
 
 BOOST_AUTO_TEST_CASE (stale_vote_always_inconclusive)
 
 BOOST_AUTO_TEST_CASE (stale_vote_at_all_confidence_levels)
 
 BOOST_AUTO_TEST_CASE (stale_vote_random_then_inconclusive)
 
 BOOST_AUTO_TEST_CASE (stale_vote_with_confidence_flips)
 
 BOOST_AUTO_TEST_CASE (duplicate_votes)
 

Macro Definition Documentation

◆ REGISTER_VOTE_AND_CHECK

#define REGISTER_VOTE_AND_CHECK (   vr,
  vote,
  state,
  finalized,
  stale,
  confidence 
)
Value:
vr.registerVote(nextNodeId(), vote); \
BOOST_CHECK_EQUAL(vr.isAccepted(), state); \
BOOST_CHECK_EQUAL(vr.hasFinalized(), finalized); \
BOOST_CHECK_EQUAL(vr.isStale(), stale); \
BOOST_CHECK_EQUAL(vr.getConfidence(), confidence);

Definition at line 28 of file voterecord_tests.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/6]

BOOST_AUTO_TEST_CASE ( duplicate_votes  )

Definition at line 312 of file voterecord_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/6]

BOOST_AUTO_TEST_CASE ( stale_vote_always_inconclusive  )

Definition at line 140 of file voterecord_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [3/6]

BOOST_AUTO_TEST_CASE ( stale_vote_at_all_confidence_levels  )

Definition at line 161 of file voterecord_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [4/6]

BOOST_AUTO_TEST_CASE ( stale_vote_random_then_inconclusive  )

Definition at line 204 of file voterecord_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/6]

BOOST_AUTO_TEST_CASE ( stale_vote_with_confidence_flips  )

Definition at line 237 of file voterecord_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/6]

BOOST_AUTO_TEST_CASE ( vote_record  )

Definition at line 35 of file voterecord_tests.cpp.

Here is the call graph for this function: