nescience/tests/test_r1cs.nim

8 lines
373 B
Nim
Raw Normal View History

2020-10-05 07:04:05 +00:00
import unittest, stint
import ../nescience/languages/r1cs
test "load r1cs":
let sumtest = r1cs.load("./tests/data/sumtest.bn-128.r1cs")
check sumtest.headerSection.prime == u256("21888242871839275222246405745257275088548364400416034343698204186575808495617")
check sumtest.headerSection.numberOfConstraints == 97 and len(sumtest.constraintSection.constraints) == 97