Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/modules/multiset/tests_impl.h
Show All 34 Lines | |||||
static unsigned char elements[DATACOUNT][DATALEN]; | static unsigned char elements[DATACOUNT][DATALEN]; | ||||
/* Create random data */ | /* Create random data */ | ||||
static void initdata(void) { | static void initdata(void) { | ||||
int n,m; | int n,m; | ||||
for(n=0; n < DATACOUNT; n++) { | for(n=0; n < DATACOUNT; n++) { | ||||
for(m=0; m < DATALEN/4; m++) { | for(m=0; m < DATALEN/4; m++) { | ||||
((uint32_t*) elements[n])[m] = secp256k1_rand32(); | uint32_t x = secp256k1_rand32(); | ||||
memcpy(&elements[n][m], &x, sizeof(x)); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
void test_unordered(void) { | void test_unordered(void) { | ||||
/* Check if multisets are uneffected by order */ | /* Check if multisets are uneffected by order */ | ||||
▲ Show 20 Lines • Show All 275 Lines • Show Last 20 Lines |