Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
1691ca5e
Commit
1691ca5e
authored
Aug 21, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Aug 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnsapi/tests: No need to dynamically load dnsapi anymore.
parent
7626e5ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
119 deletions
+53
-119
Makefile.in
dlls/dnsapi/tests/Makefile.in
+1
-1
name.c
dlls/dnsapi/tests/name.c
+31
-63
record.c
dlls/dnsapi/tests/record.c
+21
-55
No files found.
dlls/dnsapi/tests/Makefile.in
View file @
1691ca5e
...
@@ -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
=
kernel32
IMPORTS
=
dnsapi
kernel32
CTESTS
=
\
CTESTS
=
\
name.c
\
name.c
\
...
...
dlls/dnsapi/tests/name.c
View file @
1691ca5e
...
@@ -27,21 +27,6 @@
...
@@ -27,21 +27,6 @@
#include "wine/test.h"
#include "wine/test.h"
static
HMODULE
dnsapi
;
static
BOOL
(
WINAPI
*
pDnsNameCompare_A
)(
LPSTR
,
LPSTR
);
static
DNS_STATUS
(
WINAPI
*
pDnsValidateName_A
)(
LPCSTR
,
DNS_NAME_FORMAT
);
#define GETFUNCPTR(func) p##func = (void *)GetProcAddress( dnsapi, #func ); \
if (!p##func) return FALSE;
static
BOOL
init_function_ptrs
(
void
)
{
GETFUNCPTR
(
DnsNameCompare_A
)
GETFUNCPTR
(
DnsValidateName_A
)
return
TRUE
;
}
static
const
struct
static
const
struct
{
{
LPCSTR
name
;
LPCSTR
name
;
...
@@ -155,12 +140,12 @@ static void test_DnsValidateName_A( void )
...
@@ -155,12 +140,12 @@ static void test_DnsValidateName_A( void )
unsigned
int
i
;
unsigned
int
i
;
DNS_STATUS
status
;
DNS_STATUS
status
;
status
=
p
DnsValidateName_A
(
NULL
,
DnsNameDomain
);
status
=
DnsValidateName_A
(
NULL
,
DnsNameDomain
);
ok
(
status
==
ERROR_INVALID_NAME
,
"succeeded unexpectedly
\n
"
);
ok
(
status
==
ERROR_INVALID_NAME
,
"succeeded unexpectedly
\n
"
);
for
(
i
=
0
;
i
<
sizeof
(
test_data
)
/
sizeof
(
test_data
[
0
]);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
test_data
)
/
sizeof
(
test_data
[
0
]);
i
++
)
{
{
status
=
p
DnsValidateName_A
(
test_data
[
i
].
name
,
test_data
[
i
].
format
);
status
=
DnsValidateName_A
(
test_data
[
i
].
name
,
test_data
[
i
].
format
);
ok
(
status
==
test_data
[
i
].
status
,
"%d:
\'
%s
\'
: got %d, expected %d
\n
"
,
ok
(
status
==
test_data
[
i
].
status
,
"%d:
\'
%s
\'
: got %d, expected %d
\n
"
,
i
,
test_data
[
i
].
name
,
status
,
test_data
[
i
].
status
);
i
,
test_data
[
i
].
name
,
status
,
test_data
[
i
].
status
);
}
}
...
@@ -185,56 +170,39 @@ static void test_DnsNameCompare_A( void )
...
@@ -185,56 +170,39 @@ static void test_DnsNameCompare_A( void )
b_dot_a_dot
[]
=
"b.a."
,
b_dot_a_dot
[]
=
"b.a."
,
b_dot_a_dotdot
[]
=
"b.a.."
;
b_dot_a_dotdot
[]
=
"b.a.."
;
ok
(
p
DnsNameCompare_A
(
NULL
,
NULL
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
NULL
,
NULL
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
empty
,
empty
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
empty
,
empty
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
dot
,
empty
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
dot
,
empty
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
empty
,
dot
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
empty
,
dot
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
dot
,
dotdot
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
dot
,
dotdot
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
dotdot
,
dot
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
dotdot
,
dot
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a
,
a
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a
,
a
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a
,
A
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a
,
A
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
A
,
a
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
A
,
a
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b
,
A_dot_B
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b
,
A_dot_B
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b
,
a_dot_b
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b
,
a_dot_b
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b_dot
,
a_dot_b_dot
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b_dot
,
a_dot_b_dot
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b_dotdot
,
a_dot_b_dotdot
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b_dotdot
,
a_dot_b_dotdot
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
empty
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
empty
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
NULL
,
empty
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
NULL
,
empty
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a
,
b
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a
,
b
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a
,
B
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a
,
B
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
A
,
b
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
A
,
b
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b
,
B_dot_A
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b
,
B_dot_A
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b_dot
,
b_dot_a_dot
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b_dot
,
b_dot_a_dot
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b
,
a_dot_a
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b
,
a_dot_a
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b_dotdot
,
b_dot_a_dotdot
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b_dotdot
,
b_dot_a_dotdot
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b_dot
,
b_dot_a_dotdot
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b_dot
,
b_dot_a_dotdot
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b_dotdot
,
b_dot_a_dot
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b_dotdot
,
b_dot_a_dot
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b_dot
,
b_dot_a
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b_dot
,
b_dot_a
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsNameCompare_A
(
a_dot_b
,
b_dot_a_dot
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsNameCompare_A
(
a_dot_b
,
b_dot_a_dot
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
}
}
START_TEST
(
name
)
START_TEST
(
name
)
{
{
dnsapi
=
LoadLibraryA
(
"dnsapi.dll"
);
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
;
}
test_DnsValidateName_A
();
test_DnsValidateName_A
();
test_DnsNameCompare_A
();
test_DnsNameCompare_A
();
FreeLibrary
(
dnsapi
);
}
}
dlls/dnsapi/tests/record.c
View file @
1691ca5e
...
@@ -28,23 +28,6 @@
...
@@ -28,23 +28,6 @@
#include "wine/test.h"
#include "wine/test.h"
static
HMODULE
dnsapi
;
static
BOOL
(
WINAPI
*
pDnsRecordCompare
)(
PDNS_RECORD
,
PDNS_RECORD
);
static
BOOL
(
WINAPI
*
pDnsRecordSetCompare
)(
PDNS_RECORD
,
PDNS_RECORD
,
PDNS_RECORD
*
,
PDNS_RECORD
*
);
static
DNS_RECORD
*
(
WINAPI
*
pDnsRecordSetDetach
)(
PDNS_RECORD
);
#define GETFUNCPTR(func) p##func = (void *)GetProcAddress( dnsapi, #func ); \
if (!p##func) return FALSE;
static
BOOL
init_function_ptrs
(
void
)
{
GETFUNCPTR
(
DnsRecordCompare
)
GETFUNCPTR
(
DnsRecordSetCompare
)
GETFUNCPTR
(
DnsRecordSetDetach
)
return
TRUE
;
}
static
char
name1
[]
=
"localhost"
;
static
char
name1
[]
=
"localhost"
;
static
char
name2
[]
=
"LOCALHOST"
;
static
char
name2
[]
=
"LOCALHOST"
;
...
@@ -54,25 +37,25 @@ static DNS_RECORDA r3 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 12
...
@@ -54,25 +37,25 @@ static DNS_RECORDA r3 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 12
static
void
test_DnsRecordCompare
(
void
)
static
void
test_DnsRecordCompare
(
void
)
{
{
ok
(
p
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r1
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r1
)
==
TRUE
,
"failed unexpectedly
\n
"
);
r2
.
pName
=
name2
;
r2
.
pName
=
name2
;
ok
(
p
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
r2
.
Flags
.
S
.
CharSet
=
DnsCharSetUnicode
;
r2
.
Flags
.
S
.
CharSet
=
DnsCharSetUnicode
;
ok
(
p
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
r2
.
Flags
.
S
.
CharSet
=
DnsCharSetAnsi
;
r2
.
Flags
.
S
.
CharSet
=
DnsCharSetAnsi
;
ok
(
p
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
r1
.
Flags
.
S
.
CharSet
=
DnsCharSetAnsi
;
r1
.
Flags
.
S
.
CharSet
=
DnsCharSetAnsi
;
ok
(
p
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
r1
.
dwTtl
=
0
;
r1
.
dwTtl
=
0
;
ok
(
p
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
r2
.
Data
.
A
.
IpAddress
=
0
;
r2
.
Data
.
A
.
IpAddress
=
0
;
ok
(
p
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordCompare
(
(
PDNS_RECORD
)
&
r1
,
(
PDNS_RECORD
)
&
r2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
}
}
static
void
test_DnsRecordSetCompare
(
void
)
static
void
test_DnsRecordSetCompare
(
void
)
...
@@ -94,36 +77,36 @@ static void test_DnsRecordSetCompare( void )
...
@@ -94,36 +77,36 @@ static void test_DnsRecordSetCompare( void )
DNS_RRSET_TERMINATE
(
rr1
);
DNS_RRSET_TERMINATE
(
rr1
);
DNS_RRSET_TERMINATE
(
rr2
);
DNS_RRSET_TERMINATE
(
rr2
);
ok
(
p
DnsRecordSetCompare
(
NULL
,
NULL
,
NULL
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
NULL
,
NULL
,
NULL
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
NULL
,
NULL
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
NULL
,
NULL
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsRecordSetCompare
(
NULL
,
rr2
.
pFirstRR
,
NULL
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
NULL
,
rr2
.
pFirstRR
,
NULL
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
diff1
=
NULL
;
diff1
=
NULL
;
diff2
=
NULL
;
diff2
=
NULL
;
ok
(
p
DnsRecordSetCompare
(
NULL
,
NULL
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
NULL
,
NULL
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
diff1
==
NULL
&&
diff2
==
NULL
,
"unexpected result: %p, %p
\n
"
,
diff1
,
diff2
);
ok
(
diff1
==
NULL
&&
diff2
==
NULL
,
"unexpected result: %p, %p
\n
"
,
diff1
,
diff2
);
ok
(
p
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
NULL
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
NULL
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
diff1
!=
NULL
&&
diff2
==
NULL
,
"unexpected result: %p, %p
\n
"
,
diff1
,
diff2
);
ok
(
diff1
!=
NULL
&&
diff2
==
NULL
,
"unexpected result: %p, %p
\n
"
,
diff1
,
diff2
);
ok
(
p
DnsRecordSetCompare
(
NULL
,
rr2
.
pFirstRR
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
NULL
,
rr2
.
pFirstRR
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
diff1
==
NULL
&&
diff2
!=
NULL
,
"unexpected result: %p, %p
\n
"
,
diff1
,
diff2
);
ok
(
diff1
==
NULL
&&
diff2
!=
NULL
,
"unexpected result: %p, %p
\n
"
,
diff1
,
diff2
);
ok
(
p
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
NULL
,
&
diff2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
NULL
,
&
diff2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
diff2
==
NULL
,
"unexpected result: %p
\n
"
,
diff2
);
ok
(
diff2
==
NULL
,
"unexpected result: %p
\n
"
,
diff2
);
ok
(
p
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
&
diff1
,
NULL
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
&
diff1
,
NULL
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
diff1
==
NULL
,
"unexpected result: %p
\n
"
,
diff1
);
ok
(
diff1
==
NULL
,
"unexpected result: %p
\n
"
,
diff1
);
ok
(
p
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
&
diff1
,
&
diff2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
&
diff1
,
&
diff2
)
==
TRUE
,
"failed unexpectedly
\n
"
);
ok
(
diff1
==
NULL
&&
diff2
==
NULL
,
"unexpected result: %p, %p
\n
"
,
diff1
,
diff2
);
ok
(
diff1
==
NULL
&&
diff2
==
NULL
,
"unexpected result: %p, %p
\n
"
,
diff1
,
diff2
);
r2
.
Data
.
A
.
IpAddress
=
0
;
r2
.
Data
.
A
.
IpAddress
=
0
;
ok
(
p
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
NULL
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
NULL
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
&
diff1
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
&
diff1
,
NULL
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
p
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
ok
(
DnsRecordSetCompare
(
rr1
.
pFirstRR
,
rr2
.
pFirstRR
,
&
diff1
,
&
diff2
)
==
FALSE
,
"succeeded unexpectedly
\n
"
);
}
}
static
void
test_DnsRecordSetDetach
(
void
)
static
void
test_DnsRecordSetDetach
(
void
)
...
@@ -137,10 +120,10 @@ static void test_DnsRecordSetDetach( void )
...
@@ -137,10 +120,10 @@ static void test_DnsRecordSetDetach( void )
DNS_RRSET_ADD
(
rr
,
&
r3
);
DNS_RRSET_ADD
(
rr
,
&
r3
);
DNS_RRSET_TERMINATE
(
rr
);
DNS_RRSET_TERMINATE
(
rr
);
ok
(
!
p
DnsRecordSetDetach
(
NULL
),
"succeeded unexpectedly
\n
"
);
ok
(
!
DnsRecordSetDetach
(
NULL
),
"succeeded unexpectedly
\n
"
);
r
=
rr
.
pFirstRR
;
r
=
rr
.
pFirstRR
;
s
=
p
DnsRecordSetDetach
(
r
);
s
=
DnsRecordSetDetach
(
r
);
ok
(
s
==
&
r3
,
"failed unexpectedly: got %p, expected %p
\n
"
,
s
,
&
r3
);
ok
(
s
==
&
r3
,
"failed unexpectedly: got %p, expected %p
\n
"
,
s
,
&
r3
);
ok
(
r
==
&
r1
,
"failed unexpectedly: got %p, expected %p
\n
"
,
r
,
&
r1
);
ok
(
r
==
&
r1
,
"failed unexpectedly: got %p, expected %p
\n
"
,
r
,
&
r1
);
...
@@ -149,24 +132,7 @@ static void test_DnsRecordSetDetach( void )
...
@@ -149,24 +132,7 @@ static void test_DnsRecordSetDetach( void )
START_TEST
(
record
)
START_TEST
(
record
)
{
{
dnsapi
=
LoadLibraryA
(
"dnsapi.dll"
);
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
;
}
test_DnsRecordCompare
();
test_DnsRecordCompare
();
test_DnsRecordSetCompare
();
test_DnsRecordSetCompare
();
test_DnsRecordSetDetach
();
test_DnsRecordSetDetach
();
FreeLibrary
(
dnsapi
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment