Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.14.0
-
None
-
None
Description
During the work on https://github.com/apache/qpid-dispatch/pull/684, there was at one point a version of the PR, which tested what happens if vsnprintf called from safe_snprinf returns -1.
This was done by replacing the vsnprintf with a mock (technically it's probably a stub, or maybe fake, but let's ignore the proper terminology).
There are various possibilities how to approach mocking in C. They are less nice than in more dynamic languages such as Java, or even C++ (where it's possible to subclass things). Nevertheless, it can be useful technique, and it should be explored.
CC cans
Attachments
Issue Links
- relates to
-
DISPATCH-1568 Add unittest framework for testing C code
- Closed