utilities
utilities copied to clipboard
Add property tests for math functions
trafficstars
We talked about adding property tests, and the math functions seem to be prime candidates for that. I think it would be great if we could sanity check the Mathf and Random functions at least.
By implementing the two lines of each method again in the test and comparing the results? :/
Not even sure how to test Random, except to make sure that only valid numbers are returned, but I don't wanna write statistical tests to check if the result is actually random.
I was indeed thinking about just sanity checking that the output lies within the supplied range.