Bitcoin ABC  0.28.12
P2P Digital Currency
Macros | Functions | Variables
tests_impl.h File Reference
#include "include/secp256k1.h"
#include "include/secp256k1_multiset.h"
#include "util.h"
#include "testrand.h"
Include dependency graph for tests_impl.h:

Go to the source code of this file.

Macros

#define DATALEN   64*3
 
#define DATACOUNT   100
 
#define CHECK_EQUAL(a, b)
 
#define CHECK_NOTEQUAL(a, b)
 

Functions

static void initdata (void)
 
void test_unordered (void)
 
void test_combine (void)
 
void test_remove (void)
 
void test_duplicate (void)
 
void test_empty (void)
 
void test_testvector (void)
 
void run_multiset_tests (void)
 

Variables

static unsigned char elements [DATACOUNT][DATALEN]
 

Macro Definition Documentation

◆ CHECK_EQUAL

#define CHECK_EQUAL (   a,
 
)
Value:
{ \
unsigned char hash1[32]; \
unsigned char hash2[32]; \
secp256k1_multiset_finalize(ctx, hash1, (a)); \
secp256k1_multiset_finalize(ctx, hash2, (b)); \
CHECK(memcmp(hash1,hash2,sizeof(hash1))==0); \
}
secp256k1_context * ctx

Definition at line 20 of file tests_impl.h.

◆ CHECK_NOTEQUAL

#define CHECK_NOTEQUAL (   a,
 
)
Value:
{ \
unsigned char hash1[32]; \
unsigned char hash2[32]; \
secp256k1_multiset_finalize(ctx, hash1, (a)); \
secp256k1_multiset_finalize(ctx, hash2, (b)); \
CHECK(memcmp(hash1,hash2,sizeof(hash1))!=0); \
}

Definition at line 28 of file tests_impl.h.

◆ DATACOUNT

#define DATACOUNT   100

Definition at line 17 of file tests_impl.h.

◆ DATALEN

#define DATALEN   64*3

Definition at line 16 of file tests_impl.h.

Function Documentation

◆ initdata()

static void initdata ( void  )
static

Definition at line 39 of file tests_impl.h.

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

◆ run_multiset_tests()

void run_multiset_tests ( void  )

Definition at line 336 of file tests_impl.h.

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

◆ test_combine()

void test_combine ( void  )

Definition at line 100 of file tests_impl.h.

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

◆ test_duplicate()

void test_duplicate ( void  )

Definition at line 226 of file tests_impl.h.

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

◆ test_empty()

void test_empty ( void  )

Definition at line 259 of file tests_impl.h.

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

◆ test_remove()

void test_remove ( void  )

Definition at line 170 of file tests_impl.h.

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

◆ test_testvector()

void test_testvector ( void  )

Definition at line 276 of file tests_impl.h.

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

◆ test_unordered()

void test_unordered ( void  )

Definition at line 50 of file tests_impl.h.

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

Variable Documentation

◆ elements

unsigned char elements[DATACOUNT][DATALEN]
static

Definition at line 36 of file tests_impl.h.