dnsapi/tests: Load dnsapi dynamically and use skip.

This commit is contained in:
Paul Vriens 2007-03-12 09:16:06 +01:00 committed by Alexandre Julliard
parent 4b2ba3e113
commit 034765e100
3 changed files with 15 additions and 3 deletions

View file

@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = dnsapi.dll
IMPORTS = dnsapi kernel32
IMPORTS = kernel32
CTESTS = \
name.c \

View file

@ -219,10 +219,16 @@ static void test_DnsNameCompare_A( void )
START_TEST(name)
{
dnsapi = LoadLibraryA( "dnsapi.dll" );
if (!dnsapi) return;
if (!dnsapi)
{
/* Doesn't exist before W2K */
skip("dnsapi.dll cannot be loaded\n");
return;
}
if (!init_function_ptrs())
{
skip("Needed functions are not available\n");
FreeLibrary( dnsapi );
return;
}

View file

@ -150,10 +150,16 @@ static void test_DnsRecordSetDetach( void )
START_TEST(record)
{
dnsapi = LoadLibraryA( "dnsapi.dll" );
if (!dnsapi) return;
if (!dnsapi)
{
/* Doesn't exist before W2K */
skip("dnsapi.dll cannot be loaded\n");
return;
}
if (!init_function_ptrs())
{
skip("Needed functions are not available\n");
FreeLibrary( dnsapi );
return;
}