mirror of
https://github.com/arnaucube/kesto.git
synced 2026-02-08 03:56:41 +01:00
Add circom-examples/equation.circom
This commit is contained in:
24
circom-examples/test/equation.test.ts
Normal file
24
circom-examples/test/equation.test.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
const path = require("path");
|
||||
const tester = require("circom").tester;
|
||||
const chai = require("chai");
|
||||
const assert = chai.assert;
|
||||
|
||||
export {};
|
||||
|
||||
describe("equation test", function () {
|
||||
this.timeout(200000);
|
||||
|
||||
|
||||
it("Test equation", async () => {
|
||||
const circuit = await tester(
|
||||
path.join(__dirname, "../circuits", "equation.circom"),
|
||||
{reduceConstraints: false}
|
||||
);
|
||||
|
||||
const witness = await circuit.calculateWitness({
|
||||
"x": 4,
|
||||
"y": 2
|
||||
});
|
||||
await circuit.checkConstraints(witness);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user