arnaucube
arnaucube/circom_testerPublic Self-hosted repository
comiler errors handled
alrubio alberu04@ucm.es
Wed, 06 Oct 2021 14:33:19 +0200
commit

8580d8cc0f3a079f2b411e9a96075bdd31c87415

parent

30f12bf326bcf803adafc16a5853be894965a212

2 files changed, 5 insertions(+), 3 deletions(-)

jump to
M test/multiplier2.js → test/multiplier2.js

@@ -9,10 +9,10 @@ const Fr = new F1Field(exports.p);

const assert = chai.assert; -describe("Exponentioation test", function () { +describe("Simple test", function () { this.timeout(100000); - it("Should generate the Exponentiation table in k=0", async () => { + it("Checking the compilation of simple circuit", async () => { const circuit = await wasm_tester(path.join(__dirname, "Multiplier2.circom")); const w = await circuit.calculateWitness({a: 2, b: 4});
M wasm/tester.js → wasm/tester.js

@@ -52,7 +52,9 @@ if (options.r1cs) flags += "--r1cs ";

if (options.json) flags += "--json "; if (options.output) flags += "--output " + options.output + " "; - await exec("circom " + flags + fileName); + b = await exec("circom " + flags + fileName); + assert(b.stderr == "", + "circom compiler error \n" + b.stderr); } class WasmTester {