Re: cmocka mocking capability in windows is missing
- Subject: Re: cmocka mocking capability in windows is missing
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Date: Tue, 28 Jul 2015 16:56:05 +0200
- To: cmocka@xxxxxxxxxxxxxx
- Cc: Shai Peretz <ssperetz@xxxxxxxxx>
On Tuesday 28 July 2015 14:44:45 Shai Peretz wrote:
> Two things:
> I'm unable to build cmocka 1.0.1 on windows with visual studio 10.
well, if you do not provide details then I assume it is your fault ...
> I notice that on windows I can't use the __wrap_ functionality which is
> important feature for the mocking capability,
> What do I do in Windows?
> the '-Wl,--wrap=...' linker options exists only in GNU Linker.
> Is this true?
> If it is then this means that i can't really use cmocka mocking
> capabilities in windows, is that correct? i can't mock some function being
> called by another module which I interact with.
If you want to mock strdup e.g you need to use:
#define strdup test_strdup
In your code ...
Andreas Schneider GPG-ID: CC014E3D