When I define two test classes with the same name, but place them in
separate namespaces, gtest spits out an error that the two test suites
collided:
namespace A {
class MyTest : public testing::Test {}
TEST_F( MyTest, TestBlah ) {}
}
namespace B {
class MyTest : public testing::Test {}
TEST_F( MyTest, TestBarf ) {}
}
I took a brief look at the implementation of TEST_F to see why. It looks
like down in the GTEST_TEST() (which is called by TEST_F()), we are
registering the auto-generated test class using the fixture name only.
Would it be possible to augment this with the namespace as well to avoid
collisions? Something like:
TEST_F( A, MyTest, TestBlah ) {}
TEST_F( B, MyTest, TestBarf ) {}
Original issue reported on code.google.com by JCYo...@gmail.com on 12 Feb 2010 at 10:58
Original issue reported on code.google.com by
JCYo...@gmail.com
on 12 Feb 2010 at 10:58