Code snippet:class Test
{
public:
Test(){}
virtual ~Test(){}
void ParenttestFn()
{
TestFn();
}
virtual void TestFn()
{
}
};
class TestMock : public Test
{
public:
MOCK_METHOD0(TestFn, void());
};
TEST(SampleTest,SampleTestCase)
{
TestMock mockObj;
EXPECT_CALL(mockObj, TestFn());
mockObj. ParenttestFn ();
}.
your expectations should be something like above
Hi,
I'm having trouble with the EXPECT_CALL.It's give an SEH exception and i have no clue why this error is generated.
Code snippet:
class Test
{
public:
Test(){}
virtual ~Test(){}
virtual void TestFn()
{
}
};
class TestMock : public Test
{
public:
MOCK_METHOD0(TestFn, void());
};
TEST(SampleTest,SampleTestCase)
{
TestMock mockObj;
EXPECT_CALL(mockObj, TestFn());
mockObj.TestFn();
}
This is the error it gives in the cmd:
unknown file : error : SEH exception with code 0xc0000005 thrown in the test body.
Please help.
Thanks!!!