|
|
|
|
|
by whynotmaybe
63 days ago
|
|
> it's pretty old. Damn, must be why only white hair is growing on my head now. >Nowadays I think this would be done with fuzzing/constraint tests, where you define "this relation must hold true" in a more structured way so the framework can choose random values, test more at once, and give better failure messages. So the concept of random is still there but expressed differently ? (= Am I partially right ?) |
|
Here's an example with a python library: https://hypothesis.readthedocs.io/en/latest/tutorial/introdu...
The strategy "st.lists(st.integers())" generates a random list of integers that get passed into the test function.
And also this page says by default tests would be run (up to) 100 times: https://hypothesis.readthedocs.io/en/latest/tutorial/setting...
So I'm thinking... (not tested)
...which is of course a little silly, but math_add() is a bit of a silly function anyway.