FileA.cpp
=================================
#include <gmock.h>
namespace {
// the usual mocking and test code here
}
=================================
FileB.cpp
=================================
#include <gmock.h>
namespace {
// the usual mocking and test code here, even using same names as FileA.cpp
}
=================================
--
C. Keith Ray
Coach, Trainer, and Developer at Industrial logic, Inc.
http://industriallogic.com "Amplify Your Agility"
Coaching and Live and Web-based Training
What you did is called a "one-definition rule violation" in C++. The
C++ standard says that it's undefined behavior, and the compiler is
free to generate code that does anything it likes. The linker is not
required to diagnose this error. There's no way for googlemock to
know that an ODR violation has happened.
On Wed, Jul 27, 2011 at 1:23 AM, Kieran D'Archambaud
--
Zhanyong