Replace revert strings with custom errors (#4261)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
@ -30,10 +30,10 @@ contract('DoubleEndedQueue', function () {
|
||||
});
|
||||
|
||||
it('reverts on accesses', async function () {
|
||||
await expectRevertCustomError(this.deque.$popBack(0), 'Empty()');
|
||||
await expectRevertCustomError(this.deque.$popFront(0), 'Empty()');
|
||||
await expectRevertCustomError(this.deque.$back(0), 'Empty()');
|
||||
await expectRevertCustomError(this.deque.$front(0), 'Empty()');
|
||||
await expectRevertCustomError(this.deque.$popBack(0), 'QueueEmpty', []);
|
||||
await expectRevertCustomError(this.deque.$popFront(0), 'QueueEmpty', []);
|
||||
await expectRevertCustomError(this.deque.$back(0), 'QueueEmpty', []);
|
||||
await expectRevertCustomError(this.deque.$front(0), 'QueueEmpty', []);
|
||||
});
|
||||
});
|
||||
|
||||
@ -54,7 +54,7 @@ contract('DoubleEndedQueue', function () {
|
||||
});
|
||||
|
||||
it('out of bounds access', async function () {
|
||||
await expectRevertCustomError(this.deque.$at(0, this.content.length), 'OutOfBounds()');
|
||||
await expectRevertCustomError(this.deque.$at(0, this.content.length), 'QueueOutOfBounds', []);
|
||||
});
|
||||
|
||||
describe('push', function () {
|
||||
|
||||
Reference in New Issue
Block a user