[ 
https://issues.apache.org/jira/browse/DISPATCH-1783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17484269#comment-17484269
 ] 

ASF subversion and git services commented on DISPATCH-1783:
-----------------------------------------------------------

Commit cb059f95979680f8d773092cae1d5569db8216c8 in qpid-dispatch's branch 
refs/heads/main from Jiri Daněk
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=cb059f9 ]

DISPATCH-1783 add cpp-stub unittest mocking/stubbing tool


> Add ability to use test doubles (mocks, fakes, ...) in C tests
> --------------------------------------------------------------
>
>                 Key: DISPATCH-1783
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1783
>             Project: Qpid Dispatch
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 1.14.0
>            Reporter: Jiri Daněk
>            Priority: Major
>
> 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]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to