This repository was archived by the owner on Mar 25, 2024. It is now read-only.
Tests for L2EthToken.sol Contract#88
Open
neotheprogramist wants to merge 16 commits intomatter-labs:devfrom
Open
Tests for L2EthToken.sol Contract#88neotheprogramist wants to merge 16 commits intomatter-labs:devfrom
neotheprogramist wants to merge 16 commits intomatter-labs:devfrom
Conversation
AntonD3
suggested changes
Dec 15, 2023
Contributor
There was a problem hiding this comment.
Overall tests look good, I left some small comments about the code itself. And can you add some more test cases:
- For simple methods:
balanceOf,decimals,symbol, andname. Maybe just one simple test case per each. I understand that their logic is pretty simple, but it can help to catch some issues with interface changes, getters, etc. - Negative test cases, for example, when
mintis called by not bootloader.balanceOfwith dirty bytes. And maybe you can think aboutwithdraw.
Apart from that, usually we have another test structure - a separate describe block per each external function. You can have a look at the contract deployer test, for example. IMHO, it makes the test more structured and readable. But if you have another opinion - I am open to discussing it.
AntonD3
suggested changes
Dec 18, 2023
Contributor
AntonD3
left a comment
There was a problem hiding this comment.
Nice, LGTM! Left only a few small comments. And can you please add just some simple test for the totalSupply getter? Sorry, forgot about this getter during the previous review.
AntonD3
reviewed
Dec 22, 2023
AntonD3
reviewed
Jan 2, 2024
AntonD3
reviewed
Jan 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes neotheprogramist#2