8000 fix clang warnings by timdave13 · Pull Request #149 · unittest-cpp/unittest-cpp · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
10BC0 Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions UnitTest++/TestMacros.h
< 387E /table>
0
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
} \
namespace Suite ## Name

#define UNITTEST_IMPL_TEST(Name, List) \
#define UNITTEST_IMPL_TEST(Name, List) \
class Test ## Name : public UnitTest::Test \
{ \
public: \
Test ## Name() : Test(#Name, UnitTestSuite::GetSuiteName(), __FILE__, __LINE__) {} \
private: \
virtual void RunImpl() const; \
} test ## Name ## Instance; \
} static test ## Name ## Instance; \
\
UnitTest::ListAdder adder ## Name (List, &test ## Name ## Instance); \
static UnitTest::ListAdder adder ## Name (List, &test ## Name ## Instance); \
\
void Test ## Name::RunImpl() const

Expand All @@ -49,20 +49,22 @@
explicit Fixture ## Name ## Helper(UnitTest::TestDetails const& details) : m_details(details) {} \
void RunImpl(); \
UnitTest::TestDetails const& m_details; \
virtual ~Fixture ## Name ## Helper(); \
private: \
Fixture ## Name ## Helper(Fixture ## Name ## Helper const&); \
Fixture ## Name ## Helper& operator =(Fixture ## Name ## Helper const&); \
}; \
Fixture ## Name ## Helper::~Fixture ## Name ## Helper(){} \
\
class Test ## Fixture ## Name : public UnitTest::Test \
{ \
public: \
Test ## Fixture ## Name() : Test(#Name, UnitTestSuite::GetSuiteName(), __FILE__, __LINE__) {} \
private: \
virtual void RunImpl() const; \
} test ## Fixture ## Name ## Instance; \
} static test ## Fixture ## Name ## Instance; \
\
UnitTest::ListAdder adder ## Fixture ## Name (List, &test ## Fixture ## Name ## Instance); \
static UnitTest::ListAdder adder ## Fixture ## Name (List, &test ## Fixture ## Name ## Instance); \
\
void Test ## Fixture ## Name::RunImpl() const \
{ \
Expand Down