O
O
ondister2016-06-17 08:43:45
C++ / C#
ondister, 2016-06-17 08:43:45

How to write test for callback function?

I'm writing a wrapper for a library in C. One of the exported functions takes a pointer to a callback function as an argument. I implemented it through a delegate. But how do you write a unit test for such an exported function?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Vitrenko, 2016-06-17
@Vestail

Make a mock .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question