2 ms·
Exactly. I've seen tests where some code calls: printf("hello world"); And the test is: mock_printf(string) { if string != "hello world" then fail;
by YZF 10y ago
Exactly. I've seen tests where some code calls:
printf("hello world");
And the test is:
mock_printf(string) {
if string != "hello world" then fail;
}
Which is basically just duplicating your code as tests.