From 4ddde1d7c951dd9a653c53ca663f037213552e8c Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 16 Sep 2013 14:48:02 +0000 Subject: [PATCH] [DNSAPI_WINETEST] * Sync with Wine 1.7.1. svn path=/trunk/; revision=60165 --- rostests/winetests/dnsapi/CMakeLists.txt | 8 ++----- rostests/winetests/dnsapi/name.c | 27 ++++++++++++------------ rostests/winetests/dnsapi/record.c | 14 ++++++------ rostests/winetests/dnsapi/testlist.c | 5 +---- 4 files changed, 24 insertions(+), 30 deletions(-) diff --git a/rostests/winetests/dnsapi/CMakeLists.txt b/rostests/winetests/dnsapi/CMakeLists.txt index ba5ffd06001..c0a5da69a05 100644 --- a/rostests/winetests/dnsapi/CMakeLists.txt +++ b/rostests/winetests/dnsapi/CMakeLists.txt @@ -1,10 +1,6 @@ -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - +add_definitions(-D__ROS_LONG64__) add_executable(dnsapi_winetest name.c record.c testlist.c) -target_link_libraries(dnsapi_winetest wine) 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) diff --git a/rostests/winetests/dnsapi/name.c b/rostests/winetests/dnsapi/name.c index d472687b9d3..b52adcc9ee3 100644 --- a/rostests/winetests/dnsapi/name.c +++ b/rostests/winetests/dnsapi/name.c @@ -18,20 +18,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +#include -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "windns.h" +//#include -#include "wine/test.h" +//#include "windef.h" +//#include "winbase.h" +//#include "winnls.h" +#include static const struct { LPCSTR name; DNS_NAME_FORMAT format; DNS_STATUS status; + DNS_STATUS status_broken; } test_data[] = { @@ -47,8 +48,8 @@ test_data[] = { "a.*", DnsNameDomain, DNS_ERROR_INVALID_NAME_CHAR }, { "a ", DnsNameDomain, DNS_ERROR_INVALID_NAME_CHAR }, { "a._b", DnsNameDomain, DNS_ERROR_NON_RFC_NAME }, - { "123", DnsNameDomain, DNS_ERROR_NUMERIC_NAME }, - { "123.456", DnsNameDomain, DNS_ERROR_NUMERIC_NAME }, + { "123", DnsNameDomain, ERROR_SUCCESS, DNS_ERROR_NUMERIC_NAME }, + { "123.456", DnsNameDomain, ERROR_SUCCESS, DNS_ERROR_NUMERIC_NAME }, { "a.b", DnsNameDomain, ERROR_SUCCESS }, { "", 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._f", DnsNameHostnameFull, DNS_ERROR_NON_RFC_NAME }, - { "789", DnsNameHostnameFull, DNS_ERROR_NUMERIC_NAME }, - { "789.456", DnsNameHostnameFull, DNS_ERROR_NUMERIC_NAME }, + { "789", DnsNameHostnameFull, ERROR_SUCCESS, DNS_ERROR_NUMERIC_NAME }, + { "789.456", DnsNameHostnameFull, ERROR_SUCCESS, DNS_ERROR_NUMERIC_NAME }, { "e.f", DnsNameHostnameFull, ERROR_SUCCESS }, { "", DnsNameHostnameLabel, ERROR_INVALID_NAME }, @@ -93,7 +94,7 @@ test_data[] = { "*", DnsNameHostnameLabel, DNS_ERROR_INVALID_NAME_CHAR }, { "g ", DnsNameHostnameLabel, DNS_ERROR_INVALID_NAME_CHAR }, { "_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 }, { "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++) { status = DnsValidateName_A( test_data[i].name, test_data[i].format ); - ok( status == test_data[i].status, "%d: \'%s\': got %d, expected %d\n", - i, test_data[i].name, status, test_data[i].status ); + ok( status == test_data[i].status || broken(status == test_data[i].status_broken), + "%d: \'%s\': got %d, expected %d\n", i, test_data[i].name, status, test_data[i].status ); } } diff --git a/rostests/winetests/dnsapi/record.c b/rostests/winetests/dnsapi/record.c index 4e97d85d756..75886608186 100644 --- a/rostests/winetests/dnsapi/record.c +++ b/rostests/winetests/dnsapi/record.c @@ -18,15 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include +#include -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "windns.h" +//#include +//#include -#include "wine/test.h" +//#include "windef.h" +//#include "winbase.h" +//#include "winnls.h" +#include static char name1[] = "localhost"; static char name2[] = "LOCALHOST"; diff --git a/rostests/winetests/dnsapi/testlist.c b/rostests/winetests/dnsapi/testlist.c index 5ca23fe84a1..2c7935f4b70 100644 --- a/rostests/winetests/dnsapi/testlist.c +++ b/rostests/winetests/dnsapi/testlist.c @@ -1,10 +1,7 @@ /* Automatically generated file; DO NOT EDIT!! */ -#define WIN32_LEAN_AND_MEAN -#include - #define STANDALONE -#include "wine/test.h" +#include extern void func_name(void); extern void func_record(void);