Commits

Matt Oswald committed 9555004

switched to using strings, rather than identifiers, for test names (and suites and attributes)

Comments (0)

Files changed (24)

Tests/BareTests/BareTest.cpp

 // This is the simplest valid test library possible, and is intended to ensure
 // this error does not happen in the future.
 
-FACT(BareTest)
+FACT("BareTest")
 {
 }

Tests/UnitTests/Assert.Contains.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertContains)
+SUITE("AssertContains")
 {
 
-FACT(ContainsForSequenceSuccess)
+FACT("ContainsForSequenceSuccess")
 {
     std::vector<int> v(1, 0);
 
     Assert.Contains(v, 0);
 }
 
-FACT(ContainsForSequenceAssertsOnFailure)
+FACT("ContainsForSequenceAssertsOnFailure")
 {
     std::vector<int> v;
 
     Assert.Throws<xUnitAssert>([&]() { Assert.Contains(v, 0); });
 }
 
-FACT(ContainsForSequenceAppendsUserMessage)
+FACT("ContainsForSequenceAppendsUserMessage")
 {
     static const std::string msg = "xUnit++";
     std::vector<int> v;
     Assert.NotEqual(std::string::npos, what.find(msg));
 }
 
-FACT(ContainsForStringSuccess)
+FACT("ContainsForStringSuccess")
 {
     std::string actual = "abcd";
 
     Assert.Contains(actual, "a");
 }
 
-FACT(ContainsForStringAssertsOnFailure)
+FACT("ContainsForStringAssertsOnFailure")
 {
     std::string actual = "abcd";
 
     Assert.Throws<xUnitAssert>([&]() { Assert.Contains(actual, "xyz"); });
 }
 
-FACT(ContainsForStringAppendsUserMessage)
+FACT("ContainsForStringAppendsUserMessage")
 {
     static const std::string msg = "xUnit++";
     std::string actual = "abcd";

Tests/UnitTests/Assert.DoesNotContain.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertDoesNotContain)
+SUITE("AssertDoesNotContain")
 {
 
-FACT(DoesNotContainForSequenceSuccess)
+FACT("DoesNotContainForSequenceSuccess")
 {
     std::vector<int> v;
 
     Assert.DoesNotContain(v, 0);
 }
 
-FACT(DoesNotContainForSequenceAssertsOnFailure)
+FACT("DoesNotContainForSequenceAssertsOnFailure")
 {
     std::vector<int> v(1, 0);
 
     Assert.Throws<xUnitAssert>([&]() { Assert.DoesNotContain(v, 0); });
 }
 
-FACT(DoesNotContainForSequenceAppendsUserMessage)
+namespace TestNs_24
+{
+    using xUnitpp::Assert;
+    std::shared_ptr<xUnitpp::Check> pCheck = std::make_shared<xUnitpp::Check>(); 
+    class TestFixture_24 : public xUnitpp::NoFixture 
+    {
+        TestFixture_24 &operator =(TestFixture_24);
+    public:
+        TestFixture_24() : Check(*pCheck) { }
+        void TestFn_24();
+        
+        const xUnitpp::Check &Check;
+    };
+    void TestRunner_24()
+    {
+        TestFixture_24().TestFn_24();
+    }
+    xUnitpp::TestCollection::Register reg(xUnitpp::TestCollection::Instance(), &TestRunner_24, "ContainsForSequenceAppendsUserMessage", xUnitSuite::Name(), xUnitAttributes::Attributes(), -1, "assert.contains.cpp", 24, pCheck);
+}
+void TestNs_24 :: TestFixture_24 :: TestFn_24()
+{
+    static const std::string msg = "xUnit++";
+    std::vector<int> v;
+
+    auto assert = Assert.Throws<xUnitAssert>([&]() { Assert.Contains(v, 0) << msg; });
+    auto what = std::string(assert.what());
+
+    Assert.NotEqual(std::string::npos, what.find(msg));
+}
+
+FACT("DoesNotContainForSequenceAppendsUserMessage")
 {
     static const std::string msg = "xUnit++";
     std::vector<int> v(1, 0);
     Assert.Contains(assert.what(), msg.c_str());
 }
 
-FACT(DoesNotContainForStringSuccess)
+FACT("DoesNotContainForStringSuccess")
 {
     std::string actual = "abcd";
 
     Assert.DoesNotContain(actual, "xyz");
 }
 
-FACT(DoesNotContainForStringAssertsOnFailure)
+FACT("DoesNotContainForStringAssertsOnFailure")
 {
     std::string actual = "abcd";
 
     Assert.Throws<xUnitAssert>([&]() { Assert.DoesNotContain(actual, "bc"); });
 }
 
-FACT(DoesNotContainForStringAppendsUserMessage)
+FACT("DoesNotContainForStringAppendsUserMessage")
 {
     static const std::string msg = "xUnit++";
     std::string actual = "abcd";

Tests/UnitTests/Assert.DoesNotThrow.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertDoesNotThrow)
+SUITE("AssertDoesNotThrow")
 {
 
-FACT(DoesNotThrowSuccess)
+FACT("DoesNotThrowSuccess")
 {
     try
     {
     }
 }
 
-FACT(DoesNotThrowAssertsOnFailure)
+FACT("DoesNotThrowAssertsOnFailure")
 {
     static const std::string msg = "xUnit++";
 
     Assert.Fail();
 }
 
-FACT(DoesNotThrowAppendsMessages)
+FACT("DoesNotThrowAppendsMessages")
 {
     static const std::string exceptionMessage = "xUnit++";
     static const std::string userMessage = "custom";

Tests/UnitTests/Assert.Empty.cpp

     }
 }
 
-SUITE(AssertEmpty)
+SUITE("AssertEmpty")
 {
 
-FACT(EmptyCallsEmptyForContainerWithConstEmptyMember)
+FACT("EmptyCallsEmptyForContainerWithConstEmptyMember")
 {
     Assert.Empty(hasConstEmpty);
 }
 
-FACT(EmptyFindsLocalBeginEnd)
+FACT("EmptyFindsLocalBeginEnd")
 {
     Assert.Empty(Local::Container());
 }
 
-FACT(EmptyFindsStdBeginEnd)
+FACT("EmptyFindsStdBeginEnd")
 {
     int array[10];
     Assert.Throws<xUnitAssert>([&]() { Assert.Empty(array); });
 }
 
-FACT(EmptyFindsMemberBeginEnd)
+FACT("EmptyFindsMemberBeginEnd")
 {
     struct
     {
     Assert.Empty(hasMembers);
 }
 
-FACT(EmptyAssertsOnFailure)
+FACT("EmptyAssertsOnFailure")
 {
     std::vector<int> v;
     v.push_back(0);
     Assert.Throws<xUnitAssert>([&]() { Assert.Empty(v); });
 }
 
-FACT(EmptyAppendsUserMessage)
+FACT("EmptyAppendsUserMessage")
 {
     static const std::string msg = "xUnit++";
 

Tests/UnitTests/Assert.Equal.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertEqual)
+SUITE("AssertEqual")
 {
 
-FACT(AssertEqualWithDefaultComparerWithSuccess)
+FACT("AssertEqualWithDefaultComparerWithSuccess")
 {
     Assert.Equal(0, 0);
 }
 
-FACT(AssertEqualWithDefaultComparerAssertsOnFailure)
+FACT("AssertEqualWithDefaultComparerAssertsOnFailure")
 {
     Assert.Throws<xUnitAssert>([]() { Assert.Equal(0, 1); });
 }
 
-FACT(AssertEqualWithCustomComparerWithSuccess)
+FACT("AssertEqualWithCustomComparerWithSuccess")
 {
     Assert.Equal(0, 1, [](int, int) { return true; });
 }
 
-FACT(AssertEqualWithCustomComparerAssertsOnFailure)
+FACT("AssertEqualWithCustomComparerAssertsOnFailure")
 {
     Assert.Throws<xUnitAssert>([]() { Assert.Equal(0, 0, [](int, int) { return false; }); });
 }
 
-FACT(AssertEqualAppendsUserMessage)
+FACT("AssertEqualAppendsUserMessage")
 {
     static const std::string msg = "custom message";
 
     Assert.Contains(assert.what(), msg.c_str());
 }
 
-FACT(AssertEqualForFloatsWithinPrecision)
+FACT("AssertEqualForFloatsWithinPrecision")
 {
     auto f0 = 1.2345678f;
     auto f1 = 1.2349999f;
     Assert.Equal(f0, f1, 3);
 }
 
-FACT(AssertEqualForFloatsAssertsOnFailure)
+FACT("AssertEqualForFloatsAssertsOnFailure")
 {
     auto f0 = 1.2345678f;
     auto f1 = 1.2349999f;
     Assert.Throws<xUnitAssert>([=]() { Assert.Equal(f0, f1, 4); });
 }
 
-FACT(AssertSequenceEqualDefaultComparerWithSuccess)
+FACT("AssertSequenceEqualDefaultComparerWithSuccess")
 {
     std::vector<int> v0;
     v0.push_back(0);
     Assert.Equal(v0.begin(), v0.end(), v1.begin(), v1.end());
 }
 
-FACT(AssertSequenceEqualDefaultComparerAssertsOnFailureDueToLength)
+FACT("AssertSequenceEqualDefaultComparerAssertsOnFailureDueToLength")
 {
     std::vector<int> v0;
     v0.push_back(0);
     Assert.Contains(assert.what(), "at location 2");
 }
 
-FACT(AssertSequenceEqualDefaultComparerAssertsOnFailureDueToMismatch)
+FACT("AssertSequenceEqualDefaultComparerAssertsOnFailureDueToMismatch")
 {
     std::vector<int> v0;
     v0.push_back(0);
     Assert.Contains(assert.what(), "at location 1");
 }
 
-FACT(AssertSequenceEqualCustomComparerWithSuccess)
+FACT("AssertSequenceEqualCustomComparerWithSuccess")
 {
     std::vector<int> v0;
     v0.push_back(0);
     Assert.Equal(v0.begin(), v0.end(), v1.begin(), v1.end(), [](int, long long) { return true; });
 }
 
-FACT(AssertSequenceEqualCustomComparerAssertsOnFailureDueToLength)
+FACT("AssertSequenceEqualCustomComparerAssertsOnFailureDueToLength")
 {
     std::vector<int> v0;
     v0.push_back(0);
     Assert.Contains(assert.what(), "at location 2");
 }
 
-FACT(AssertSequenceEqualDefaultAssertsOnFailureDueToMismatch)
+FACT("AssertSequenceEqualDefaultAssertsOnFailureDueToMismatch")
 {
     std::vector<int> v0;
     v0.push_back(0);
     Assert.Contains(assert.what(), "at location 0");
 }
 
-FACT(EqualForStrings)
+FACT("EqualForStrings")
 {
     std::string expected = "abcd";
     std::string actual = "abc";

Tests/UnitTests/Assert.Fail.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertFail)
+SUITE("AssertFail")
 {
 
-FACT(FailAlwaysAsserts)
+FACT("FailAlwaysAsserts")
 {
     Assert.Throws<xUnitAssert>([]() { Assert.Fail(); });
 }
 
-FACT(FailAppendsMessage)
+FACT("FailAppendsMessage")
 {
     static const std::string msg = "xUnit++";
 

Tests/UnitTests/Assert.False.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertFalse)
+SUITE("AssertFalse")
 {
 
-FACT(FalseSuccess)
+FACT("FalseSuccess")
 {
     Assert.False(false);
 }
 
-FACT(FalseAssertsOnTrue)
+FACT("FalseAssertsOnTrue")
 {
     Assert.Throws<xUnitAssert>([]() { Assert.False(true); });
 }
 
-FACT(FalseAppendsCustomMessage)
+FACT("FalseAppendsCustomMessage")
 {
     static const std::string msg = "xUnit++";
 

Tests/UnitTests/Assert.InRange.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertInRange)
+SUITE("AssertInRange")
 {
 
 std::vector<std::tuple<float, int, int>> InRangeSuccessData()
     Assert.Throws<xUnitAssert>([=]() { Assert.InRange(actual, min, max); });
 }
 
-FACT(InRangeAppendsUserMessage)
+FACT("InRangeAppendsUserMessage")
 {
     static const std::string msg = "xUnit++";
 
     Assert.Contains(assert.what(), msg.c_str());
 }
 
-FACT(InRangeNeedsValidRange)
+FACT("InRangeNeedsValidRange")
 {
     Assert.Throws<std::invalid_argument>([]() { Assert.InRange(0, 0, 0); });
     Assert.Throws<std::invalid_argument>([]() { Assert.InRange(0, 1, 0); });

Tests/UnitTests/Assert.NotEqual.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertNotEqual)
+SUITE("AssertNotEqual")
 {
 
-FACT(AssertNotEqualDefaultComparerWithSuccess)
+FACT("AssertNotEqualDefaultComparerWithSuccess")
 {
     Assert.NotEqual(0, 1);
 }
 
-FACT(AssertNotEqualDefaultComparerAssertsOnFailure)
+FACT("AssertNotEqualDefaultComparerAssertsOnFailure")
 {
     Assert.Throws<xUnitAssert>([]() { Assert.NotEqual(0, 0); });
 }
 
-FACT(AssertNotEqualCustomComparerWithSuccess)
+FACT("AssertNotEqualCustomComparerWithSuccess")
 {
     Assert.NotEqual(0, 0, [](int, int) { return false; });
 }
 
-FACT(AssertNotEqualCustomComparerAssertsOnFailure)
+FACT("AssertNotEqualCustomComparerAssertsOnFailure")
 {
     Assert.Throws<xUnitAssert>([]() { Assert.NotEqual(0, 1, [](int, int) { return true; }); });
 }
 
-FACT(AssertNotEqualAppendsUserMessage)
+FACT("AssertNotEqualAppendsUserMessage")
 {
     static const std::string msg = "custom message";
 
     Assert.Contains(assert.what(), msg.c_str());
 }
 
-FACT(AssertSequenceNotEqualDefaultComparerWithSuccess)
+FACT("AssertSequenceNotEqualDefaultComparerWithSuccess")
 {
     std::vector<int> v0;
     v0.push_back(0);
     Assert.NotEqual(v0.begin(), v0.end(), v1.begin(), v1.end());
 }
 
-FACT(AssertSequenceNotEqualDefaultComparerAssertsOnFailure)
+FACT("AssertSequenceNotEqualDefaultComparerAssertsOnFailure")
 {
     std::vector<int> v0;
     v0.push_back(0);
     Assert.Throws<xUnitAssert>([&]() { Assert.NotEqual(v0.begin(), v0.end(), v1.begin(), v1.end()); });
 }
 
-FACT(AssertSequenceNotEqualCustomComparerWithSuccess)
+FACT("AssertSequenceNotEqualCustomComparerWithSuccess")
 {
     std::vector<int> v0;
     v0.push_back(0);
     Assert.NotEqual(v0.begin(), v0.end(), v1.begin(), v1.end(), [](int, long long) { return false; });
 }
 
-FACT(AssertSequenceNotEqualDefaultAssertsOnFailureDueToMismatch)
+FACT("AssertSequenceNotEqualDefaultAssertsOnFailureDueToMismatch")
 {
     std::vector<int> v0;
     v0.push_back(0);
     Assert.Throws<xUnitAssert>([&]() { Assert.NotEqual(v0.begin(), v0.end(), v1.begin(), v1.end(), [](int, long long) { return true; }); });
 }
 
-FACT(NotEqualForStrings)
+FACT("NotEqualForStrings")
 {
     std::string expected = "abcd";
     std::string actual = "abcd";

Tests/UnitTests/Assert.NotInRange.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertNotInRange)
+SUITE("AssertNotInRange")
 {
 
 std::vector<std::tuple<int, int, int>> NotInRangeSuccessData()
     Assert.Throws<xUnitAssert>([=]() { Assert.NotInRange(actual, min, max); });
 }
 
-FACT(NotInRangeAppendsUserMessage)
+FACT("NotInRangeAppendsUserMessage")
 {
     static const std::string msg = "xUnit++";
 
     Assert.Contains(assert.what(), msg.c_str());
 }
 
-FACT(NotInRangeNeedsValidRange)
+FACT("NotInRangeNeedsValidRange")
 {
     Assert.Throws<std::invalid_argument>([]() { Assert.NotInRange(0, 0, 0); });
     Assert.Throws<std::invalid_argument>([]() { Assert.NotInRange(0, 1, 0); });

Tests/UnitTests/Assert.NotNull.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertNotNull)
+SUITE("AssertNotNull")
 {
 
-FACT(NotNullForRawPointerSuccess)
+FACT("NotNullForRawPointerSuccess")
 {
     int x;
 
     Assert.NotNull(&x);
 }
 
-FACT(NotNullForDoubleConstRawPointerSuccess)
+FACT("NotNullForDoubleConstRawPointerSuccess")
 {
     int x;
     const int * const px = &x;
     Assert.NotNull(px);
 }
 
-FACT(NotNullForSmartPointerSuccess)
+FACT("NotNullForSmartPointerSuccess")
 {
     std::unique_ptr<int> x(new int);
 
     Assert.NotNull(x);
 }
 
-FACT(NotNullForRawPointerAssertsOnFailure)
+FACT("NotNullForRawPointerAssertsOnFailure")
 {
     Assert.Throws<xUnitAssert>([]() { Assert.NotNull(nullptr); });
 }
 
-FACT(NotNullForSmartPointerAssertsOnFailure)
+FACT("NotNullForSmartPointerAssertsOnFailure")
 {
     Assert.Throws<xUnitAssert>([]() { Assert.NotNull(std::unique_ptr<int>()); });
 }
 
-FACT(NotNullAppendsUserMessage)
+FACT("NotNullAppendsUserMessage")
 {
     static const std::string msg = "xUnit++";
     auto assert = Assert.Throws<xUnitAssert>([]() { Assert.NotNull(nullptr) << msg; });

Tests/UnitTests/Assert.NotSame.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertNotSame)
+SUITE("AssertNotSame")
 {
 
 struct NotSameFixture
     int different;
 };
 
-FACT_FIXTURE(NotSameSuccess, NotSameFixture)
+FACT_FIXTURE("NotSameSuccess", NotSameFixture)
 {
     Assert.NotSame(obj, different);
 }
 
-FACT_FIXTURE(NotSameForPointersSuccess, NotSameFixture)
+FACT_FIXTURE("NotSameForPointersSuccess", NotSameFixture)
 {
     Assert.NotSame(&obj, &different);
 }
 
-FACT_FIXTURE(NotSameAssertsOnFailure, NotSameFixture)
+FACT_FIXTURE("NotSameAssertsOnFailure", NotSameFixture)
 {
     Assert.Throws<xUnitAssert>([&]() { Assert.NotSame(obj, obj); });
 }
 
-FACT_FIXTURE(NotSameForPointersAssertsOnFailure, NotSameFixture)
+FACT_FIXTURE("NotSameForPointersAssertsOnFailure", NotSameFixture)
 {
     Assert.Throws<xUnitAssert>([&]() { Assert.NotSame(&obj, &obj); });
 }
 
-FACT_FIXTURE(NotSameAppendsUserMessage, NotSameFixture)
+FACT_FIXTURE("NotSameAppendsUserMessage", NotSameFixture)
 {
     static const std::string msg = "xUnit++";
 

Tests/UnitTests/Assert.Null.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertNull)
+SUITE("AssertNull")
 {
 
-FACT(NullForRawPointerSuccess)
+FACT("NullForRawPointerSuccess")
 {
     Assert.Null(nullptr);
 }
 
-FACT(NullForDoubleConstRawPointerSuccess)
+FACT("NullForDoubleConstRawPointerSuccess")
 {
     const int * const px = nullptr;
 
     Assert.Null(px);
 }
 
-FACT(NullForSmartPointerSuccess)
+FACT("NullForSmartPointerSuccess")
 {
     Assert.Null(std::unique_ptr<int>());
 }
 
-FACT(NullForRawPointerAssertsOnFailure)
+FACT("NullForRawPointerAssertsOnFailure")
 {
     int x;
     Assert.Throws<xUnitAssert>([&]() { Assert.Null(&x); });
 }
 
-FACT(NullForSmartPointerAssertsOnFailure)
+FACT("NullForSmartPointerAssertsOnFailure")
 {
     std::unique_ptr<int> x(new int);
     Assert.Throws<xUnitAssert>([&]() { Assert.Null(x); });
 }
 
-FACT(NullAppendsUserMessage)
+FACT("NullAppendsUserMessage")
 {
     static const std::string msg = "xUnit++";
     auto x = std::make_shared<int>(0);

Tests/UnitTests/Assert.Same.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertSame)
+SUITE("AssertSame")
 {
 
-FACT(SameSuccess)
+FACT("SameSuccess")
 {
     int x;
 
     Assert.Same(x, x);
 }
 
-FACT(SameForPointersSuccess)
+FACT("SameForPointersSuccess")
 {
     int x;
 
     Assert.Same(&x, &x);
 }
 
-FACT(SameForConstPointersSuccess)
+FACT("SameForConstPointersSuccess")
 {
     int x;
     const int *px = &x;
     Assert.Same(px, px);
 }
 
-FACT(SameAssertsOnFailure)
+FACT("SameAssertsOnFailure")
 {
     int x = 2;
     int y = 2;
     Assert.Throws<xUnitAssert>([=]() { Assert.Same(x, y); });
 }
 
-FACT(SameForPointersAssertsOnFailure)
+FACT("SameForPointersAssertsOnFailure")
 {
     int x = 2;
     int y = 2;
     Assert.Throws<xUnitAssert>([=]() { Assert.Same(&x, &y); });
 }
 
-FACT(SameAppendsUserMessage)
+FACT("SameAppendsUserMessage")
 {
     static const std::string msg = "xUnit++";
 

Tests/UnitTests/Assert.Throws.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertThrows)
+SUITE("AssertThrows")
 {
 
-FACT(ThrowsSuccess)
+FACT("ThrowsSuccess")
 {
     struct exp
     {
     Assert.Equal(10, x.x);
 }
 
-FACT(ThrowsAssertsOnFailure)
+FACT("ThrowsAssertsOnFailure")
 {
     try
     {
     Assert.Fail();
 }
 
-FACT(ThrowAppendsMessages)
+FACT("ThrowAppendsMessages")
 {
     static const std::string userMessage = "xUnit++";
 

Tests/UnitTests/Assert.True.cpp

 
 using xUnitpp::xUnitAssert;
 
-SUITE(AssertTrue)
+SUITE("AssertTrue")
 {
 
-FACT(TrueSuccess)
+FACT("TrueSuccess")
 {
     Assert.True(true);
 }
 
-FACT(TrueAssertsOnFalse)
+FACT("TrueAssertsOnFalse")
 {
     Assert.Throws<xUnitAssert>([]() { Assert.True(false); });
 }
 
-FACT(TrueAppendsCustomMessage)
+FACT("TrueAppendsCustomMessage")
 {
     static const std::string msg = "xUnit++";
 

Tests/UnitTests/Attributes.cpp

 #include "xUnit++/xUnit++.h"
 
 
-SUITE(Attributes)
+SUITE("Attributes")
 {
 
-ATTRIBUTES(TestWithAttributes, ("Cats", "Meow"))
-FACT(TestWithAttributes)
+ATTRIBUTES(("Cats", "Meow"))
+{
+FACT("TestWithAttributes")
 {
     for (const auto &test : xUnitpp::TestCollection::Instance().Tests())
     {
 
     Assert.Fail() << "Could not find self in test list.";
 }
+}
 
-FACT(SkippedTestsShouldNotBeInstantiated)
+FACT("SkippedTestsShouldNotBeInstantiated")
 {
     // have to set this internal test up manually since the macros don't work embedded within each other
     struct SkippedTest : xUnitpp::NoFixture

Tests/UnitTests/LineInfo.cpp

 #include "xUnit++/xUnit++.h"
 
 
-SUITE(LineInfo)
+SUITE("LineInfo")
 {
 
-FACT(LineInfoOverridesDefaultTestLineInfo)
+FACT("LineInfoOverridesDefaultTestLineInfo")
 {
     auto file = "filename";
     auto line = 1;

Tests/UnitTests/TestRunner.cpp

 namespace Tests = xUnitpp::Tests;
 namespace Time = xUnitpp::Time;
 
-SUITE(TestRunner)
+SUITE("TestRunner")
 {
 
 struct TestFactory
     std::chrono::milliseconds duration;
 };
 
-FACT_FIXTURE(TestStartIsReported, TestRunnerFixture)
+FACT_FIXTURE("TestStartIsReported", TestRunnerFixture)
 {
     tests.push_back(TestFactory(EmptyTest(), testCheck).Name("started"));
     RunTests(output, &Filter::AllTests, tests, duration, 0);
     Assert.Equal("started", output.orderedTestList[0].Name);
 }
 
-FACT_FIXTURE(TestFinishIsReported, TestRunnerFixture)
+FACT_FIXTURE("TestFinishIsReported", TestRunnerFixture)
 {
     tests.push_back(TestFactory(EmptyTest(), testCheck).Name("finished"));
     RunTests(output, &Filter::AllTests, tests, duration, 0);
     Assert.Equal("finished", std::get<0>(output.finishedTests[0]).Name);
 }
 
-FACT_FIXTURE(NoTestsAreFailuresWhenNoTestsRun, TestRunnerFixture)
+FACT_FIXTURE("NoTestsAreFailuresWhenNoTestsRun", TestRunnerFixture)
 {
     tests.push_back(TestFactory(EmptyTest(), testCheck).Name("not run"));
 
     Assert.Equal(0U, output.finishedTests.size());
 }
 
-FACT_FIXTURE(FailureIsReportedOncePerAssert, TestRunnerFixture)
+FACT_FIXTURE("FailureIsReportedOncePerAssert", TestRunnerFixture)
 {
     tests.push_back(TestFactory(FailingTest(), testCheck).Name("failing"));
     tests.push_back(TestFactory(EmptyTest(), testCheck).Name("empty"));
     
 }
 
-FACT_FIXTURE(TestsAbortOnFirstAssert, TestRunnerFixture)
+FACT_FIXTURE("TestsAbortOnFirstAssert", TestRunnerFixture)
 {
     tests.push_back(TestFactory([]() { Assert.Fail() << "first"; Assert.Fail() << "second"; }, testCheck));
 
     Assert.DoesNotContain(std::get<1>(output.failures[0]), "second", LI);
 }
 
-FACT_FIXTURE(FailureIsReportedOncePerCheck, TestRunnerFixture)
+FACT_FIXTURE("FailureIsReportedOncePerCheck", TestRunnerFixture)
 {
     tests.push_back(TestFactory([=]() { testCheck->Fail(); }, testCheck));
 
     Assert.Equal(1U, output.failures.size());
 }
 
-FACT_FIXTURE(TestsDoNotAbortOnCheck, TestRunnerFixture)
+FACT_FIXTURE("TestsDoNotAbortOnCheck", TestRunnerFixture)
 {
     tests.push_back(TestFactory([=]() { testCheck->Fail() << "first"; testCheck->Fail() << "second"; }, testCheck));
 
     Assert.Contains(std::get<1>(output.failures[1]), "second");
 }
 
-FACT_FIXTURE(TestCountIsReported, TestRunnerFixture)
+FACT_FIXTURE("TestCountIsReported", TestRunnerFixture)
 {
     tests.push_back(TestFactory(EmptyTest(), testCheck));
     RunTests(output, &Filter::AllTests, tests, duration, 0);
     Assert.Equal(1U, output.summaryCount);
 }
 
-FACT_FIXTURE(FailedTestsAreReported, TestRunnerFixture)
+FACT_FIXTURE("FailedTestsAreReported", TestRunnerFixture)
 {
     tests.push_back(TestFactory(FailingTest(), testCheck));
     RunTests(output, &Filter::AllTests, tests, duration, 0);
     Assert.Equal(1U, output.summaryFailed);
 }
 
-FACT_FIXTURE(FailuresAreReported, TestRunnerFixture)
+FACT_FIXTURE("FailuresAreReported", TestRunnerFixture)
 {
     tests.push_back(TestFactory([=]() { testCheck->Fail(); testCheck->Fail(); }, testCheck));
     RunTests(output, &Filter::AllTests, tests, duration, 0);
     Assert.Equal(2U, output.failures.size());
 }
 
-FACT_FIXTURE(SkippedTestsAreReported, TestRunnerFixture)
+FACT_FIXTURE("SkippedTestsAreReported", TestRunnerFixture)
 {
     xUnitpp::AttributeCollection attributes;
     attributes.insert(std::make_pair("Skip", ""));
     Assert.Equal(1U, output.summarySkipped);
 }
 
-UNTIMED_FACT_FIXTURE(SlowTestsPassHighTimeThreshold, TestRunnerFixture)
+UNTIMED_FACT_FIXTURE("SlowTestsPassHighTimeThreshold", TestRunnerFixture)
 {
     tests.push_back(TestFactory(SleepyTest(), testCheck));
     RunTests(output, &Filter::AllTests, tests, Time::ToDuration(Time::ToMilliseconds(200)), 0);
     Assert.Equal(0U, output.summaryFailed);
 }
 
-UNTIMED_FACT_FIXTURE(SlowTestsFailLowTimeThreshold, TestRunnerFixture)
+UNTIMED_FACT_FIXTURE("SlowTestsFailLowTimeThreshold", TestRunnerFixture)
 {
     SleepyTest sleepyTest;
     tests.push_back(TestFactory(sleepyTest, testCheck));
     Assert.Equal(1U, output.summaryFailed);
 }
 
-UNTIMED_FACT_FIXTURE(SlowTestFailsBecauseOfTimeLimitReportsReason, TestRunnerFixture)
+UNTIMED_FACT_FIXTURE("SlowTestFailsBecauseOfTimeLimitReportsReason", TestRunnerFixture)
 {
     tests.push_back(TestFactory(SleepyTest(), testCheck));
     RunTests(output, &Filter::AllTests, tests, Time::ToDuration(Time::ToMilliseconds(1)), 0);
     Assert.Contains(std::get<1>(output.failures[0]), "1 milliseconds.");
 }
 
-UNTIMED_FACT_FIXTURE(SlowTestWithTimeExemptionPasses, TestRunnerFixture)
+UNTIMED_FACT_FIXTURE("SlowTestWithTimeExemptionPasses", TestRunnerFixture)
 {
     tests.push_back(TestFactory(SleepyTest(), testCheck).Duration(Time::ToDuration(Time::ToMilliseconds(0))));
 
     Assert.Equal(0, RunTests(output, &Filter::AllTests, tests, Time::ToDuration(Time::ToMilliseconds(1)), 0));
 }
 
-FACT_FIXTURE(AllTestsAreRunWithNoFilter, TestRunnerFixture)
+FACT_FIXTURE("AllTestsAreRunWithNoFilter", TestRunnerFixture)
 {
     tests.push_back(TestFactory(EmptyTest(), testCheck));
     RunTests(output, &Filter::AllTests, tests, duration, 0);
     Assert.Equal(1U, output.summaryCount);
 }
 
-FACT_FIXTURE(FilteredTestsDoNotRun, TestRunnerFixture)
+FACT_FIXTURE("FilteredTestsDoNotRun", TestRunnerFixture)
 {
     tests.push_back(TestFactory(EmptyTest(), testCheck));
     RunTests(output, &Filter::NoTests, tests, duration, 0);

Tests/UnitTests/TestsCanOutputAnythingWithToString.cpp

 #include <string>
 #include "xUnit++/xUnit++.h"
 
-SUITE(ADLToString)
+SUITE("ADLToString")
 {
 
 namespace HasToString
 
 using HasToString::Point;
 
-FACT(EqualADL)
+FACT("EqualADL")
 {
     Point p0(0, 0);
     Point p1(1, 1);
     Check.Contains(result.what(), "Actual: (1, 1)");
 }
 
-FACT(RangeEqualADL)
+FACT("RangeEqualADL")
 {
     Point p0[] = { Point(0, 0), Point(1, 0), Point(2, 0) };
     Point p1[] = { Point(0, 0), Point(1, 1), Point(2, 0) };
     Check.Contains(result.what(), "Actual: [ (0, 0), (1, 1), (2, 0) ]");
 }
 
-FACT(InRangeADL)
+FACT("InRangeADL")
 {
     Point min(0, 0);
     Point max(10, 0);
     Check.Contains(result.what(), "Actual: (20, 0)");
 }
 
-FACT(NotInRangeADL)
+FACT("NotInRangeADL")
 {
     Point min(0, 0);
     Point max(10, 0);

Tests/UnitTests/Theory.cpp

 #include "xUnit++/xUnitTime.h"
 #include "xUnit++/xUnit++.h"
 
-
-SUITE(Theory)
+SUITE("Theory")
 {
 
 void TheoryUnderTest(int x)
     return std::vector<std::tuple<int>>(std::begin(tuples), std::end(tuples));
 }
 
-FACT_FIXTURE(TheoriesAcceptRawFunctions, TheoryFixture)
+FACT_FIXTURE("TheoriesAcceptRawFunctions", TheoryFixture)
 {
     RegisterAndRun("TheoriesAcceptRawFunctions", RawFunctionProvider);
 }
 
-FACT_FIXTURE(TheoriesAcceptStdFunction, TheoryFixture)
+FACT_FIXTURE("TheoriesAcceptStdFunction", TheoryFixture)
 {
     std::function<std::vector<std::tuple<int>>()> provider = RawFunctionProvider;
 
     RegisterAndRun("TheoriesAcceptStdFunction", provider);
 }
 
-FACT_FIXTURE(TheoriesAcceptFunctors, TheoryFixture)
+FACT_FIXTURE("TheoriesAcceptFunctors", TheoryFixture)
 {
     struct
     {
     RegisterAndRun("TheoriesAcceptFunctors", functor);
 }
 
-FACT_FIXTURE(TheoriesGetAllDataPassedToThem, TheoryFixture)
+FACT_FIXTURE("TheoriesGetAllDataPassedToThem", TheoryFixture)
 {
     std::mutex lock;
     std::vector<int> dataProvided;
     Assert.Equal(1, std::count(dataProvided.begin(), dataProvided.end(), 3), LI);
 }
 
-FACT_FIXTURE(TheoriesCanBeSkipped, TheoryFixture)
+FACT_FIXTURE("TheoriesCanBeSkipped", TheoryFixture)
 {
     attributes.insert(std::make_pair("Skip", "Testing skip."));
 
     Run();
 }
 
-ATTRIBUTES(TheoriesCanHaveAttributes, ("Cats", "Meow"))
+ATTRIBUTES(("Cats", "Meow"))
+{
 DATA_THEORY(TheoriesCanHaveAttributes, (int), RawFunctionProvider)
 {
     for (const auto &test : xUnitpp::TestCollection::Instance().Tests())
 
     Assert.Fail() << "Could not find self in test list.";
 }
+}
 
 std::vector<std::tuple<std::string, std::vector<std::tuple<int, std::string>>>> ComplexProvider()
 {

xUnit++/xUnit++/xUnitMacroHelpers.h

 #define XU_CAT2(a,b) a ## b
 #define XU_CAT(a,b) XU_CAT2(a,b)
 
+#define XU_UNIQUE_ATT_NS XU_CAT(TestAtt_, __LINE__)
+#define XU_UNIQUE_NS XU_CAT(TestNs_, __LINE__)
+#define XU_UNIQUE_FIXTURE XU_CAT(TestFixture_, __LINE__)
+#define XU_UNIQUE_TEST XU_CAT(TestFn_, __LINE__)
+#define XU_UNIQUE_RUNNER XU_CAT(TestRunner_, __LINE__)
+
 // with thanks for various sources, but I got it from
 // http://stackoverflow.com/questions/2308243/macro-returning-the-number-of-arguments-it-is-given-in-c
 

xUnit++/xUnit++/xUnitMacros.h

 #include "xUnitCheck.h"
 #include "xUnitMacroHelpers.h"
 
-#define ATTRIBUTES(TestName, ...) \
-    namespace TestName ## _ns { \
+#define ATTRIBUTES(...) \
+    namespace XU_UNIQUE_ATT_NS { \
         namespace xUnitAttributes { \
             inline xUnitpp::AttributeCollection Attributes() \
             { \
                 return attributes; \
             } \
         } \
-    }
+    } \
+    namespace XU_UNIQUE_ATT_NS
 
-#define SUITE(name) \
-    namespace name ## _xUnitSuite { \
+#define SUITE(SuiteName) \
+    namespace { \
         namespace xUnitSuite { \
             inline const std::string &Name() \
             { \
-                static std::string name = #name; \
+                static std::string name = SuiteName; \
                 return name; \
             } \
         } \
     } \
-    namespace name ## _xUnitSuite
+    namespace
 
 namespace xUnitpp { struct NoFixture {}; }
 
-#define TIMED_FACT_FIXTURE(FactName, FixtureType, timeout) \
-    namespace FactName ## _ns { \
+#define TIMED_FACT_FIXTURE(FactDetails, FixtureType, timeout) \
+    namespace XU_UNIQUE_NS { \
         using xUnitpp::Assert; \
         std::shared_ptr<xUnitpp::Check> pCheck = std::make_shared<xUnitpp::Check>(); \
-        class FactName ## _Fixture : public FixtureType \
+        class XU_UNIQUE_FIXTURE : public FixtureType \
         { \
             /* !!!VS fix when '= delete' is supported */ \
-            FactName ## _Fixture &operator =(FactName ## _Fixture) /* = delete */; \
+            XU_UNIQUE_FIXTURE &operator =(XU_UNIQUE_FIXTURE) /* = delete */; \
         public: \
-            FactName ## _Fixture() : Check(*pCheck) { } \
-            void FactName(); \
+            XU_UNIQUE_FIXTURE() : Check(*pCheck) { } \
+            void XU_UNIQUE_TEST(); \
             const xUnitpp::Check &Check; \
         }; \
-        void FactName ## _runner() { FactName ## _Fixture().FactName(); } \
+        void XU_UNIQUE_RUNNER() { XU_UNIQUE_FIXTURE().XU_UNIQUE_TEST(); } \
         xUnitpp::TestCollection::Register reg(xUnitpp::TestCollection::Instance(), \
-            &FactName ## _runner, #FactName, xUnitSuite::Name(), \
+            &XU_UNIQUE_RUNNER, FactDetails, xUnitSuite::Name(), \
             xUnitAttributes::Attributes(), timeout, __FILE__, __LINE__, pCheck); \
     } \
-    void FactName ## _ns::FactName ## _Fixture::FactName()
+    void XU_UNIQUE_NS :: XU_UNIQUE_FIXTURE :: XU_UNIQUE_TEST()
 
-#define UNTIMED_FACT_FIXTURE(FactName, FixtureType) TIMED_FACT_FIXTURE(FactName, FixtureType, 0)
+#define UNTIMED_FACT_FIXTURE(FactDetails, FixtureType) TIMED_FACT_FIXTURE(FactDetails, FixtureType, 0)
 
-#define FACT_FIXTURE(FactName, FixtureType) TIMED_FACT_FIXTURE(FactName, FixtureType, -1)
+#define FACT_FIXTURE(FactDetails, FixtureType) TIMED_FACT_FIXTURE(FactDetails, FixtureType, -1)
 
-#define TIMED_FACT(FactName, timeout) TIMED_FACT_FIXTURE(FactName, xUnitpp::NoFixture, timeout)
+#define TIMED_FACT(FactDetails, timeout) TIMED_FACT_FIXTURE(FactDetails, xUnitpp::NoFixture, timeout)
 
-#define UNTIMED_FACT(FactName) TIMED_FACT_FIXTURE(FactName, xUnitpp::NoFixture, 0)
+#define UNTIMED_FACT(FactDetails) TIMED_FACT_FIXTURE(FactDetails, xUnitpp::NoFixture, 0)
 
-#define FACT(FactName) TIMED_FACT_FIXTURE(FactName, xUnitpp::NoFixture, -1)
+#define FACT(FactDetails) TIMED_FACT_FIXTURE(FactDetails, xUnitpp::NoFixture, -1)
 
 #define TIMED_DATA_THEORY(TheoryName, params, DataProvider, timeout) \
     namespace TheoryName ## _ns { \