Piotr Caban : msvcp90/tests: Don' t check if msvcp90 functions exists in misc tests.
Alexandre Julliard
julliard at winehq.org
Fri May 27 11:03:42 CDT 2011
Module: wine
Branch: master
Commit: 8a96e66f7b8ba393125871b586483ece9f45fe46
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8a96e66f7b8ba393125871b586483ece9f45fe46
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri May 27 14:35:18 2011 +0200
msvcp90/tests: Don't check if msvcp90 functions exists in misc tests.
---
dlls/msvcp90/tests/misc.c | 87 +++++++++++++++++---------------------------
1 files changed, 34 insertions(+), 53 deletions(-)
diff --git a/dlls/msvcp90/tests/misc.c b/dlls/msvcp90/tests/misc.c
index d052225..7e2fe1a 100644
--- a/dlls/msvcp90/tests/misc.c
+++ b/dlls/msvcp90/tests/misc.c
@@ -162,6 +162,8 @@ static void* do_call_func3(void *func, void *_this,
#endif /* __i386__ */
+#define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y)
+#define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0)
static BOOL init(void)
{
HMODULE msvcr = LoadLibraryA("msvcr90.dll");
@@ -180,39 +182,39 @@ static BOOL init(void)
p_set_invalid_parameter_handler(test_invalid_parameter_handler);
if(sizeof(void*) == 8) { /* 64-bit initialization */
- p_char_assign = (void*)GetProcAddress(msvcp, "?assign@?$char_traits at D@std@@SAXAEADAEBD at Z");
- p_wchar_assign = (void*)GetProcAddress(msvcp, "?assign@?$char_traits at _W@std@@SAXAEA_WAEB_W at Z");
- p_short_assign = (void*)GetProcAddress(msvcp, "?assign@?$char_traits at G@std@@SAXAEAGAEBG at Z");
-
- p_char_eq = (void*)GetProcAddress(msvcp, "?eq@?$char_traits at D@std@@SA_NAEBD0 at Z");
- p_wchar_eq = (void*)GetProcAddress(msvcp, "?eq@?$char_traits at _W@std@@SA_NAEB_W0 at Z");
- p_short_eq = (void*)GetProcAddress(msvcp, "?eq@?$char_traits at G@std@@SA_NAEBG0 at Z");
-
- p_Copy_s = (void*)GetProcAddress(msvcp, "?_Copy_s@?$char_traits at D@std@@SAPEADPEAD_KPEBD1 at Z");
-
- p_char_address = (void*)GetProcAddress(msvcp, "?address@?$allocator at D@std@@QEBAPEADAEAD at Z");
- p_char_ctor = (void*)GetProcAddress(msvcp, "??0?$allocator at D@std@@QEAA at XZ");
- p_char_deallocate = (void*)GetProcAddress(msvcp, "?deallocate@?$allocator at D@std@@QEAAXPEAD_K at Z");
- p_char_allocate = (void*)GetProcAddress(msvcp, "?allocate@?$allocator at D@std@@QEAAPEAD_K at Z");
- p_char_construct = (void*)GetProcAddress(msvcp, "?construct@?$allocator at D@std@@QEAAXPEADAEBD at Z");
- p_char_max_size = (void*)GetProcAddress(msvcp, "?max_size@?$allocator at D@std@@QEBA_KXZ");
+ SET(p_char_assign, "?assign@?$char_traits at D@std@@SAXAEADAEBD at Z");
+ SET(p_wchar_assign, "?assign@?$char_traits at _W@std@@SAXAEA_WAEB_W at Z");
+ SET(p_short_assign, "?assign@?$char_traits at G@std@@SAXAEAGAEBG at Z");
+
+ SET(p_char_eq, "?eq@?$char_traits at D@std@@SA_NAEBD0 at Z");
+ SET(p_wchar_eq, "?eq@?$char_traits at _W@std@@SA_NAEB_W0 at Z");
+ SET(p_short_eq, "?eq@?$char_traits at G@std@@SA_NAEBG0 at Z");
+
+ SET(p_Copy_s, "?_Copy_s@?$char_traits at D@std@@SAPEADPEAD_KPEBD1 at Z");
+
+ SET(p_char_address, "?address@?$allocator at D@std@@QEBAPEADAEAD at Z");
+ SET(p_char_ctor, "??0?$allocator at D@std@@QEAA at XZ");
+ SET(p_char_deallocate, "?deallocate@?$allocator at D@std@@QEAAXPEAD_K at Z");
+ SET(p_char_allocate, "?allocate@?$allocator at D@std@@QEAAPEAD_K at Z");
+ SET(p_char_construct, "?construct@?$allocator at D@std@@QEAAXPEADAEBD at Z");
+ SET(p_char_max_size, "?max_size@?$allocator at D@std@@QEBA_KXZ");
} else {
- p_char_assign = (void*)GetProcAddress(msvcp, "?assign@?$char_traits at D@std@@SAXAADABD at Z");
- p_wchar_assign = (void*)GetProcAddress(msvcp, "?assign@?$char_traits at _W@std@@SAXAA_WAB_W at Z");
- p_short_assign = (void*)GetProcAddress(msvcp, "?assign@?$char_traits at G@std@@SAXAAGABG at Z");
-
- p_char_eq = (void*)GetProcAddress(msvcp, "?eq@?$char_traits at D@std@@SA_NABD0 at Z");
- p_wchar_eq = (void*)GetProcAddress(msvcp, "?eq@?$char_traits at _W@std@@SA_NAB_W0 at Z");
- p_short_eq = (void*)GetProcAddress(msvcp, "?eq@?$char_traits at G@std@@SA_NABG0 at Z");
-
- p_Copy_s = (void*)GetProcAddress(msvcp, "?_Copy_s@?$char_traits at D@std@@SAPADPADIPBDI at Z");
-
- p_char_address = (void*)GetProcAddress(msvcp, "?address@?$allocator at D@std@@QBEPADAAD at Z");
- p_char_ctor = (void*)GetProcAddress(msvcp, "??0?$allocator at D@std@@QAE at XZ");
- p_char_deallocate = (void*)GetProcAddress(msvcp, "?deallocate@?$allocator at D@std@@QAEXPADI at Z");
- p_char_allocate = (void*)GetProcAddress(msvcp, "?allocate@?$allocator at D@std@@QAEPADI at Z");
- p_char_construct = (void*)GetProcAddress(msvcp, "?construct@?$allocator at D@std@@QAEXPADABD at Z");
- p_char_max_size = (void*)GetProcAddress(msvcp, "?max_size@?$allocator at D@std@@QBEIXZ");
+ SET(p_char_assign, "?assign@?$char_traits at D@std@@SAXAADABD at Z");
+ SET(p_wchar_assign, "?assign@?$char_traits at _W@std@@SAXAA_WAB_W at Z");
+ SET(p_short_assign, "?assign@?$char_traits at G@std@@SAXAAGABG at Z");
+
+ SET(p_char_eq, "?eq@?$char_traits at D@std@@SA_NABD0 at Z");
+ SET(p_wchar_eq, "?eq@?$char_traits at _W@std@@SA_NAB_W0 at Z");
+ SET(p_short_eq, "?eq@?$char_traits at G@std@@SA_NABG0 at Z");
+
+ SET(p_Copy_s, "?_Copy_s@?$char_traits at D@std@@SAPADPADIPBDI at Z");
+
+ SET(p_char_address, "?address@?$allocator at D@std@@QBEPADAAD at Z");
+ SET(p_char_ctor, "??0?$allocator at D@std@@QAE at XZ");
+ SET(p_char_deallocate, "?deallocate@?$allocator at D@std@@QAEXPADI at Z");
+ SET(p_char_allocate, "?allocate@?$allocator at D@std@@QAEPADI at Z");
+ SET(p_char_construct, "?construct@?$allocator at D@std@@QAEXPADABD at Z");
+ SET(p_char_max_size, "?max_size@?$allocator at D@std@@QBEIXZ");
}
return TRUE;
@@ -223,11 +225,6 @@ static void test_assign(void)
const char in[] = "abc";
char out[4];
- if(!p_char_assign || !p_wchar_assign || !p_short_assign) {
- win_skip("assign tests skipped\n");
- return;
- }
-
out[1] = '#';
p_char_assign(out, in);
ok(out[0] == in[0], "out[0] = %c\n", out[0]);
@@ -254,11 +251,6 @@ static void test_equal(void)
static const char in4[] = "b";
BYTE ret;
- if(!p_char_eq || !p_wchar_eq || !p_short_eq) {
- win_skip("equal tests skipped\n");
- return;
- }
-
ret = p_char_eq(in1, in2);
ok(ret == TRUE, "ret = %d\n", (int)ret);
ret = p_char_eq(in1, in3);
@@ -286,11 +278,6 @@ static void test_Copy_s(void)
static const char src[] = "abcd";
char dest[32], *ret;
- if(!p_Copy_s) {
- win_skip("Copy_s tests skipped\n");
- return;
- }
-
dest[4] = '#';
dest[5] = '\0';
ret = p_Copy_s(dest, 4, src, 4);
@@ -335,12 +322,6 @@ static void test_allocator_char(void)
char val;
unsigned int size;
- if(!p_char_address || !p_char_ctor || !p_char_deallocate || !p_char_allocate
- || !p_char_construct || !p_char_max_size) {
- win_skip("allocator<char> class not available\n");
- return;
- }
-
allocator = call_func1(p_char_ctor, allocator);
ok(allocator == (void*)0xdeadbeef, "allocator = %p\n", allocator);
More information about the wine-cvs
mailing list