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
0 votes

Dear community,

I'm using the current version of Isolator++. I'm trying to assert that a global method is called with specific arguments. That global method comes from a third party framework, delivered without debugging information.

According to my tests, using WHEN_CALLED macro to fake a return value seems to work. But if I try to use ASSERT_WAS_CALLED macro, I get the following message:

The function 'CSTSessionServices::SetSessionParameter' information cannot be found by Isolator++. Making the application's PDB accessible to Isolator++ will usually solve this problem. If the PDB's and the dll's are not in the same folder you can set the environment variable IPP_PDB_PATH to the path of the PDB's.You can set several folders separate with semicolon like this: set IPP_PDB_PATH="C:Symbols;C:WindowsSymbols"Otherwise please use FAKE_GLOBAL(CSTSessionServices::SetSessionParameter) macro to make the function visible to Isolator++.To verify that the PDB is generated, please go to project settings->Linker->Debugging and set 'Generate Debug Info' to 'Yes'.Also make sure that in C++->General 'Debug Information Format' is set to 'Program Database'


The example code is:

   CSTUnicodeString value;
   FAKE_STATICS<CSTSessionServices>();
   FAKE_GLOBAL(CSTSessionServices::SetSessionParameter);

   WHEN_CALLED(CSTSessionServices::SetSessionParameter(value, value)).Return(S_OK);

   ...

   ASSERT_WAS_CALLED(CSTSessionServices::SetSessionParameter(_, _));



At the end, I'd like to assert that the method is called with specific arguments, multiple times with different arguments each time, whatever the call order, but right now, I don't even manage to assert that the method is called.

Is there a way to workaround, stating that I won't be able to get debugging information for the framework I'm using?

Any help will be greatly appreciated

asked by abolmont (650 points)
retagged by abolmont

1 Answer

0 votes

Hi,

Can you please provide me with the logs of a specific test run which reproduces the issue?

I've sent you a private mail so you could send me the logs in a more comfortable platform.

Cheers,

Alon Sapozhnikov.

Support Specialist.

answered by Alon_TypeMock (10.6k points)
...