🥖 assert vs. require

This commit is contained in:
Dr. Mia von Steinkirch 2022-10-19 19:02:50 -07:00 committed by GitHub
parent 4c129be903
commit f4c2a5de47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,14 @@
## 🍣 tests in solidity ## 🍣 tests in solidity
<br>
### assert vs. require
* Assert() should only be used to test for internal errors, and to check invariants.
* Require() should be used to ensure valid conditions are met that cannot be detected until execution time.
* You may optionally provide a message for require, but not for assert.
<br> <br>
### unit testing ### unit testing