Alistair Leslie-Hughes : msvcp90/tests: Use standard wine_dbgstr_longlong.

Alexandre Julliard julliard at winehq.org
Tue Jul 4 15:25:57 CDT 2017


Module: wine
Branch: master
Commit: c36987fa7619c4e318fdc07ee0d88585dbb944fe
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c36987fa7619c4e318fdc07ee0d88585dbb944fe

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Thu Jun 29 00:44:16 2017 +0000

msvcp90/tests: Use standard wine_dbgstr_longlong.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcp90/tests/ios.c | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/dlls/msvcp90/tests/ios.c b/dlls/msvcp90/tests/ios.c
index 91c546e..c1d6589 100644
--- a/dlls/msvcp90/tests/ios.c
+++ b/dlls/msvcp90/tests/ios.c
@@ -531,19 +531,6 @@ static void __cdecl test_invalid_parameter_handler(const wchar_t *expression,
     invalid_parameter++;
 }
 
-static inline const char* debugstr_longlong(ULONGLONG ll)
-{
-    /* return a different string if called up to 4 times in the same ok() */
-    static char string[4][17];
-    static int which;
-
-    if (sizeof(ll) > sizeof(unsigned long) && ll >> 32)
-        sprintf(string[which & 3], "%lx%08lx", (unsigned long)(ll >> 32), (unsigned long)ll);
-    else
-        sprintf(string[which & 3], "%lx", (unsigned long)ll);
-    return string[which++ & 3];
-}
-
 /* Emulate a __thiscall */
 #ifdef __i386__
 
@@ -1839,7 +1826,7 @@ static void test_istream_tellg(void)
         if (tests[i].telloff_ss != -1 && spos.off != -1) /* check if tell == seek but only if not hit EOF */
             ok(spos.off == tpos.off, "tell doesn't match seek, seek = %ld tell = %ld\n", spos.off, tpos.off);
         ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos);
-        ok(tpos.pos == 0, "wrong position, expected = 0 found = %s\n", debugstr_longlong(tpos.pos));
+        ok(tpos.pos == 0, "wrong position, expected = 0 found = %s\n", wine_dbgstr_longlong(tpos.pos));
         ok(tpos.state == 0, "wrong state, expected = 0 found = %d\n", tpos.state);
 
         call_func1(p_basic_stringstream_char_vbase_dtor, &ss);
@@ -1866,7 +1853,7 @@ static void test_istream_tellg(void)
         if (tests[i].telloff_ss != -1 && spos.off != -1) /* check if tell == seek but only if not hit EOF */
             ok(spos.off == tpos.off, "tell doesn't match seek, seek = %ld tell = %ld\n", spos.off, tpos.off);
         ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos);
-        ok(tpos.pos == 0, "wrong position, expected = 0 found = %s\n", debugstr_longlong(tpos.pos));
+        ok(tpos.pos == 0, "wrong position, expected = 0 found = %s\n", wine_dbgstr_longlong(tpos.pos));
         ok(tpos.state == 0, "wrong state, expected = 0 found = %d\n", tpos.state);
 
         call_func1(p_basic_stringstream_wchar_vbase_dtor, &wss);
@@ -1893,7 +1880,7 @@ static void test_istream_tellg(void)
         rpos = call_func2(p_basic_istream_char_tellg, &fs.base.base1, &tpos);
 
         ok(tests[i].tellpos == tpos.pos, "wrong filepos, expected = %s found = %s\n",
-            debugstr_longlong(tests[i].tellpos), debugstr_longlong(tpos.pos));
+            wine_dbgstr_longlong(tests[i].tellpos), wine_dbgstr_longlong(tpos.pos));
         ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos);
         ok(tpos.off == tests[i].telloff_fs, "wrong offset, expected %ld found %ld\n", tests[i].telloff_fs, tpos.off);
         ok(tpos.state == 0, "wrong state, expected = 0 found = %d\n", tpos.state);
@@ -1916,7 +1903,7 @@ static void test_istream_tellg(void)
         rpos = call_func2(p_basic_istream_wchar_tellg, &wfs.base.base1, &tpos);
 
         ok(tests[i].tellpos == tpos.pos, "wrong filepos, expected = %s found = %s\n",
-            debugstr_longlong(tests[i].tellpos), debugstr_longlong(tpos.pos));
+            wine_dbgstr_longlong(tests[i].tellpos), wine_dbgstr_longlong(tpos.pos));
         ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos);
         ok(tpos.off == tests[i].telloff_fs, "wrong offset, expected %ld found %ld\n", tests[i].telloff_fs, tpos.off);
         ok(tpos.state == 0, "wrong state, expected = 0 found = %d\n", tpos.state);




More information about the wine-cvs mailing list