You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/09/24 20:07:00 UTC

[jira] [Commented] (DISPATCH-1783) Add ability to use test doubles (mocks, fakes, ...) in C tests

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

ASF GitHub Bot commented on DISPATCH-1783:
------------------------------------------

jiridanek opened a new pull request #853:
URL: https://github.com/apache/qpid-dispatch/pull/853


   My attempt to rescue code from the following commit in the following PR.
   The code has diverged since, and I had to edit manually.
   
   https://github.com/nicob87/qpid-dispatch/commit/4fc99cf08d033817c02bc83a6d74ddb8f87515af
   
   https://github.com/jiridanek/qpid-dispatch/compare/jd_nb_2020_09_24-mocking...nicob87:4fc99cf08d033817c02bc83a6d74ddb8f87515af
   
   https://github.com/apache/qpid-dispatch/pull/684


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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
>            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 which allowed to what happens if a {{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.3.4#803005)

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