-
Notifications
You must be signed in to change notification settings - Fork 106
Tests for L2EthToken.sol Contract #88
base: dev
Are you sure you want to change the base?
Tests for L2EthToken.sol Contract #88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
mint
is called by not bootloader.balanceOf
with 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
fixes neotheprogramist#2