Is there a recommended way of creating mock functions using cmake-init? #123
-
Hello! I’m currently testing my C library using the Unity testing framework and cmake-init, and everything has gone smoothly so far. However, I’ve reached a point where I need to mock some Windows-specific functions, such as Given how amazing this CMake initializer is, I have a question: Is there a recommended way to mock functions using cmake-init? If possible, could you provide an example? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You don't "mock functions using cmake-init". You can just use regular old dependency injection and not hardcode the use of |
Beta Was this translation helpful? Give feedback.
You don't "mock functions using cmake-init". You can just use regular old dependency injection and not hardcode the use of
PostMessage
, but that's just one way of dealing with making software testable.