Skip to content

Commit 85b3666

Browse files
authored
Merge pull request #149 from timdave13/patch-1
fix clang warnings
2 parents 8c460c4 + 07d4872 commit 85b3666

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

UnitTest++/TestMacros.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
} \
2626
namespace Suite ## Name
2727

28-
#define UNITTEST_IMPL_TEST(Name, List) \
28+
#define UNITTEST_IMPL_TEST(Name, List) \
2929
class Test ## Name : public UnitTest::Test \
3030
{ \
3131
public: \
3232
Test ## Name() : Test(#Name, UnitTestSuite::GetSuiteName(), __FILE__, __LINE__) {} \
3333
private: \
3434
virtual void RunImpl() const; \
35-
} test ## Name ## Instance; \
35+
} static test ## Name ## Instance; \
3636
\
37-
UnitTest::ListAdder adder ## Name (List, &test ## Name ## Instance); \
37+
static UnitTest::ListAdder adder ## Name (List, &test ## Name ## Instance); \
3838
\
3939
void Test ## Name::RunImpl() const
4040

@@ -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