|
|
|
|
|
by MiyamotoAkira
1243 days ago
|
|
I like that write up on [2]. I have not really been exposed to C in a very long time, and that has been quite informative. I also like that Set of Unit Testing Rules. That is basically correct, external systems are a no-no on unit testing. Usually, you deal with mocks through indirections, default arguments, and other stuff like that so you can exclusively test the logic of the function, which is more difficult in C, from what I've seen on your write up, than in other languages. But if you care about not having that on your code for performance reasons, then more likely than not, you will not be able to unit test. And that is fine. You have an integration test (because you are using outside systems). You can still do integration test first, as long as they help you on capturing the logic and flow. The issue is that they tend to be far more involved, and far more brittle (as they depend on those outside systems). |
|