mirror of
https://github.com/arnaucube/circom_tester.git
synced 2026-02-07 11:26:41 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
458ab087d7 | ||
|
|
2cd741bdff | ||
|
|
8580d8cc0f |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "circom_tester",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "circom_tester",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.5",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"chai": "^4.3.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "circom_tester",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.5",
|
||||
"description": "Tools for testing circom circuits.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -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});
|
||||
|
||||
@@ -52,7 +52,9 @@ async function compile (fileName, options) {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user