Skip to content

Commit

Permalink
[tests] add R1CS parser test to testDesc, update path to binary file
Browse files Browse the repository at this point in the history
  • Loading branch information
Vindaar committed Jun 12, 2024
1 parent 31d2858 commit e02a6da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions constantine.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@ const testDesc: seq[tuple[path: string, useGMP: bool]] = @[
("tests/t_ethereum_eip4844_deneb_kzg.nim", false),
("tests/t_ethereum_eip4844_deneb_kzg_parallel.nim", false),
("tests/t_ethereum_verkle_primitives.nim", false),

# Proof systems
# ----------------------------------------------------------
("tests/proof_systems/t_r1cs_parser.nim", false),
]

const testDescNvidia: seq[string] = @[
Expand Down
3 changes: 2 additions & 1 deletion tests/proof_systems/t_r1cs_parser.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import
../../constantine/proof_systems/constraint_systems/r1cs_circom_parser


const TestDir = currentSourcePath.rsplit(DirSep, 1)[0]
suite "R1CS binary file parser":

test "Parse basic example R1CS file":
# Note: The example test file used here is from:
# https://github.com/iden3/r1csfile/tree/master/test/testutils
const path = "r1cs_test_files/example.r1cs"
const path = TestDir / "r1cs_test_files/example.r1cs"
let r1cs = parseR1csFile(path)

## XXX: On 32bit systems `seq[BaseType]` should have twice as many elements
Expand Down

0 comments on commit e02a6da

Please sign in to comment.