Unit testing - how do I test a function that returns random output?
- by Extrakun
I have a function which takes in two parameters, and returns one or the other 50% of the time.
The unit test for this should determine that both parameters could be returned. Luckily, I don't need to prove that the probability for each is 50% but I do need to show that both parameters are possible to be returned.
How do I write a test case for this function?