Commits

Matt Oswald committed d973580

removed the anonymous namespaces in the testing macros, they didn't gain us much

  • Participants
  • Parent commits 717326f

Comments (0)

Files changed (2)

 
 /*
 things left to implement:
+separate SETUP/TEARDOWN and FIXTURE
 ASSERT macros (I hate macros :( ) (see unittestpp check macros, as well as xunit.net)
 traits (arbitrary category data)
 SKIP = reason

xUnit++/xUnitMacros.h

 
 #define TIMED_FACT(FactName, timeout) \
     void FactName(); \
-    namespace { namespace FactName ## _ns { xUnitpp::TestCollection::Register reg(&FactName, #FactName, xUnitSuite::Name(), timeout, __FILE__, __LINE__); } } \
+    namespace FactName ## _ns { xUnitpp::TestCollection::Register reg(&FactName, #FactName, xUnitSuite::Name(), timeout, __FILE__, __LINE__); } \
     void FactName()
 
 #define FACT(FactName) TIMED_FACT(FactName, -1)
 #define TIMED_THEORY(TheoryName, timeout, ...) \
     void TheoryName(__VA_ARGS__); \
     std::vector<std::tuple<__VA_ARGS__>> TheoryName ## _data(); \
-    namespace { namespace TheoryName ## _ns { xUnitpp::TestCollection::Register reg(&TheoryName, &TheoryName ## _data, #TheoryName, xUnitSuite::Name(), timeout, __FILE__, __LINE__); } } \
+    namespace TheoryName ## _ns { xUnitpp::TestCollection::Register reg(&TheoryName, &TheoryName ## _data, #TheoryName, xUnitSuite::Name(), timeout, __FILE__, __LINE__); } \
     std::vector<std::tuple<__VA_ARGS__>> TheoryName ## _data()
 
 #define THEORY(TheoryName, ...) TIMED_THEORY(TheoryName, -1, __VA_ARGS__)