mirror of
https://github.com/arnaucube/go-circom-prover-verifier.git
synced 2026-02-06 19:06:43 +01:00
Test all fields of parsed binary pk
This commit is contained in:
1
cli/.gitignore
vendored
Normal file
1
cli/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
cli
|
||||
@@ -238,6 +238,11 @@ func testCircuitParsePkBin(t *testing.T, circuit string) {
|
||||
assert.Equal(t, pkJ.B2, pk.B2)
|
||||
assert.Equal(t, pkJ.C, pk.C)
|
||||
assert.Equal(t, pkJ.HExps[:pkJ.DomainSize], pk.HExps[:pk.DomainSize]) // circom behaviour
|
||||
|
||||
assert.Equal(t, pkJ.NVars, pk.NVars)
|
||||
assert.Equal(t, pkJ.NPublic, pk.NPublic)
|
||||
assert.Equal(t, pkJ.DomainSize, pk.DomainSize)
|
||||
assert.Equal(t, pkJ.PolsC, pk.PolsC)
|
||||
}
|
||||
|
||||
func TestParsePkBin(t *testing.T) {
|
||||
@@ -274,6 +279,17 @@ func testGoCircomPkFormat(t *testing.T, circuit string) {
|
||||
assert.Equal(t, pk.HExps, pkG.HExps)
|
||||
assert.Equal(t, pk.PolsA, pkG.PolsA)
|
||||
assert.Equal(t, pk.PolsB, pkG.PolsB)
|
||||
|
||||
assert.Equal(t, pk.NVars, pkG.NVars)
|
||||
assert.Equal(t, pk.NPublic, pkG.NPublic)
|
||||
assert.Equal(t, pk.DomainSize, pkG.DomainSize)
|
||||
assert.Equal(t, pk.PolsC, pkG.PolsC)
|
||||
|
||||
// pkPrettyJSON, err := json.MarshalIndent(pk, "", " ")
|
||||
// require.Nil(t, err)
|
||||
// pkGoPrettyJSON, err := json.MarshalIndent(pkG, "", " ")
|
||||
// require.Nil(t, err)
|
||||
// assert.Equal(t, pkPrettyJSON, pkGoPrettyJSON)
|
||||
}
|
||||
|
||||
func TestGoCircomPkFormat(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user