Add alt_bn128 to QAP and Merkle tree gadget tests

This commit is contained in:
Jack Grigg 2017-10-11 15:18:01 +01:00
parent df3083fe4e
commit 4699d0eb36
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
2 changed files with 9 additions and 0 deletions

View File

@ -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>();

View File

@ -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");
}