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:
Ernesto García
2023-06-12 17:41:52 -06:00
committed by GitHub
parent 08fd777f6d
commit b425a72240
138 changed files with 3220 additions and 1287 deletions

View File

@ -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 () {