Advice on Mocking System Calls

Posted by Robert S. Barnes on Stack Overflow See other posts from Stack Overflow or by Robert S. Barnes
Published on 2010-05-27T19:58:55Z Indexed on 2010/05/27 20:01 UTC
Read the original article Hit count: 214

Filed under:
|
|

I have a class which calls getaddrinfo for DNS look ups. During testing I want to simulate various error conditions involving this system call. What's the recommended method for mocking system calls like this? I'm using Boost.Test for my unit testing.

© Stack Overflow or respective owner

Related posts about c++

Related posts about unit-testing