From e16922f3f3282fa3f093c98656690bf985dec04f Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Mon, 2 Jul 2012 18:32:05 +0200 Subject: [PATCH] msvcp90/tests: Fixed _Getctype tests. --- dlls/msvcp90/tests/misc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/msvcp90/tests/misc.c b/dlls/msvcp90/tests/misc.c index e7f88c530a..19a58540b4 100644 --- a/dlls/msvcp90/tests/misc.c +++ b/dlls/msvcp90/tests/misc.c @@ -58,7 +58,7 @@ static BYTE (__cdecl *p_short_eq)(const void*, const void*); static char* (__cdecl *p_Copy_s)(char*, size_t, const char*, size_t); static unsigned short (__cdecl *p_wctype)(const char*); -static MSVCP__Ctypevec (__cdecl *p__Getctype)(void); +static MSVCP__Ctypevec* (__cdecl *p__Getctype)(MSVCP__Ctypevec*); #undef __thiscall #ifdef __i386__ @@ -362,16 +362,16 @@ static void test__Getctype(void) { MSVCP__Ctypevec ret; - ret = p__Getctype(); + ok(p__Getctype(&ret) == &ret, "__Getctype returned incorrect pointer\n"); ok(ret.handle == 0, "ret.handle = %d\n", ret.handle); ok(ret.page == 0, "ret.page = %d\n", ret.page); ok(ret.delfl == 1, "ret.delfl = %d\n", ret.delfl); ok(ret.table[0] == 32, "ret.table[0] = %d\n", ret.table[0]); p_free(ret.table); - p__get_current_locale()->locinfo->lc_handle[LC_COLLATE] = 1; - ret = p__Getctype(); - ok(ret.handle == 1, "ret.handle = %d\n", ret.handle); + p__get_current_locale()->locinfo->lc_handle[LC_COLLATE] = 0x1234567; + ok(p__Getctype(&ret) == &ret, "__Getctype returned incorrect pointer\n"); + ok(ret.handle == 0x1234567, "ret.handle = %d\n", ret.handle); ok(ret.page == 0, "ret.page = %d\n", ret.page); ok(ret.delfl == 1, "ret.delfl = %d\n", ret.delfl); ok(ret.table[0] == 32, "ret.table[0] = %d\n", ret.table[0]); @@ -418,6 +418,7 @@ static void test_virtual_call(void) char str2[] = "TEST"; int ret; + p__get_current_locale()->locinfo->lc_handle[LC_COLLATE] = 1; call_func2(p_collate_char_ctor_refs, this, 0); ret = (int)call_func5(p_collate_char_compare, this, str1, str1+4, str1, str1+4); ok(ret == 0, "collate::compare returned %d\n", ret); -- 2.32.0.93.g670b81a890