tests: refactor: drop secp256k1_ prefix from testrand.h functions

The rename was done with the following command:

$ sed -i 's/secp256k1_testrand/testrand/g' $(git grep -l secp256k1_testrand)
This commit is contained in:
Sebastian Falbesoner
2024-05-27 03:08:07 +02:00
parent 0ee7453a99
commit e73f6f8fd9
10 changed files with 176 additions and 176 deletions

View File

@@ -14,7 +14,7 @@
static void testutil_random_fe(secp256k1_fe *x) {
unsigned char bin[32];
do {
secp256k1_testrand256(bin);
testrand256(bin);
if (secp256k1_fe_set_b32_limit(x, bin)) {
return;
}
@@ -29,7 +29,7 @@ static void testutil_random_fe_non_zero(secp256k1_fe *nz) {
static void testutil_random_fe_magnitude(secp256k1_fe *fe, int m) {
secp256k1_fe zero;
int n = secp256k1_testrand_int(m + 1);
int n = testrand_int(m + 1);
secp256k1_fe_normalize(fe);
if (n == 0) {
return;
@@ -46,7 +46,7 @@ static void testutil_random_fe_magnitude(secp256k1_fe *fe, int m) {
static void testutil_random_fe_test(secp256k1_fe *x) {
unsigned char bin[32];
do {
secp256k1_testrand256_test(bin);
testrand256_test(bin);
if (secp256k1_fe_set_b32_limit(x, bin)) {
return;
}
@@ -83,7 +83,7 @@ static void testutil_random_ge_test(secp256k1_ge *ge) {
secp256k1_fe fe;
do {
testutil_random_fe_test(&fe);
if (secp256k1_ge_set_xo_var(ge, &fe, secp256k1_testrand_bits(1))) {
if (secp256k1_ge_set_xo_var(ge, &fe, testrand_bits(1))) {
secp256k1_fe_normalize(&ge->y);
break;
}
@@ -111,7 +111,7 @@ static void testutil_random_scalar_order_test(secp256k1_scalar *num) {
do {
unsigned char b32[32];
int overflow = 0;
secp256k1_testrand256_test(b32);
testrand256_test(b32);
secp256k1_scalar_set_b32(num, b32, &overflow);
if (overflow || secp256k1_scalar_is_zero(num)) {
continue;
@@ -124,7 +124,7 @@ static void testutil_random_scalar_order(secp256k1_scalar *num) {
do {
unsigned char b32[32];
int overflow = 0;
secp256k1_testrand256(b32);
testrand256(b32);
secp256k1_scalar_set_b32(num, b32, &overflow);
if (overflow || secp256k1_scalar_is_zero(num)) {
continue;