fix function naming, minor tests refactor
This commit is contained in:
parent
dcbc86a2f0
commit
0fd00aaf6a
2 changed files with 22 additions and 18 deletions
|
@ -3,11 +3,11 @@ use std::{env, fs};
|
||||||
use walkdir::WalkDir;
|
use walkdir::WalkDir;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
export_stdlib_js();
|
export_stdlib();
|
||||||
export_metadata();
|
export_metadata();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn export_stdlib_js() {
|
fn export_stdlib() {
|
||||||
let root = "../zokrates_stdlib/stdlib";
|
let root = "../zokrates_stdlib/stdlib";
|
||||||
let mut stdlib = json::JsonValue::new_object();
|
let mut stdlib = json::JsonValue::new_object();
|
||||||
|
|
||||||
|
|
|
@ -245,24 +245,28 @@ describe("tests", () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
describe("ark", () => {
|
let combinations = {
|
||||||
for (const scheme of ["g16", "gm17", "marlin"]) {
|
ark: {
|
||||||
describe(scheme, () => {
|
schemes: ["g16", "gm17", "marlin"],
|
||||||
for (const curve of ["bn128", "bls12_381", "bls12_377", "bw6_761"]) {
|
curves: ["bn128", "bls12_381", "bls12_377", "bw6_761"],
|
||||||
describe(curve, () =>
|
},
|
||||||
runWithOptions({ backend: "ark", scheme, curve })
|
bellman: {
|
||||||
);
|
schemes: ["g16"],
|
||||||
}
|
curves: ["bn128"],
|
||||||
});
|
},
|
||||||
}
|
};
|
||||||
});
|
|
||||||
|
|
||||||
describe("bellman", () => {
|
for (const backend of Object.keys(combinations)) {
|
||||||
describe("g16", () => {
|
describe(backend, () => {
|
||||||
describe("bn128", () =>
|
for (const scheme of combinations[backend].schemes) {
|
||||||
runWithOptions({ backend: "bellman", scheme: "g16", curve: "bn128" }));
|
describe(scheme, () => {
|
||||||
|
for (const curve of combinations[backend].curves) {
|
||||||
|
describe(curve, () => runWithOptions({ backend, scheme, curve }));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
const testRunner = (rootPath, testPath, test) => {
|
const testRunner = (rootPath, testPath, test) => {
|
||||||
let entryPoint;
|
let entryPoint;
|
||||||
|
|
Loading…
Reference in a new issue