Author: akhaldi
Date: Sun Mar 6 16:50:59 2016
New Revision: 70963
URL:
http://svn.reactos.org/svn/reactos?rev=70963&view=rev
Log:
[DNSAPI_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
Modified:
trunk/rostests/winetests/dnsapi/name.c
trunk/rostests/winetests/dnsapi/record.c
Modified: trunk/rostests/winetests/dnsapi/name.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/dnsapi/name.c?r…
==============================================================================
--- trunk/rostests/winetests/dnsapi/name.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/dnsapi/name.c [iso-8859-1] Sun Mar 6 16:50:59 2016
@@ -26,6 +26,8 @@
//#include "winbase.h"
//#include "winnls.h"
#include <windns.h>
+
+BOOL WINAPI DnsFlushResolverCacheEntry_A(PCSTR);
static const struct
{
@@ -154,22 +156,22 @@
static void test_DnsNameCompare_A( void )
{
- static CHAR empty[] = "",
- dot[] = ".",
- dotdot[] = "..",
- A[] = "A",
- a[] = "a",
- B[] = "B",
- b[] = "b",
- A_dot_B[] = "A.B",
- a_dot_a[] = "a.a",
- a_dot_b[] = "a.b",
- a_dot_b_dot[] = "a.b.",
- a_dot_b_dotdot[] = "a.b..",
- B_dot_A[] = "B.A",
- b_dot_a[] = "b.a",
- b_dot_a_dot[] = "b.a.",
- b_dot_a_dotdot[] = "b.a..";
+ static const CHAR empty[] = "",
+ dot[] = ".",
+ dotdot[] = "..",
+ A[] = "A",
+ a[] = "a",
+ B[] = "B",
+ b[] = "b",
+ A_dot_B[] = "A.B",
+ a_dot_a[] = "a.a",
+ a_dot_b[] = "a.b",
+ a_dot_b_dot[] = "a.b.",
+ a_dot_b_dotdot[] = "a.b..",
+ B_dot_A[] = "B.A",
+ b_dot_a[] = "b.a",
+ b_dot_a_dot[] = "b.a.",
+ b_dot_a_dotdot[] = "b.a..";
ok( DnsNameCompare_A( NULL, NULL ) == TRUE, "failed unexpectedly\n" );
@@ -202,8 +204,27 @@
ok( DnsNameCompare_A( a_dot_b, b_dot_a_dot ) == FALSE, "succeeded
unexpectedly\n" );
}
+static void test_DnsFlushResolverCacheEntry_A(void)
+{
+ BOOL ret;
+ DWORD err;
+
+ SetLastError( 0xdeadbeef );
+ ret = DnsFlushResolverCacheEntry_A( NULL );
+ err = GetLastError();
+ ok( !ret, "got %d\n", ret );
+ ok( err == 0xdeadbeef, "got %u\n", err );
+
+ ret = DnsFlushResolverCacheEntry_A( "localhost" );
+ ok( ret, "got %d\n", ret );
+
+ ret = DnsFlushResolverCacheEntry_A( "nxdomain.test.winehq.org" );
+ ok( ret, "got %d\n", ret );
+}
+
START_TEST(name)
{
test_DnsValidateName_A();
test_DnsNameCompare_A();
-}
+ test_DnsFlushResolverCacheEntry_A();
+}
Modified: trunk/rostests/winetests/dnsapi/record.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/dnsapi/record.c…
==============================================================================
--- trunk/rostests/winetests/dnsapi/record.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/dnsapi/record.c [iso-8859-1] Sun Mar 6 16:50:59 2016
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define UNICODE
+
#include <wine/test.h>
//#include <stdarg.h>
@@ -28,12 +30,12 @@
//#include "winnls.h"
#include <windns.h>
-static char name1[] = "localhost";
-static char name2[] = "LOCALHOST";
+static WCHAR name1[] =
{'l','o','c','a','l','h','o','s','t',0};
+static WCHAR name2[] =
{'L','O','C','A','L','H','O','S','T',0};
-static DNS_RECORDA r1 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, {
{ 0xffffffff } } };
-static DNS_RECORDA r2 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, {
{ 0xffffffff } } };
-static DNS_RECORDA r3 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, {
{ 0xffffffff } } };
+static DNS_RECORDW r1 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, {
{ 0xffffffff } } };
+static DNS_RECORDW r2 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, {
{ 0xffffffff } } };
+static DNS_RECORDW r3 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, {
{ 0xffffffff } } };
static void test_DnsRecordCompare( void )
{
@@ -43,10 +45,10 @@
ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n"
);
r2.Flags.S.CharSet = DnsCharSetUnicode;
- ok( DnsRecordCompare( &r1, &r2 ) == FALSE, "succeeded
unexpectedly\n" );
+ ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n"
);
r2.Flags.S.CharSet = DnsCharSetAnsi;
- ok( DnsRecordCompare( &r1, &r2 ) == FALSE, "succeeded
unexpectedly\n" );
+ ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n"
);
r1.Flags.S.CharSet = DnsCharSetAnsi;
ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n"
);
@@ -60,8 +62,8 @@
static void test_DnsRecordSetCompare( void )
{
- DNS_RECORD *diff1;
- DNS_RECORD *diff2;
+ DNS_RECORDW *diff1;
+ DNS_RECORDW *diff2;
DNS_RRSET rr1, rr2;
r1.Flags.DW = 0x2019;
@@ -120,7 +122,7 @@
static void test_DnsRecordSetDetach( void )
{
DNS_RRSET rr;
- DNS_RECORDA *r, *s;
+ DNS_RECORDW *r, *s;
DNS_RRSET_INIT( rr );
DNS_RRSET_ADD( rr, &r1 );