Commit 034765e1 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

dnsapi/tests: Load dnsapi dynamically and use skip.

parent 4b2ba3e1
...@@ -3,7 +3,7 @@ TOPOBJDIR = ../../.. ...@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
TESTDLL = dnsapi.dll TESTDLL = dnsapi.dll
IMPORTS = dnsapi kernel32 IMPORTS = kernel32
CTESTS = \ CTESTS = \
name.c \ name.c \
......
...@@ -219,10 +219,16 @@ static void test_DnsNameCompare_A( void ) ...@@ -219,10 +219,16 @@ static void test_DnsNameCompare_A( void )
START_TEST(name) START_TEST(name)
{ {
dnsapi = LoadLibraryA( "dnsapi.dll" ); 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()) if (!init_function_ptrs())
{ {
skip("Needed functions are not available\n");
FreeLibrary( dnsapi ); FreeLibrary( dnsapi );
return; return;
} }
......
...@@ -150,10 +150,16 @@ static void test_DnsRecordSetDetach( void ) ...@@ -150,10 +150,16 @@ static void test_DnsRecordSetDetach( void )
START_TEST(record) START_TEST(record)
{ {
dnsapi = LoadLibraryA( "dnsapi.dll" ); 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()) if (!init_function_ptrs())
{ {
skip("Needed functions are not available\n");
FreeLibrary( dnsapi ); FreeLibrary( dnsapi );
return; 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