Closed DecembeGrirl closed 4 years ago
You do not.
Also why would you need to simulate the output from arc4random()
? Isn't the whole point that it's random?
Dependency and behavioral simulation in C is generally done with function pointers that callers can customize. But it's up to the library implementors to facilitate this paradigm.
Finally, please use stack overflow for questions like this.
Thank you for your answer.
For example,In a function I need get a random number from arc4random(). But I don't want to creat a class for random number. How to mock the random number fixed?