Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/linked multi tests #132

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions test/linked/linked.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import {expect} from "chai";
import {describe} from "mocha";

const path = require("path");
const wasmTester = require("circom_tester").wasm;

describe("Test linkedMultiQuery10.circom", function () {

this.timeout(600000);

let circuit;

before(async () => {
circuit = await wasmTester(
path.join(__dirname, "../../circuits", "linkedMultiQuery10.circom"),
{
output: path.join(__dirname, "circuits", "build"),
recompile: true,
},
);

});

after(async () => {
circuit.release()
})

const basePath = '../../testvectorgen/credentials/linked/testdata/linked'
const tests = [

require(`${basePath}/one_query.json`),
require(`${basePath}/two_queries.json`),

];

tests.forEach(({ desc, inputs, expOut }) => {
it(`${desc}`, async function () {
const w = await circuit.calculateWitness(inputs, true);
await circuit.assertOut(w, expOut);
await circuit.checkConstraints(w);
});
});

});
Loading
Loading