libsnark: Don't (implicitly) rely on other tests initializing the public params

If the other tests are not run, these tests crash with a segfault.
This commit is contained in:
Per Grön 2018-01-13 12:57:06 +01:00
parent 2d8ee6a68a
commit 9b006ce9e8
2 changed files with 4 additions and 0 deletions

View File

@ -86,6 +86,8 @@ void test_qap(const size_t qap_degree, const size_t num_inputs, const bool binar
TEST(relations, qap)
{
alt_bn128_pp::init_public_params();
start_profiling();
const size_t num_inputs = 10;

View File

@ -38,6 +38,8 @@ void test_r1cs_ppzksnark(size_t num_constraints,
TEST(zk_proof_systems, r1cs_ppzksnark)
{
alt_bn128_pp::init_public_params();
start_profiling();
test_r1cs_ppzksnark<alt_bn128_pp>(1000, 20);