Thanks,
Tom
Thanks for your help on this. I have changed gears a little in
that I decided to use the "delegate to real" capability instead of
"delegate to fake". I changed my mock object definitions and they all
compiled fine. However, when I specify an instance of my mock object
in a test, I get a large error output with errors like "undefined
reference to g_mock_mutex", "undefined reference to vtable for <my
real class>", and "undefined reference to <methods in my real class>".
I guess my first question is in the example in the cookbook
section for Delegate to Real. The example creates a MockFoo class
that inherits from a Foo class. Is the Foo class the class with all
of the virtual method definitions or is it the concrete class that I
will be referencing in the Invoke() calls? Any conjecture on what I
am doing wrong? I have not included code in this message as I'm not
sure how much I need to divulge vs. corporate secrecy requirements.
Thanks in advance,
Tom
Vlad,
Thanks for your help on this. I have changed gears a little in
that I decided to use the "delegate to real" capability instead of
"delegate to fake". I changed my mock object definitions and they all
compiled fine. However, when I specify an instance of my mock object
in a test, I get a large error output with errors like "undefined
reference to g_mock_mutex", "undefined reference to vtable for <my
real class>", and "undefined reference to <methods in my real class>".
I guess my first question is in the example in the cookbook
section for Delegate to Real. The example creates a MockFoo class
that inherits from a Foo class. Is the Foo class the class with all
of the virtual method definitions or is it the concrete class that I
will be referencing in the Invoke() calls? Any conjecture on what I
am doing wrong? I have not included code in this message as I'm not
sure how much I need to divulge vs. corporate secrecy requirements.
Thanks again. I found the typo in my makefile that was not
including the gmock library. That has taken care of most of the
errors except for two:
In function <destructor of my real class>, undefined reference to
vtable for <my real class>
In function MockFeatureSet, undefined reference to <default
constructor of my real class>
Any ideas?
Also, I understand your reply about the delegate to real example
from the cookbook except that the class instance in the private member
section is also class Foo. Does this mean that this is also just the
real class with the virtual methods and not an instance of the
concrete real class that has the real methods?
Thanks again,
Tom
Vlad,
Thanks again. I found the typo in my makefile that was not
including the gmock library. That has taken care of most of the
errors except for two:
In function <destructor of my real class>, undefined reference to
vtable for <my real class>In function MockFeatureSet, undefined reference to <default
constructor of my real class>
Any ideas?