From ac0f3c6d5d20ec2f59d6989812b032d2dcd89819 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 25 Jun 2015 19:27:08 +0200 Subject: [PATCH] Fix logging errors in propgrid sample. Use dedicated RT_FAILURE_MSG macro to log error messages while running the tests. --- samples/propgrid/tests.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/samples/propgrid/tests.cpp b/samples/propgrid/tests.cpp index a7eddb0b1a..58a69bd3e2 100644 --- a/samples/propgrid/tests.cpp +++ b/samples/propgrid/tests.cpp @@ -747,26 +747,22 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) if ( pgman->GetPropertyValueAsString(wxT("Car.Model")) != wxT("Lamborghini Diablo XYZ") ) { - wxLogDebug(wxT("Did not match: Car.Model=%s"), pgman->GetPropertyValueAsString(wxT("Car.Model")).c_str()); - RT_FAILURE(); + RT_FAILURE_MSG(wxString::Format(wxS("Did not match: Car.Model=%s"), pgman->GetPropertyValueAsString(wxS("Car.Model")).c_str()).c_str()); } if ( pgman->GetPropertyValueAsInt(wxT("Car.Speeds.Max. Speed (mph)")) != 100 ) { - wxLogDebug(wxT("Did not match: Car.Speeds.Max. Speed (mph)=%s"), pgman->GetPropertyValueAsString(wxT("Car.Speeds.Max. Speed (mph)")).c_str()); - RT_FAILURE(); + RT_FAILURE_MSG(wxString::Format(wxS("Did not match: Car.Speeds.Max. Speed (mph)=%s"), pgman->GetPropertyValueAsString(wxS("Car.Speeds.Max. Speed (mph)")).c_str()).c_str()); } if ( pgman->GetPropertyValueAsInt(wxT("Car.Price ($)")) != 3000002 ) { - wxLogDebug(wxT("Did not match: Car.Price ($)=%s"), pgman->GetPropertyValueAsString(wxT("Car.Price ($)")).c_str()); - RT_FAILURE(); + RT_FAILURE_MSG(wxString::Format(wxS("Did not match: Car.Price ($)=%s"), pgman->GetPropertyValueAsString(wxS("Car.Price ($)")).c_str()).c_str()); } if ( !pgman->GetPropertyValueAsBool(wxT("Car.Convertible")) ) { - wxLogDebug(wxT("Did not match: Car.Convertible=%s"), pgman->GetPropertyValueAsString(wxT("Car.Convertible")).c_str()); - RT_FAILURE(); + RT_FAILURE_MSG(wxString::Format(wxS("Did not match: Car.Convertible=%s"), pgman->GetPropertyValueAsString(wxS("Car.Convertible")).c_str()).c_str()); } // SetPropertyValueString for special cases such as wxColour