diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-09-18 03:35:07 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-09-18 04:57:37 (GMT) |
commit | d5bddeafc6bde19724f666617c1bc07f53d217c8 (patch) | |
tree | 6b47d8382041f0bbc66c9184c7e43e172c0d31eb /src/test.h | |
parent | b2fe56caaf0bed497ee480003f10486c18d8de9a (diff) | |
download | Ninja-d5bddeafc6bde19724f666617c1bc07f53d217c8.zip Ninja-d5bddeafc6bde19724f666617c1bc07f53d217c8.tar.gz Ninja-d5bddeafc6bde19724f666617c1bc07f53d217c8.tar.bz2 |
Add support for --gtest_filter. The bots need it, and it is a useful flag.
Diffstat (limited to 'src/test.h')
-rw-r--r-- | src/test.h | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -35,7 +35,6 @@ class Test { virtual void SetUp() {} virtual void TearDown() {} virtual void Run() = 0; - virtual const char* Name() const = 0; bool Failed() const { return failed_; } int AssertionFailures() const { return assertion_failures_; } @@ -44,17 +43,16 @@ class Test { }; } -void RegisterTest(testing::Test* (*)()); +void RegisterTest(testing::Test* (*)(), const char*); extern testing::Test* g_current_test; #define TEST_F_(x, y, name) \ struct y : public x { \ static testing::Test* Create() { return g_current_test = new y; } \ virtual void Run(); \ - virtual const char* Name() const { return name; } \ }; \ struct Register##y { \ - Register##y() { RegisterTest(y::Create); } \ + Register##y() { RegisterTest(y::Create, name); } \ }; \ Register##y g_register_##y; \ void y::Run() |