From e84d9899300decdc1cfa79229c8c0b839ed2011f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 1 Jun 2012 16:21:03 +0000 Subject: [PATCH] Use printf() instead of wxPrintf() in cppunit details listener. Wide char output from wxPrintf() didn't appear at all under Linux because stdout was switched into narrow stream mode by GNU libc due to initial use of cout in the test. Use printf() instead of wxPrintf() as we are only printing ASCII strings anyhow. Of course, this is not a real fix but at least we can see the tests results like this. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test.cpp b/tests/test.cpp index e7eeffcfa5..c3bbc31191 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -231,7 +231,7 @@ public: virtual void startTest(CppUnit::Test *test) { - wxPrintf(" %-60s ", test->getName()); + printf(" %-60s ", test->getName().c_str()); m_result = RESULT_OK; m_watch.Start(); } @@ -244,10 +244,10 @@ public: virtual void endTest(CppUnit::Test * WXUNUSED(test)) { m_watch.Pause(); - wxPrintf(GetResultStr(m_result)); + printf("%s", GetResultStr(m_result)); if (m_timing) - wxPrintf(" %6ld ms", m_watch.Time()); - wxPrintf("\n"); + printf(" %6ld ms", m_watch.Time()); + printf("\n"); } protected : @@ -259,7 +259,7 @@ protected : RESULT_MAX }; - wxString GetResultStr(ResultType type) const + const char* GetResultStr(ResultType type) const { static const char *resultTypeNames[] = { -- 2.45.2