I'm testing the use of an interface which has the function foo. Here is my implementation of this function in my mock:
class Mock
{
public:
void foo(Foo::const_iterator begin, Foo::const_iterator end) {
_begin = begin;
_end = end;
...
}
...
Foo::const_iterator _begin;
Foo::const_iterator _end;
};
I then have a test which checks if foo has been called:
// test that function foo is not called
EXPECT_EQ(mock->_begin, Foo::const_iterator());
But this is giving me an assertion in Visual Studio claiming that the iterators are incompatible. I would have expected that _begin would be equal to Foo::const_iterator() if I havent called foo(). Why isn't it?