Skip to content

Commit d7bd757

Browse files
authored
fix clang warning
fix clang warning: 'X' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables]
1 parent c331bb0 commit d7bd757

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

UnitTest++/TestMacros.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,22 @@
4949
explicit Fixture ## Name ## Helper(UnitTest::TestDetails const& details) : m_details(details) {} \
5050
void RunImpl(); \
5151
UnitTest::TestDetails const& m_details; \
52+
virtual ~Fixture ## Name ## Helper(); \
5253
private: \
5354
Fixture ## Name ## Helper(Fixture ## Name ## Helper const&); \
5455
Fixture ## Name ## Helper& operator =(Fixture ## Name ## Helper const&); \
5556
}; \
57+
Fixture ## Name ## Helper::~Fixture ## Name ## Helper(){}; \
5658
\
5759
class Test ## Fixture ## Name : public UnitTest::Test \
5860
{ \
5961
public: \
6062
Test ## Fixture ## Name() : Test(#Name, UnitTestSuite::GetSuiteName(), __FILE__, __LINE__) {} \
6163
private: \
6264
virtual void RunImpl() const; \
63-
} test ## Fixture ## Name ## Instance; \
65+
} static test ## Fixture ## Name ## Instance; \
6466
\
65-
UnitTest::ListAdder adder ## Fixture ## Name (List, &test ## Fixture ## Name ## Instance); \
67+
static UnitTest::ListAdder adder ## Fixture ## Name (List, &test ## Fixture ## Name ## Instance); \
6668
\
6769
void Test ## Fixture ## Name::RunImpl() const \
6870
{ \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy