diff --git a/foundry/unit-testing.md b/foundry/unit-testing.md index 66b1ac8..ae88d23 100644 --- a/foundry/unit-testing.md +++ b/foundry/unit-testing.md @@ -2,6 +2,16 @@
+### 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. + +
+ + + ### functions