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
Hi,

I am using Isolator++ Professional (v 4.1.3.0) for a VC++ Project , I have defined some test cases those are executing without error in <debug> build, if I am trying to run then in <Release> build I am getting the following error:

 Assert failed. The function public: int __thiscall jobClass::getNumberOfStages() is too small to be faked. Please consider testing it in debug mode.

The method jobClass::getNumberOfStages() is a very simple single line method it returns the count of stages from CTypedPtrList<>.Count(), and getting same error for few more cases where it returns a single property value.
 

TEST_METHOD(sendStagePlanToPSW_Test)

{

Net_Plan_Type plan;

int stageCount = 20;

blenderJobClass* jobDesignFake = FAKE<blenderJobClass>(FakeOptions::CallOriginal);

blenderExtendedStageClass* stagePtrFake =  FAKE<blenderExtendedStageClass>(FakeOptions::CallOriginal);

BlenderTruckStage* blenderTruckStageFake = FAKE<BlenderTruckStage>(FakeOptions::CallOriginal);

WHEN_CALLED(jobDesignFake->getNumberOfStages()).Return(stageCount);

WHEN_CALLED(blenderTruckStageFake->getJobDesignStagePtr(_)).Return(stagePtrFake);

ISOLATOR_SET_VARIABLE(blenderTruckStageFake, jobDesign, jobDesignFake);

try

{

int retCount = blenderTruckStageFake->sendStagePlanToPSW(&plan);

Assert::IsTrue(stageCount == retCount);

Assert::IsTrue(plan.total_stages == stageCount + 1);

}

catch(exception ex)

{

CString msg = ex.what();

Logger::WriteMessage(msg);

Assert::IsTrue(false);

}

}
asked by cvmohan (1.1k points)
edited by cvmohan

1 Answer

0 votes

Hi Cvmohan,

Can you please run the test with logs and sent me them?

Enable the logs in Configuration utility in Isolator++ installation folder.

answered by Alon_TypeMock (4.5k points)
Hi Alan,

Can I get your mail id, so I can forward the logs directly.

1) At present the behavior is some test cases running in Debug build, while come to Release build getting failed.

I am uploading the log files to some shared folder and giving the URL please find the logs from there.

Your immediate attention will be helpful for me, if there any possibility to directly chat with you please let me know.

You can find the logs at :
https://1drv.ms/u/s!ArvBSzPPhxyzkVRqA_LrKj5WQbHH?e=KtMRC4

You can reach me at any time cvmohan@outlook.com

Thanks,

Vishwa Mohan

Hi Vishwa,

Thank you for the logs.

I will dig into them and keep you posted.

Cheers,

Alon Sapozhnikov.

Support Specialist.

...