Skip to content

Commit

Permalink
comments for mul 01 by 01 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shramee committed Mar 8, 2024
1 parent 426e330 commit c7f1e51
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions std/algebra/emulated/fields_bn254/e6_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ func (circuit *e6Mul01By01) Define(api frontend.API) error {

func TestMul01By01(t *testing.T) {

// we test our new E3.Mul01By01 against E3.MulBy01
assert := test.NewAssert(t)
// witness values
var a, c bn254.E6
Expand All @@ -290,6 +291,10 @@ func TestMul01By01(t *testing.T) {
_, _ = A1.SetRandom()
_, _ = B0.SetRandom()
_, _ = B1.SetRandom()

// build a 01 sparse E3 with,
// first two elements as A1 and A2,
// and the third as 0
a.B0 = A0
a.B1 = A1
a.B2.SetZero()
Expand Down
4 changes: 4 additions & 0 deletions std/algebra/emulated/fields_bw6761/e3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ func (circuit *e3Mul01By01) Define(api frontend.API) error {

func TestMul01By01(t *testing.T) {

// we test our new E3.Mul01By01 against E3.MulBy01
assert := test.NewAssert(t)
// witness values
var a, c bw6761.E3
Expand All @@ -176,6 +177,9 @@ func TestMul01By01(t *testing.T) {
A1.SetRandom()
B0.SetRandom()
B1.SetRandom()
// build a 01 sparse E3 with,
// first two elements as A1 and A2,
// and the third as 0
a.A0 = A0
a.A1 = A1
a.A2.SetZero()
Expand Down
4 changes: 4 additions & 0 deletions std/algebra/native/fields_bls12377/e6_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func (circuit *e6Mul01By01) Define(api frontend.API) error {

func TestMul01By01(t *testing.T) {

// we test our new E3.Mul01By01 against E3.MulBy01
var circuit, witness e6Mul01By01
// witness values
var a, c bls12377.E6
Expand All @@ -147,6 +148,9 @@ func TestMul01By01(t *testing.T) {
_, _ = A1.SetRandom()
_, _ = B0.SetRandom()
_, _ = B1.SetRandom()
// build a 01 sparse E3 with,
// first two elements as A1 and A2,
// and the third as 0
a.B0 = A0
a.B1 = A1
a.B2.SetZero()
Expand Down

0 comments on commit c7f1e51

Please sign in to comment.