Skip to content

Commit

Permalink
test: fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
boray committed Oct 14, 2024
1 parent cd102fc commit ab34d29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lib/provable/test/arithmetic.unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let Arithmetic = ZkProgram({
divMod64: {
privateInputs: [Field],
async method(a: Field) {
return Gadgets.divMod64(a);
return { publicOutput: Gadgets.divMod64(a) };
},
},
},
Expand Down Expand Up @@ -93,6 +93,6 @@ await equivalentAsync({ from: [field], to: divModOutput }, { runs: 3 })(
return divMod64Helper(x);
},
async (x) => {
return (await Arithmetic.divMod64(x)).publicOutput;
return (await Arithmetic.divMod64(x)).proof.publicOutput;
}
);
2 changes: 1 addition & 1 deletion src/lib/provable/test/bitwise.unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ let Bitwise = ZkProgram({
or: {
privateInputs: [Field, Field],
async method(a: Field, b: Field) {
return Gadgets.or(a, b, 64);
return { publicOutput: Gadgets.or(a, b, 64) };
},
},
rot32: {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/provable/test/blake2b.unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const BLAKE2BProgram = ZkProgram({
blake2b: {
privateInputs: [Bytes(192)],
async method(preImage: Bytes) {
return Gadgets.BLAKE2B.hash(preImage);
return { publicOutput: Gadgets.BLAKE2B.hash(preImage) };
},
},
},
Expand All @@ -55,7 +55,7 @@ await equivalentAsync(
},
{ runs: RUNS }
)(nobleBlake2b, async (x) => {
const proof = await BLAKE2BProgram.blake2b(x);
const { proof } = await BLAKE2BProgram.blake2b(x);
await BLAKE2BProgram.verify(proof);
return proof.publicOutput;
});
Expand Down

0 comments on commit ab34d29

Please sign in to comment.