Alistair Leslie-Hughes : msvcp110/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: 542126db3044b6675c7567e0af79aa8c859c9989
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=542126db3044b6675c7567e0af79aa8c859c9989

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Mon Jul  3 22:29:20 2017 +0000

msvcp110/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/msvcp110/tests/msvcp110.c | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/dlls/msvcp110/tests/msvcp110.c b/dlls/msvcp110/tests/msvcp110.c
index 500d3cb..36e929f 100644
--- a/dlls/msvcp110/tests/msvcp110.c
+++ b/dlls/msvcp110/tests/msvcp110.c
@@ -30,16 +30,6 @@ typedef unsigned char MSVCP_bool;
 #define TICKSPERSEC       10000000
 #define TICKS_1601_TO_1970 (SECS_1601_TO_1970 * TICKSPERSEC)
 
-static inline const char* debugstr_longlong(ULONGLONG ll)
-{
-    static char string[17];
-    if (sizeof(ll) > sizeof(unsigned long) && ll >> 32)
-        sprintf(string, "%lx%08lx", (unsigned long)(ll >> 32), (unsigned long)ll);
-    else
-        sprintf(string, "%lx", (unsigned long)ll);
-    return string;
-}
-
 static int (__cdecl *p_tr2_sys__Make_dir)(char const*);
 static MSVCP_bool (__cdecl *p_tr2_sys__Remove_dir)(char const*);
 static __int64 (__cdecl *p_tr2_sys__Last_write_time)(char const*);
@@ -96,7 +86,7 @@ static void test_tr2_sys__Last_write_time(void)
     p_tr2_sys__Last_write_time_set("tr2_test_dir/f1", newtime);
     ok(last_write_time != p_tr2_sys__Last_write_time("tr2_test_dir/f1"),
             "last_write_time should have changed: %s\n",
-            debugstr_longlong(last_write_time));
+            wine_dbgstr_longlong(last_write_time));
 
     /* test the formula */
     file = CreateFileA("tr2_test_dir/f1", 0, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
@@ -108,7 +98,7 @@ static void test_tr2_sys__Last_write_time(void)
     last_write_time -= TICKS_1601_TO_1970;
     last_write_time /= TICKSPERSEC;
     ok(newtime-margin_of_error<=last_write_time && last_write_time<=newtime+margin_of_error,
-            "don't fit the formula, last_write_time is %s\n", debugstr_longlong(last_write_time));
+            "don't fit the formula, last_write_time is %s\n", wine_dbgstr_longlong(last_write_time));
 
     newtime = 0;
     p_tr2_sys__Last_write_time_set("tr2_test_dir/f1", newtime);
@@ -122,7 +112,7 @@ static void test_tr2_sys__Last_write_time(void)
     last_write_time -= TICKS_1601_TO_1970;
     last_write_time /= TICKSPERSEC;
     ok(newtime-margin_of_error<=last_write_time && last_write_time<=newtime+margin_of_error,
-            "don't fit the formula, last_write_time is %s\n", debugstr_longlong(last_write_time));
+            "don't fit the formula, last_write_time is %s\n", wine_dbgstr_longlong(last_write_time));
 
     newtime = 123456789;
     p_tr2_sys__Last_write_time_set("tr2_test_dir/f1", newtime);
@@ -136,14 +126,14 @@ static void test_tr2_sys__Last_write_time(void)
     last_write_time -= TICKS_1601_TO_1970;
     last_write_time /= TICKSPERSEC;
     ok(newtime-margin_of_error<=last_write_time && last_write_time<=newtime+margin_of_error,
-            "don't fit the formula, last_write_time is %s\n", debugstr_longlong(last_write_time));
+            "don't fit the formula, last_write_time is %s\n", wine_dbgstr_longlong(last_write_time));
 
     errno = 0xdeadbeef;
     last_write_time = p_tr2_sys__Last_write_time("not_exist");
     ok(errno == 0xdeadbeef, "tr2_sys__Last_write_time(): errno expect 0xdeadbeef, got %d\n", errno);
-    ok(last_write_time == 0, "expect 0 got %s\n", debugstr_longlong(last_write_time));
+    ok(last_write_time == 0, "expect 0 got %s\n", wine_dbgstr_longlong(last_write_time));
     last_write_time = p_tr2_sys__Last_write_time(NULL);
-    ok(last_write_time == 0, "expect 0 got %s\n", debugstr_longlong(last_write_time));
+    ok(last_write_time == 0, "expect 0 got %s\n", wine_dbgstr_longlong(last_write_time));
 
     p_tr2_sys__Last_write_time_set("not_exist", newtime);
     errno = 0xdeadbeef;




More information about the wine-cvs mailing list