[DNSAPI_WINETEST]

* Sync with Wine 1.7.1.

svn path=/trunk/; revision=60165
This commit is contained in:
Amine Khaldi 2013-09-16 14:48:02 +00:00
parent 474b2a89bc
commit 4ddde1d7c9
4 changed files with 24 additions and 30 deletions

View file

@ -1,10 +1,6 @@
add_definitions( add_definitions(-D__ROS_LONG64__)
-D__ROS_LONG64__
-D_DLL -D__USE_CRTIMP)
add_executable(dnsapi_winetest name.c record.c testlist.c) add_executable(dnsapi_winetest name.c record.c testlist.c)
target_link_libraries(dnsapi_winetest wine)
set_module_type(dnsapi_winetest win32cui) set_module_type(dnsapi_winetest win32cui)
add_importlibs(dnsapi_winetest dnsapi msvcrt kernel32 ntdll) add_importlibs(dnsapi_winetest dnsapi msvcrt kernel32)
add_cd_file(TARGET dnsapi_winetest DESTINATION reactos/bin FOR all) add_cd_file(TARGET dnsapi_winetest DESTINATION reactos/bin FOR all)

View file

@ -18,20 +18,21 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <stdarg.h> #include <wine/test.h>
#include "windef.h" //#include <stdarg.h>
#include "winbase.h"
#include "winnls.h"
#include "windns.h"
#include "wine/test.h" //#include "windef.h"
//#include "winbase.h"
//#include "winnls.h"
#include <windns.h>
static const struct static const struct
{ {
LPCSTR name; LPCSTR name;
DNS_NAME_FORMAT format; DNS_NAME_FORMAT format;
DNS_STATUS status; DNS_STATUS status;
DNS_STATUS status_broken;
} }
test_data[] = test_data[] =
{ {
@ -47,8 +48,8 @@ test_data[] =
{ "a.*", DnsNameDomain, DNS_ERROR_INVALID_NAME_CHAR }, { "a.*", DnsNameDomain, DNS_ERROR_INVALID_NAME_CHAR },
{ "a ", DnsNameDomain, DNS_ERROR_INVALID_NAME_CHAR }, { "a ", DnsNameDomain, DNS_ERROR_INVALID_NAME_CHAR },
{ "a._b", DnsNameDomain, DNS_ERROR_NON_RFC_NAME }, { "a._b", DnsNameDomain, DNS_ERROR_NON_RFC_NAME },
{ "123", DnsNameDomain, DNS_ERROR_NUMERIC_NAME }, { "123", DnsNameDomain, ERROR_SUCCESS, DNS_ERROR_NUMERIC_NAME },
{ "123.456", DnsNameDomain, DNS_ERROR_NUMERIC_NAME }, { "123.456", DnsNameDomain, ERROR_SUCCESS, DNS_ERROR_NUMERIC_NAME },
{ "a.b", DnsNameDomain, ERROR_SUCCESS }, { "a.b", DnsNameDomain, ERROR_SUCCESS },
{ "", DnsNameDomainLabel, ERROR_INVALID_NAME }, { "", DnsNameDomainLabel, ERROR_INVALID_NAME },
@ -79,8 +80,8 @@ test_data[] =
{ "e.*", DnsNameHostnameFull, DNS_ERROR_INVALID_NAME_CHAR }, { "e.*", DnsNameHostnameFull, DNS_ERROR_INVALID_NAME_CHAR },
{ "e ", DnsNameHostnameFull, DNS_ERROR_INVALID_NAME_CHAR }, { "e ", DnsNameHostnameFull, DNS_ERROR_INVALID_NAME_CHAR },
{ "e._f", DnsNameHostnameFull, DNS_ERROR_NON_RFC_NAME }, { "e._f", DnsNameHostnameFull, DNS_ERROR_NON_RFC_NAME },
{ "789", DnsNameHostnameFull, DNS_ERROR_NUMERIC_NAME }, { "789", DnsNameHostnameFull, ERROR_SUCCESS, DNS_ERROR_NUMERIC_NAME },
{ "789.456", DnsNameHostnameFull, DNS_ERROR_NUMERIC_NAME }, { "789.456", DnsNameHostnameFull, ERROR_SUCCESS, DNS_ERROR_NUMERIC_NAME },
{ "e.f", DnsNameHostnameFull, ERROR_SUCCESS }, { "e.f", DnsNameHostnameFull, ERROR_SUCCESS },
{ "", DnsNameHostnameLabel, ERROR_INVALID_NAME }, { "", DnsNameHostnameLabel, ERROR_INVALID_NAME },
@ -93,7 +94,7 @@ test_data[] =
{ "*", DnsNameHostnameLabel, DNS_ERROR_INVALID_NAME_CHAR }, { "*", DnsNameHostnameLabel, DNS_ERROR_INVALID_NAME_CHAR },
{ "g ", DnsNameHostnameLabel, DNS_ERROR_INVALID_NAME_CHAR }, { "g ", DnsNameHostnameLabel, DNS_ERROR_INVALID_NAME_CHAR },
{ "_g", DnsNameHostnameLabel, DNS_ERROR_NON_RFC_NAME }, { "_g", DnsNameHostnameLabel, DNS_ERROR_NON_RFC_NAME },
{ "123", DnsNameHostnameLabel, DNS_ERROR_NUMERIC_NAME }, { "123", DnsNameHostnameLabel, ERROR_SUCCESS, DNS_ERROR_NUMERIC_NAME },
{ "123.456", DnsNameHostnameLabel, ERROR_INVALID_NAME }, { "123.456", DnsNameHostnameLabel, ERROR_INVALID_NAME },
{ "g.h", DnsNameHostnameLabel, ERROR_INVALID_NAME }, { "g.h", DnsNameHostnameLabel, ERROR_INVALID_NAME },
@ -146,8 +147,8 @@ static void test_DnsValidateName_A( void )
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 = 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 || broken(status == test_data[i].status_broken),
i, test_data[i].name, status, test_data[i].status ); "%d: \'%s\': got %d, expected %d\n", i, test_data[i].name, status, test_data[i].status );
} }
} }

View file

@ -18,15 +18,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <stdarg.h> #include <wine/test.h>
#include <stdio.h>
#include "windef.h" //#include <stdarg.h>
#include "winbase.h" //#include <stdio.h>
#include "winnls.h"
#include "windns.h"
#include "wine/test.h" //#include "windef.h"
//#include "winbase.h"
//#include "winnls.h"
#include <windns.h>
static char name1[] = "localhost"; static char name1[] = "localhost";
static char name2[] = "LOCALHOST"; static char name2[] = "LOCALHOST";

View file

@ -1,10 +1,7 @@
/* Automatically generated file; DO NOT EDIT!! */ /* Automatically generated file; DO NOT EDIT!! */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define STANDALONE #define STANDALONE
#include "wine/test.h" #include <wine/test.h>
extern void func_name(void); extern void func_name(void);
extern void func_record(void); extern void func_record(void);