mshtml/tests: When a test fails, print the bad value!

Francois Gouget fgouget at free.fr
Tue Sep 13 10:32:18 CDT 2011


---

The expected value can usually be found simply by looking at the source. 
The bad value however is unexpected and impossible to guess (except for 
booleans of coruse) so not printing it often makes the failure 
impossible to debug.


 dlls/mshtml/tests/htmldoc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
index 0a7541b..03f2539 100644
--- a/dlls/mshtml/tests/htmldoc.c
+++ b/dlls/mshtml/tests/htmldoc.c
@@ -1630,7 +1630,7 @@ static HRESULT WINAPI InPlaceUIWindow_SetActiveObject(IOleInPlaceFrame *iface,
     if(expect_InPlaceUIWindow_SetActiveObject_active) {
         ok(pActiveObject != NULL, "pActiveObject = NULL\n");
         if(pActiveObject && is_english())
-            ok(!lstrcmpW(wszHTML_Document, pszObjName), "pszObjName != \"HTML Document\"\n");
+            ok(!lstrcmpW(wszHTML_Document, pszObjName), "%s != \"HTML Document\"\n", wine_dbgstr_w(pszObjName));
     }
     else {
         ok(pActiveObject == NULL, "pActiveObject=%p, expected NULL\n", pActiveObject);
@@ -1650,7 +1650,7 @@ static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface,
         CHECK_EXPECT2(SetActiveObject);
 
         if(pActiveObject && is_english())
-            ok(!lstrcmpW(wszHTML_Document, pszObjName), "pszObjName != \"HTML Document\"\n");
+            ok(!lstrcmpW(wszHTML_Document, pszObjName), "%s != \"HTML Document\"\n", wine_dbgstr_w(pszObjName));
     }else {
         CHECK_EXPECT(SetActiveObject_null);
 
-- 
1.7.5.4




More information about the wine-patches mailing list