mirror of
https://github.com/arnaucube/circom_tester.git
synced 2026-02-07 11:26:41 +01:00
tester for c added
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const chai = require("chai");
|
||||
const path = require("path");
|
||||
const wasm_tester = require("./../index").wasm;
|
||||
const c_tester = require("./../index").c;
|
||||
|
||||
const F1Field = require("ffjavascript").F1Field;
|
||||
const Scalar = require("ffjavascript").Scalar;
|
||||
@@ -12,11 +13,17 @@ const assert = chai.assert;
|
||||
describe("Simple test", function () {
|
||||
this.timeout(100000);
|
||||
|
||||
it("Checking the compilation of simple circuit", async () => {
|
||||
it("Checking the compilation of a simple circuit generating wasm", async () => {
|
||||
|
||||
const circuit = await wasm_tester(path.join(__dirname, "Multiplier2.circom"));
|
||||
const w = await circuit.calculateWitness({a: 2, b: 4});
|
||||
await circuit.checkConstraints(w);
|
||||
});
|
||||
|
||||
it("Checking the compilation of a simple circuit generating C", async () => {
|
||||
|
||||
const circuit = await c_tester(path.join(__dirname, "Multiplier2.circom"));
|
||||
const w = await circuit.calculateWitness({a: 2, b: 4});
|
||||
await circuit.checkConstraints(w);
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user