arnaucube
arnaucube/circomPublic Self-hosted repository
circom/test/inout.js
test/inout.jsRaw
 1const path = require("path");
 2
 3const c_tester = require("../index.js").c_tester;
 4// const stringifyBigInts = require("snarkjs").stringifyBigInts;
 5
 6
 7describe("inout test", function () {
 8    this.timeout(100000);
 9    it("Should compile a code with vars inside a for", async () => {
10        const cir = await c_tester(path.join(__dirname, "circuits", "inout.circom"));
11
12        const out = await cir.calculateWitness({in1: 1, in2: [2,3], in3:[[4,5], [6,7], [8,9]]});
13
14        // console.log(JSON.stringify(stringifyBigInts(out),null,1));
15        await cir.assertOut(out, {out1: 1, out2: [2,3], out3: [[4,5], [6,7],[8,9]]} );
16
17        await cir.release();
18    });
19});