Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(token-contract-tests): change intrinsic assertion messages #6386

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('e2e_token_contract reading constants', () => {
await reader.methods.check_symbol_private(t.asset.address, TOKEN_SYMBOL).send().wait();

await expect(reader.methods.check_symbol_private(t.asset.address, 'WRONG_SYMBOL').simulate()).rejects.toThrow(
"Cannot satisfy constraint 'symbol.is_eq(_what)'",
"'symbol.is_eq(_what)'",
);
});

Expand All @@ -87,7 +87,7 @@ describe('e2e_token_contract reading constants', () => {
await reader.methods.check_symbol_public(t.asset.address, TOKEN_SYMBOL).send().wait();

await expect(reader.methods.check_symbol_public(t.asset.address, 'WRONG_SYMBOL').simulate()).rejects.toThrow(
"Failed to solve brillig function 'symbol.is_eq(_what)'",
"'symbol.is_eq(_what)'",
);
});

Expand All @@ -108,8 +108,6 @@ describe('e2e_token_contract reading constants', () => {

await reader.methods.check_decimals_public(t.asset.address, TOKEN_DECIMALS).send().wait();

await expect(reader.methods.check_decimals_public(t.asset.address, 99).simulate()).rejects.toThrow(
"Failed to solve brillig function 'ret == what'",
);
await expect(reader.methods.check_decimals_public(t.asset.address, 99).simulate()).rejects.toThrow("'ret == what'");
});
});
3 changes: 1 addition & 2 deletions yarn-project/end-to-end/src/fixtures/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const privateKey2 = Buffer.from('59c6995e998f97a5a0044966f0945389dc9e86da
/// Common errors
export const U128_UNDERFLOW_ERROR = "Assertion failed: attempt to subtract with underflow 'hi == high'";
export const U128_OVERFLOW_ERROR = "Assertion failed: attempt to add with overflow 'hi == high'";
export const BITSIZE_TOO_BIG_ERROR =
"Assertion failed: call to assert_max_bit_size 'self.__assert_max_bit_size(bit_size)'";
export const BITSIZE_TOO_BIG_ERROR = "'self.__assert_max_bit_size(bit_size)'";
// TODO(https://github.com/AztecProtocol/aztec-packages/issues/5818): Make this a fixed error after transition.
export const DUPLICATE_NULLIFIER_ERROR = /Transaction .*|.*duplicate nullifier.*/;
Loading