Changes for page Tips and Tricks
Last modified by chrisby on 2024/04/01 13:11
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -51,3 +51,7 @@ 51 51 //some logic 52 52 assertTrue(y); 53 53 {{/code}} 54 + 55 +* If certain production code needs to be called several times with slightly different arguments, it may be useful to iterate over a list of these arguments, calling the production code and then asserting the result on each iteration. It is then often good practice to print out each element before each assertion. If an element causes a test to fail, the terminal output will immediately show which element caused the error. 56 +* If you find a bug or a case that has not yet been tested, it is your duty to create a test that covers it, so that the software is stable against that problem from that moment on. 57 +* Inaccurate results should never be asserted against an exact value, but only within an expected range of approximation. This includes all floating-point numbers, which are always imprecise.