Skip to content

Commit

Permalink
backend/r1cs: serialization test in less memory-greedy in short mode,…
Browse files Browse the repository at this point in the history
… to please circleCI
  • Loading branch information
gbotrel committed Dec 22, 2020
1 parent 301e3bc commit 352b396
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 10 deletions.
11 changes: 9 additions & 2 deletions internal/backend/bls377/r1cs_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions internal/backend/bls381/r1cs_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions internal/backend/bn256/r1cs_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions internal/backend/bw761/r1cs_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ import (
"github.com/consensys/gurvy"
)
func TestSerialization(t *testing.T) {
var buffer bytes.Buffer
for name, circuit := range circuits.Circuits {
r1cs := circuit.R1CS.ToR1CS(gurvy.{{.Curve}})

if testing.Short() && r1cs.GetNbConstraints() > 50 {
continue
}
buffer.Reset()

t.Run(name, func(t *testing.T) {
r1cs := circuit.R1CS.ToR1CS(gurvy.{{.Curve}})
var buffer bytes.Buffer

var err error
var written, read int64
written, err = r1cs.WriteTo(&buffer)
Expand Down

0 comments on commit 352b396

Please sign in to comment.