Skip to content

Commit

Permalink
chore: fix tests in noirc_abi_wasm (#6688)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Dec 3, 2024
1 parent 7feb658 commit 80c5c7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tooling/noirc_abi_wasm/test/browser/abi_encode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ it('recovers original inputs when abi encoding and decoding', async () => {
const foo: Field = inputs.foo as Field;
const bar: Field[] = inputs.bar as Field[];
expect(BigInt(decoded_inputs.inputs.foo)).to.be.equal(BigInt(foo));
expect(parseInt(decoded_inputs.inputs.bar[0])).to.be.equal(parseInt(bar[0]));
expect(parseInt(decoded_inputs.inputs.bar[1])).to.be.equal(parseInt(bar[1]));
expect(parseInt(decoded_inputs.inputs.bar[2])).to.be.equal(parseInt(bar[2]));
expect(parseInt(decoded_inputs.inputs.bar[0])).to.be.equal(parseInt(bar[0].toString()));
expect(parseInt(decoded_inputs.inputs.bar[1])).to.be.equal(parseInt(bar[1].toString()));
expect(parseInt(decoded_inputs.inputs.bar[2])).to.be.equal(parseInt(bar[2].toString()));
expect(decoded_inputs.return_value).to.be.null;
});
6 changes: 3 additions & 3 deletions tooling/noirc_abi_wasm/test/node/abi_encode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ it('recovers original inputs when abi encoding and decoding', async () => {
const foo: Field = inputs.foo as Field;
const bar: Field[] = inputs.bar as Field[];
expect(BigInt(decoded_inputs.inputs.foo)).to.be.equal(BigInt(foo));
expect(parseInt(decoded_inputs.inputs.bar[0])).to.be.equal(parseInt(bar[0]));
expect(parseInt(decoded_inputs.inputs.bar[1])).to.be.equal(parseInt(bar[1]));
expect(parseInt(decoded_inputs.inputs.bar[2])).to.be.equal(parseInt(bar[2]));
expect(parseInt(decoded_inputs.inputs.bar[0])).to.be.equal(parseInt(bar[0].toString()));
expect(parseInt(decoded_inputs.inputs.bar[1])).to.be.equal(parseInt(bar[1].toString()));
expect(parseInt(decoded_inputs.inputs.bar[2])).to.be.equal(parseInt(bar[2].toString()));
expect(decoded_inputs.return_value).to.be.null;
});

0 comments on commit 80c5c7d

Please sign in to comment.