1
- #include " barretenberg/common/test.hpp"
2
- #include < type_traits>
3
-
4
- #include " ../bigfield/bigfield.hpp"
5
1
#include " ../biggroup/biggroup.hpp"
2
+ #include " ../bigfield/bigfield.hpp"
6
3
#include " ../bool/bool.hpp"
7
4
#include " ../field/field.hpp"
5
+ #include " barretenberg/common/test.hpp"
6
+ #include " barretenberg/numeric/random/engine.hpp"
8
7
#include " barretenberg/stdlib/primitives/circuit_builders/circuit_builders.hpp"
9
-
10
8
#include " barretenberg/stdlib/primitives/curves/bn254.hpp"
11
9
#include " barretenberg/stdlib/primitives/curves/secp256k1.hpp"
12
10
#include " barretenberg/stdlib/primitives/curves/secp256r1.hpp"
13
11
14
- #include " barretenberg/numeric/random/engine.hpp"
15
- #include < memory>
16
-
17
12
namespace test_stdlib_biggroup {
18
13
namespace {
19
14
auto & engine = numeric::random::get_debug_engine();
@@ -825,12 +820,17 @@ template <typename TestType> class stdlib_biggroup : public testing::Test {
825
820
826
821
enum UseBigfield { No, Yes };
827
822
using TestTypes = testing::Types<TestType<stdlib::bn254<proof_system::StandardCircuitBuilder>, UseBigfield::No>,
828
- TestType<stdlib::bn254<proof_system::UltraCircuitBuilder>, UseBigfield::Yes>>;
823
+ TestType<stdlib::bn254<proof_system::UltraCircuitBuilder>, UseBigfield::Yes>,
824
+ TestType<stdlib::bn254<proof_system::GoblinUltraCircuitBuilder>, UseBigfield::No>>;
829
825
830
826
TYPED_TEST_SUITE (stdlib_biggroup, TestTypes);
831
827
828
+ template <typename T>
829
+ concept HasGoblinBuilder = IsGoblinBuilder<typename T::Curve::Builder>;
830
+
832
831
TYPED_TEST (stdlib_biggroup, add)
833
832
{
833
+
834
834
TestFixture::test_add ();
835
835
}
836
836
TYPED_TEST (stdlib_biggroup, sub)
@@ -843,23 +843,39 @@ TYPED_TEST(stdlib_biggroup, dbl)
843
843
}
844
844
TYPED_TEST (stdlib_biggroup, montgomery_ladder)
845
845
{
846
- TestFixture::test_montgomery_ladder ();
846
+ if constexpr (HasGoblinBuilder<TypeParam>) {
847
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
848
+ } else {
849
+ TestFixture::test_montgomery_ladder ();
850
+ };
847
851
}
848
852
HEAVY_TYPED_TEST (stdlib_biggroup, mul)
849
853
{
850
854
TestFixture::test_mul ();
851
855
}
852
856
HEAVY_TYPED_TEST (stdlib_biggroup, twin_mul)
853
857
{
854
- TestFixture::test_twin_mul ();
858
+ if constexpr (HasGoblinBuilder<TypeParam>) {
859
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
860
+ } else {
861
+ TestFixture::test_twin_mul ();
862
+ };
855
863
}
856
864
HEAVY_TYPED_TEST (stdlib_biggroup, triple_mul)
857
865
{
858
- TestFixture::test_triple_mul ();
866
+ if constexpr (HasGoblinBuilder<TypeParam>) {
867
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
868
+ } else {
869
+ TestFixture::test_triple_mul ();
870
+ };
859
871
}
860
872
HEAVY_TYPED_TEST (stdlib_biggroup, quad_mul)
861
873
{
862
- TestFixture::test_quad_mul ();
874
+ if constexpr (HasGoblinBuilder<TypeParam>) {
875
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
876
+ } else {
877
+ TestFixture::test_quad_mul ();
878
+ };
863
879
}
864
880
HEAVY_TYPED_TEST (stdlib_biggroup, one)
865
881
{
@@ -872,12 +888,20 @@ HEAVY_TYPED_TEST(stdlib_biggroup, batch_mul)
872
888
HEAVY_TYPED_TEST (stdlib_biggroup, chain_add)
873
889
{
874
890
875
- TestFixture::test_chain_add ();
891
+ if constexpr (HasGoblinBuilder<TypeParam>) {
892
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
893
+ } else {
894
+ TestFixture::test_chain_add ();
895
+ };
876
896
}
877
897
HEAVY_TYPED_TEST (stdlib_biggroup, multiple_montgomery_ladder)
878
898
{
879
899
880
- TestFixture::test_multiple_montgomery_ladder ();
900
+ if constexpr (HasGoblinBuilder<TypeParam>) {
901
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
902
+ } else {
903
+ TestFixture::test_multiple_montgomery_ladder ();
904
+ };
881
905
}
882
906
883
907
HEAVY_TYPED_TEST (stdlib_biggroup, compute_naf)
@@ -897,7 +921,11 @@ HEAVY_TYPED_TEST(stdlib_biggroup, compute_naf)
897
921
HEAVY_TYPED_TEST (stdlib_biggroup, wnaf_batch_mul)
898
922
{
899
923
if constexpr (HasPlookup<typename TypeParam::Curve::Builder>) {
900
- TestFixture::test_compute_wnaf ();
924
+ if constexpr (HasGoblinBuilder<TypeParam>) {
925
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
926
+ } else {
927
+ TestFixture::test_compute_wnaf ();
928
+ };
901
929
} else {
902
930
GTEST_SKIP ();
903
931
}
@@ -921,15 +949,23 @@ HEAVY_TYPED_TEST(stdlib_biggroup, batch_mul_short_scalars)
921
949
if constexpr (TypeParam::use_bigfield) {
922
950
GTEST_SKIP ();
923
951
} else {
924
- TestFixture::test_batch_mul_short_scalars ();
952
+ if constexpr (HasGoblinBuilder<TypeParam>) {
953
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
954
+ } else {
955
+ TestFixture::test_batch_mul_short_scalars ();
956
+ };
925
957
}
926
958
}
927
959
HEAVY_TYPED_TEST (stdlib_biggroup, wnaf_batch_mul_128_bit)
928
960
{
929
961
if constexpr (TypeParam::use_bigfield) {
930
962
GTEST_SKIP ();
931
963
} else {
932
- TestFixture::test_wnaf_batch_mul_128_bit ();
964
+ if constexpr (HasGoblinBuilder<TypeParam>) {
965
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
966
+ } else {
967
+ TestFixture::test_wnaf_batch_mul_128_bit ();
968
+ };
933
969
}
934
970
}
935
971
HEAVY_TYPED_TEST (stdlib_biggroup, wnaf_batch_4)
@@ -945,15 +981,23 @@ HEAVY_TYPED_TEST(stdlib_biggroup, wnaf_batch_4)
945
981
HEAVY_TYPED_TEST (stdlib_biggroup, bn254_endo_batch_mul)
946
982
{
947
983
if constexpr (TypeParam::Curve::type == proof_system::CurveType::BN254 && !TypeParam::use_bigfield) {
948
- TestFixture::test_bn254_endo_batch_mul ();
984
+ if constexpr (HasGoblinBuilder<TypeParam>) {
985
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
986
+ } else {
987
+ TestFixture::test_bn254_endo_batch_mul ();
988
+ };
949
989
} else {
950
990
GTEST_SKIP ();
951
991
}
952
992
}
953
993
HEAVY_TYPED_TEST (stdlib_biggroup, mixed_mul_bn254_endo)
954
994
{
955
995
if constexpr (TypeParam::Curve::type == proof_system::CurveType::BN254 && !TypeParam::use_bigfield) {
956
- TestFixture::test_mixed_mul_bn254_endo ();
996
+ if constexpr (HasGoblinBuilder<TypeParam>) {
997
+ GTEST_SKIP () << " https://github.com/AztecProtocol/barretenberg/issues/707" ;
998
+ } else {
999
+ TestFixture::test_mixed_mul_bn254_endo ();
1000
+ };
957
1001
} else {
958
1002
GTEST_SKIP ();
959
1003
}
0 commit comments