Gmock Function to return pointer variable

1,592 views
Skip to first unread message

Neo

unread,
Mar 29, 2012, 9:16:41 AM3/29/12
to Google C++ Mocking Framework
Hi All,
I m writing CxxTest with GMock library to test my 'C' Functions. I
want my GMock Function should one pointer variable. When i tried im
getting some compilation error like below

"""error 139"

-------- CXXTest ----------------

**** Code Snap Shot ****
...
Char *Test = "test";
EXPECT_CALL(*mockHrDevTable,
TestPointer()).Times(1).WillOnce(ReturnPointee(Test));
...
**** **** **** **** **** ****
Please correct me where i done mistake or give some sample program to
call GMock Function (C Function ) that should return pointer
variable..

Thanks in Advance..

Keith Ray

unread,
Mar 29, 2012, 1:18:02 PM3/29/12
to Neo, Google C++ Mocking Framework
Please provide more information: code, error text, OS, compiler version...

GMock uses GTest internally. did you configure it to throw exceptions that CxxTest catches?

C. Keith Ray
http://agilesolutionspace.blogspot.com/
twitter: @ckeithray

Reply all
Reply to author
Forward
0 new messages