utilities icon indicating copy to clipboard operation
utilities copied to clipboard

Add property tests for math functions

Open tomrijnbeek opened this issue 8 years ago • 2 comments
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.

tomrijnbeek avatar Jul 03 '17 22:07 tomrijnbeek

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.

paulcscharf avatar Jul 07 '17 18:07 paulcscharf

I was indeed thinking about just sanity checking that the output lies within the supplied range.

tomrijnbeek avatar Jul 07 '17 20:07 tomrijnbeek