You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I look at all the helper functions near the top of tests.c, there are still some things that could be improved:
A lot of these functions could be moved to testutil or testrand, also functions like random_fe, random_fe_magnitude. They're currently only in tests.c but they're utils in the end.
We have functions with group_element and field_element, but they should just be ge and fe.
The ones in testutil should probably also get a secp256k1_testutil prefix then. You could say it's good that they stand out currently, but at least that's inconsistent with the ones in testrand, which have a prefix. Or perhaps better: we use prefixes testutil_ and testrand_, dropping the additional secp256k1_ for test functions. Then they still stand out. (The main purpose of secp256k1_ is to avoid namespace collisions if someone uses the library by just including it, but that doesn't matter in test-only code.)
When I look at all the helper functions near the top of
tests.c
, there are still some things that could be improved:testutil
ortestrand
, also functions likerandom_fe
,random_fe_magnitude
. They're currently only intests.c
but they're utils in the end.group_element
andfield_element
, but they should just bege
andfe
.testutil
should probably also get asecp256k1_testutil
prefix then. You could say it's good that they stand out currently, but at least that's inconsistent with the ones intestrand
, which have a prefix. Or perhaps better: we use prefixestestutil_
andtestrand_
, dropping the additionalsecp256k1_
for test functions. Then they still stand out. (The main purpose ofsecp256k1_
is to avoid namespace collisions if someone uses the library by just including it, but that doesn't matter in test-only code.)Noticed when looking into #1489.
The text was updated successfully, but these errors were encountered: