mirror of
https://github.com/autistic-symposium/blockchains-security-toolkit.git
synced 2025-06-06 22:19:01 -04:00
🥖 assert vs. require
This commit is contained in:
parent
4c129be903
commit
f4c2a5de47
1 changed files with 9 additions and 0 deletions
|
@ -1,5 +1,14 @@
|
|||
## 🍣 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>
|
||||
|
||||
### unit testing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue