Commit fc376839 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

msvcrt/tests: Check that some functions are only available in 32-bit code.

parent 858811a9
......@@ -95,14 +95,10 @@ static void test__environ(void)
return;
}
/* Examine the returned pointer from __p__environ(), if available. */
if (p__p__environ)
{
ok( *p__p__environ() == *p_environ,
"Expected _environ pointers to be identical\n" );
}
if (sizeof(void*) != sizeof(int))
ok( !p__p__environ, "__p__environ() should be 32-bit only\n");
else
skip( "__p__environ() is not available\n" );
ok( *p__p__environ() == *p_environ, "Expected _environ pointers to be identical\n" );
if (p_get_environ)
{
......@@ -158,14 +154,10 @@ static void test__wenviron(void)
return;
}
/* Examine the returned pointer from __p__wenviron(), if available. */
if (p__p__wenviron)
{
ok( *p__p__wenviron() == NULL,
"Expected _wenviron pointers to be NULL\n" );
}
if (sizeof(void*) != sizeof(int))
ok( !p__p__wenviron, "__p__wenviron() should be 32-bit only\n");
else
skip( "__p__wenviron() is not available\n" );
ok( *p__p__wenviron() == NULL, "Expected _wenviron pointers to be NULL\n" );
if (p_get_wenviron)
{
......
......@@ -590,15 +590,15 @@ static void test_daylight(void)
return;
}
if (!p___p__daylight)
/* Examine the returned pointer from __p__environ(), if available. */
if (sizeof(void*) != sizeof(int))
ok( !p___p__daylight, "___p__daylight() should be 32-bit only\n");
else
{
skip("__p__daylight not available\n");
return;
ret1 = p__daylight();
ret2 = p___p__daylight();
ok(ret1 && ret1 == ret2, "got %p\n", ret1);
}
ret1 = p__daylight();
ret2 = p___p__daylight();
ok(ret1 && ret1 == ret2, "got %p\n", ret1);
}
static void test_strftime(void)
......@@ -907,8 +907,11 @@ static void test__tzset(void)
char TZ_env[256];
int ret;
if(!p___p__daylight || !p___p__timezone || !p___p__dstbias) {
skip("__p__daylight, __p__timezone or __p__dstbias is not available\n");
if (sizeof(void*) != sizeof(int))
{
ok(!p___p__daylight, "___p__daylight() should be 32-bit only\n");
ok(!p___p__timezone, "___p__timezone() should be 32-bit only\n");
ok(!p___p__dstbias, "___p__dstbias() should be 32-bit only\n");
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment