Add alt_bn128 to QAP and Merkle tree gadget tests
This commit is contained in:
parent
df3083fe4e
commit
4699d0eb36
|
@ -5,6 +5,7 @@
|
|||
* @copyright MIT license (see LICENSE file)
|
||||
*****************************************************************************/
|
||||
|
||||
#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp"
|
||||
#ifdef CURVE_BN128
|
||||
#include "algebra/curves/bn128/bn128_pp.hpp"
|
||||
#endif
|
||||
|
@ -29,6 +30,9 @@ TEST(gadgetlib1, merkle_tree)
|
|||
{
|
||||
start_profiling();
|
||||
|
||||
alt_bn128_pp::init_public_params();
|
||||
test_all_merkle_tree_gadgets<alt_bn128_pp>();
|
||||
|
||||
#ifdef CURVE_BN128 // BN128 has fancy dependencies so it may be disabled
|
||||
bn128_pp::init_public_params();
|
||||
test_all_merkle_tree_gadgets<bn128_pp>();
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp"
|
||||
#include "algebra/fields/field_utils.hpp"
|
||||
#include "common/profiling.hpp"
|
||||
#include "common/utils.hpp"
|
||||
|
@ -91,9 +92,13 @@ TEST(relations, qap)
|
|||
|
||||
enter_block("Test QAP with binary input");
|
||||
|
||||
test_qap<Fr<alt_bn128_pp> >(1ul << 21, num_inputs, true);
|
||||
|
||||
leave_block("Test QAP with binary input");
|
||||
|
||||
enter_block("Test QAP with field input");
|
||||
|
||||
test_qap<Fr<alt_bn128_pp> >(1ul << 21, num_inputs, false);
|
||||
|
||||
leave_block("Test QAP with field input");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue