diff --git a/ZenUnitAndMetalMock/ZenUnit.h b/ZenUnitAndMetalMock/ZenUnit.h index 30dd405c..b1c6b113 100644 --- a/ZenUnitAndMetalMock/ZenUnit.h +++ b/ZenUnitAndMetalMock/ZenUnit.h @@ -6402,8 +6402,8 @@ Fatal Windows C++ Runtime Assertion zenUnitArgs.testNameFilters, this, &TestClassRunner::TestNameFilterMatchesTestName, testName); if (testNameFilterMatchesTestName) { - _protected_console->Write("|"); - _protected_console->Write(testName); + const std::string barTestName = String::ConcatStrings("|", testName); + _protected_console->Write(barTestName); test->WritePostTestNameMessage(_protected_console.get()); std::vector testResults = test->RunTest(); test->WritePostTestCompletionMessage(_protected_console.get(), testResults[0]); diff --git a/ZenUnitLibraryTests/Components/TestRunners/SpecificTestClassRunnerTests.cpp b/ZenUnitLibraryTests/Components/TestRunners/SpecificTestClassRunnerTests.cpp index 77f832c4..a65b4345 100644 --- a/ZenUnitLibraryTests/Components/TestRunners/SpecificTestClassRunnerTests.cpp +++ b/ZenUnitLibraryTests/Components/TestRunners/SpecificTestClassRunnerTests.cpp @@ -408,7 +408,6 @@ namespace ZenUnit // _specificTestClassRunner->RunTest(test, &testClassResultMock); // - METALMOCK(_protected_consoleMock->WriteMock.CalledNTimes(2)); METALMOCK(_call_ZenUnitTestRunner_GetZenUnitArgsMock.CalledOnce()); METALMOCK(testMock->NameMock.CalledOnce()); if (expectAnyerCall) @@ -416,8 +415,8 @@ namespace ZenUnit METALMOCK(_protected_twoArgMemberAnyerMock->TwoArgAnyMock.CalledOnceWith( zenUnitArgs.testNameFilters, _specificTestClassRunner.get(), &TestClassRunner::TestNameFilterMatchesTestName, testName.c_str())); } - METALMOCK(_protected_consoleMock->WriteMock.CalledWith("|")); - METALMOCK(_protected_consoleMock->WriteMock.CalledWith(testName)); + const string expectedBarTestName = String::ConcatStrings("|", testName); + METALMOCK(_protected_consoleMock->WriteMock.CalledOnceWith(expectedBarTestName)); METALMOCK(testMock->WritePostTestNameMessageMock.CalledOnceWith(_specificTestClassRunner->_protected_console.get())); METALMOCK(testMock->RunTestMock.CalledOnce()); METALMOCK(testClassResultMock.AddTestResultsMock.CalledOnceWith(TestResults));