1
0
Fork 0
mirror of synced 2025-09-23 04:08:33 +00:00

fix function naming, minor tests refactor

This commit is contained in:
dark64 2022-08-22 14:18:56 +02:00
parent dcbc86a2f0
commit 0fd00aaf6a
2 changed files with 22 additions and 18 deletions

View file

@ -3,11 +3,11 @@ use std::{env, fs};
use walkdir::WalkDir;
fn main() {
export_stdlib_js();
export_stdlib();
export_metadata();
}
fn export_stdlib_js() {
fn export_stdlib() {
let root = "../zokrates_stdlib/stdlib";
let mut stdlib = json::JsonValue::new_object();

View file

@ -245,24 +245,28 @@ describe("tests", () => {
});
};
describe("ark", () => {
for (const scheme of ["g16", "gm17", "marlin"]) {
describe(scheme, () => {
for (const curve of ["bn128", "bls12_381", "bls12_377", "bw6_761"]) {
describe(curve, () =>
runWithOptions({ backend: "ark", scheme, curve })
);
}
});
}
});
let combinations = {
ark: {
schemes: ["g16", "gm17", "marlin"],
curves: ["bn128", "bls12_381", "bls12_377", "bw6_761"],
},
bellman: {
schemes: ["g16"],
curves: ["bn128"],
},
};
describe("bellman", () => {
describe("g16", () => {
describe("bn128", () =>
runWithOptions({ backend: "bellman", scheme: "g16", curve: "bn128" }));
for (const backend of Object.keys(combinations)) {
describe(backend, () => {
for (const scheme of combinations[backend].schemes) {
describe(scheme, () => {
for (const curve of combinations[backend].curves) {
describe(curve, () => runWithOptions({ backend, scheme, curve }));
}
});
}
});
});
}
const testRunner = (rootPath, testPath, test) => {
let entryPoint;