chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
Found some errors in Isolator++ documentation (both online and the CHM file):

Cookbook -> How Do I Fake... -> Faking concrete classes
MyClass* fakeMyClass* = FAKE<MyClass>();

should be
MyClass* fakeMyClass = FAKE<MyClass>();



Usage Examples -> Faking GetComputerName
If (!lpnSize)
{
  Return FALSE;
}

should be
if (!lpnSize)
{
  return FALSE;
}


And
WHEN_CALLED(GetComputerName(_, _)).DoStaticOrGlobalInstead(MyGetComputerName);


has a missing parameter in DoStaticOrGlobalInstead
WHEN_CALLED(GetComputerName(_, _)).DoStaticOrGlobalInstead(MyGetComputerName, 0);
asked by ahkow (640 points)

4 Answers

0 votes
Hi,

Thank you for the corrections.
The first 2 have been fixed and you will be able to see them in the next release.
The last one is actually fine because the second parameter of DoStaticOrGlobalInstead is optional.

Are you a new Isolator++ user?
How do you find it so far?
answered by alex (18k points)
0 votes
Hi,

Thanks for the corrections :)
We will fix it.
answered by ohad (35.5k points)
0 votes
Hi,
The last one is actually fine because the second parameter of DoStaticOrGlobalInstead is optional.

Thanks, but there's a build error if the 2nd parameter is removed, for example, line 59 in DoInsteadTests.cpp (Isolator++.Examples.VS2010 solution):
WHEN_CALLED(ConcreteClass::staticGetInt()).DoStaticOrGlobalInstead(AlternativeImplementation::StaticDoThis, NULL);

Changing to the following line will cause compiler error C2059 (syntax error: ')'):
WHEN_CALLED(ConcreteClass::staticGetInt()).DoStaticOrGlobalInstead(AlternativeImplementation::StaticDoThis);
answered by ahkow (640 points)
0 votes
Hi,

The last one is actually fine because the second parameter of DoStaticOrGlobalInstead is optional.


Sorry for that, you are correct. The second parameter was meant to be optional but it isn't.
We fixed the documentation and it will also be available from the next release.

Thanks again for informing us of incorrect documentation.
Please let us know if anything else is not accurate.
answered by alex (18k points)
...