Author: rharabien
Date: Thu Apr 28 22:10:51 2011
New Revision: 51484
URL:
http://svn.reactos.org/svn/reactos?rev=51484&view=rev
Log:
[APITESTS]
* Add GetDriveType tests. Some fails in ReactOS
* Fix few rbuild files
Added:
trunk/rostests/apitests/kernel32/ (with props)
trunk/rostests/apitests/kernel32/CMakeLists.txt (with props)
trunk/rostests/apitests/kernel32/GetDriveType.c (with props)
trunk/rostests/apitests/kernel32/kernel32_apitest.rbuild (with props)
trunk/rostests/apitests/kernel32/testlist.c (with props)
Modified:
trunk/rostests/apitests/CMakeLists.txt
trunk/rostests/apitests/directory.rbuild
trunk/rostests/dibtests/bltrop/bltrop.rbuild
trunk/rostests/dibtests/vbltest/vbltest.rbuild
trunk/rostests/dxtest/win32kdxtest/win32kdxtest.rbuild
trunk/rostests/win32/smss/movefile/movefile.rbuild
trunk/rostests/win32/user32/drawcaption/drawcaption.rbuild
trunk/rostests/winetests/cryptui/cryptui.rbuild
Modified: trunk/rostests/apitests/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/CMakeLists.txt?r…
==============================================================================
--- trunk/rostests/apitests/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/apitests/CMakeLists.txt [iso-8859-1] Thu Apr 28 22:10:51 2011
@@ -5,6 +5,7 @@
add_subdirectory(gdi32)
add_subdirectory(ntdll)
add_subdirectory(user32)
+add_subdirectory(kernel32)
if(NOT MSVC)
if(ARCH MATCHES i386)
Modified: trunk/rostests/apitests/directory.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/directory.rbuild…
==============================================================================
--- trunk/rostests/apitests/directory.rbuild [iso-8859-1] (original)
+++ trunk/rostests/apitests/directory.rbuild [iso-8859-1] Thu Apr 28 22:10:51 2011
@@ -21,6 +21,10 @@
<directory name="user32">
<xi:include href="user32/user32_apitest.rbuild" />
</directory>
+
+ <directory name="kernel32">
+ <xi:include href="kernel32/kernel32_apitest.rbuild" />
+ </directory>
<if property="ARCH" value="i386">
<directory name="w32kdll">
Propchange: trunk/rostests/apitests/kernel32/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Thu Apr 28 22:10:51 2011
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/rostests/apitests/kernel32/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/rostests/apitests/kernel32/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/rostests/apitests/kernel32/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: trunk/rostests/apitests/kernel32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/CMakeLi…
==============================================================================
--- trunk/rostests/apitests/kernel32/CMakeLists.txt (added)
+++ trunk/rostests/apitests/kernel32/CMakeLists.txt [iso-8859-1] Thu Apr 28 22:10:51 2011
@@ -1,0 +1,12 @@
+
+add_definitions(-D_DLL -D__USE_CRTIMP)
+
+list(APPEND SOURCE
+ GetDriveType.c
+ testlist.c)
+
+add_executable(kernel32_apitest ${SOURCE})
+target_link_libraries(kernel32_apitest wine ${PSEH_LIB})
+set_module_type(kernel32_apitest win32cui)
+add_importlibs(kernel32_apitest gdi32 user32 msvcrt kernel32 ntdll)
+add_cab_target(kernel32_apitest 7)
Propchange: trunk/rostests/apitests/kernel32/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/kernel32/GetDriveType.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/GetDriv…
==============================================================================
--- trunk/rostests/apitests/kernel32/GetDriveType.c (added)
+++ trunk/rostests/apitests/kernel32/GetDriveType.c [iso-8859-1] Thu Apr 28 22:10:51 2011
@@ -1,0 +1,71 @@
+#include <stdio.h>
+#include <wine/test.h>
+#include <windows.h>
+
+#define IS_DRIVE_TYPE_VALID(type) ((type) != DRIVE_UNKNOWN && (type) !=
DRIVE_NO_ROOT_DIR)
+
+START_TEST(GetDriveType)
+{
+ UINT Type, Type2, i;
+ WCHAR Path[MAX_PATH];
+
+ /* Note: Successful calls can set last error to at least ERROR_NOT_A_REPARSE_POINT,
we don't test it here */
+ SetLastError(0xdeadbeaf);
+
+ Type = GetDriveTypeW(L"");
+ ok(Type == DRIVE_NO_ROOT_DIR, "Expected DRIVE_NO_ROOT_DIR, got %u\n",
Type);
+
+ Type = GetDriveTypeW(L"\nC:\\");
+ ok(Type == DRIVE_NO_ROOT_DIR, "Expected DRIVE_NO_ROOT_DIR, got %u\n",
Type);
+
+ Type = GetDriveTypeW(L"Z:\\");
+ ok(Type == DRIVE_NO_ROOT_DIR, "Expected DRIVE_NO_ROOT_DIR, got %u\n",
Type);
+
+ ok(GetLastError() == 0xdeadbeaf, "Expected no errors, got %lu\n",
GetLastError());
+
+ /* Drive root is accepted without ending slash */
+ Type = GetDriveTypeW(L"C:");
+ ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n",
Type);
+
+ Type = GetDriveTypeW(L"C:\\");
+ ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n",
Type);
+
+ Type = GetDriveTypeW(NULL);
+ ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n",
Type);
+
+ i = GetCurrentDirectoryW(sizeof(Path)/sizeof(Path[0]), Path);
+ if (i)
+ {
+ /* Note: there is no backslash at the end of Path */
+ SetLastError(0xdeadbeaf);
+ Type2 = GetDriveTypeW(Path);
+ ok(Type2 == DRIVE_NO_ROOT_DIR, "Expected DRIVE_NO_ROOT_DIR, got %u\n",
Type2);
+ ok(GetLastError() == 0xdeadbeaf, "Expected ERROR_NOT_A_REPARSE_POINT, got
%lu\n", GetLastError());
+
+ wcscpy(Path+i, L"\\");
+ Type2 = GetDriveTypeW(Path);
+ ok(Type == Type2, "Types are not equal: %u != %u\n", Type, Type2);
+ }
+
+ i = GetSystemDirectoryW(Path, sizeof(Path)/sizeof(Path[0]));
+ if (i)
+ {
+ /* Note: there is no backslash at the end of Path */
+ SetLastError(0xdeadbeaf);
+ Type = GetDriveTypeW(Path);
+ ok(Type == DRIVE_NO_ROOT_DIR, "Expected DRIVE_NO_ROOT_DIR, got %u\n",
Type);
+ ok(GetLastError() == 0xdeadbeaf, "Expected no errors, got %lu\n",
GetLastError());
+
+ wcscpy(Path+i, L"\\");
+ Type = GetDriveTypeW(Path);
+ ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n",
Type);
+
+ wcscpy(Path+i, L"/");
+ Type = GetDriveTypeW(Path);
+ ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n",
Type);
+
+ wcscpy(Path+i, L"\\\\");
+ Type = GetDriveTypeW(Path);
+ ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n",
Type);
+ }
+}
Propchange: trunk/rostests/apitests/kernel32/GetDriveType.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/kernel32/kernel32_apitest.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/kernel3…
==============================================================================
--- trunk/rostests/apitests/kernel32/kernel32_apitest.rbuild (added)
+++ trunk/rostests/apitests/kernel32/kernel32_apitest.rbuild [iso-8859-1] Thu Apr 28
22:10:51 2011
@@ -1,0 +1,13 @@
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<group>
+<module name="kernel32_apitest" type="win32cui"
installbase="bin" installname="kernel32_apitest.exe">
+ <include base="kernel32_apitest">.</include>
+ <library>wine</library>
+ <library>ntdll</library>
+ <library>pseh</library>
+ <file>testlist.c</file>
+
+ <file>GetDriveType.c</file>
+</module>
+</group>
Propchange: trunk/rostests/apitests/kernel32/kernel32_apitest.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/kernel32/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/testlis…
==============================================================================
--- trunk/rostests/apitests/kernel32/testlist.c (added)
+++ trunk/rostests/apitests/kernel32/testlist.c [iso-8859-1] Thu Apr 28 22:10:51 2011
@@ -1,0 +1,16 @@
+#define WIN32_LEAN_AND_MEAN
+#define __ROS_LONG64__
+#include <windows.h>
+
+#define STANDALONE
+#include "wine/test.h"
+
+extern void func_GetDriveType(void);
+
+const struct test winetest_testlist[] =
+{
+ { "GetDriveType", func_GetDriveType },
+
+ { 0, 0 }
+};
+
Propchange: trunk/rostests/apitests/kernel32/testlist.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/rostests/dibtests/bltrop/bltrop.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dibtests/bltrop/bltrop.rb…
==============================================================================
--- trunk/rostests/dibtests/bltrop/bltrop.rbuild [iso-8859-1] (original)
+++ trunk/rostests/dibtests/bltrop/bltrop.rbuild [iso-8859-1] Thu Apr 28 22:10:51 2011
@@ -4,3 +4,4 @@
<library>user32</library>
<file>bltrop.c</file>
<file>bltrop.rc</file>
+</module>
Modified: trunk/rostests/dibtests/vbltest/vbltest.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dibtests/vbltest/vbltest.…
==============================================================================
--- trunk/rostests/dibtests/vbltest/vbltest.rbuild [iso-8859-1] (original)
+++ trunk/rostests/dibtests/vbltest/vbltest.rbuild [iso-8859-1] Thu Apr 28 22:10:51 2011
@@ -4,3 +4,4 @@
<library>gdi32</library>
<file>vbltest.c</file>
<file>vbltest.rc</file>
+</module>
Modified: trunk/rostests/dxtest/win32kdxtest/win32kdxtest.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dxtest/win32kdxtest/win32…
==============================================================================
--- trunk/rostests/dxtest/win32kdxtest/win32kdxtest.rbuild [iso-8859-1] (original)
+++ trunk/rostests/dxtest/win32kdxtest/win32kdxtest.rbuild [iso-8859-1] Thu Apr 28
22:10:51 2011
@@ -11,3 +11,4 @@
<file>NtGdiDdWaitForVerticalBlank.c</file>
<file>NtGdiDdCanCreateSurface.c</file>
<file>dump.c</file>
+</module>
Modified: trunk/rostests/win32/smss/movefile/movefile.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/smss/movefile/movef…
==============================================================================
--- trunk/rostests/win32/smss/movefile/movefile.rbuild [iso-8859-1] (original)
+++ trunk/rostests/win32/smss/movefile/movefile.rbuild [iso-8859-1] Thu Apr 28 22:10:51
2011
@@ -4,3 +4,4 @@
<library>user32</library>
<file>movefile.cpp</file>
<file>movefile.rc</file>
+</module>
Modified: trunk/rostests/win32/user32/drawcaption/drawcaption.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/user32/drawcaption/…
==============================================================================
--- trunk/rostests/win32/user32/drawcaption/drawcaption.rbuild [iso-8859-1] (original)
+++ trunk/rostests/win32/user32/drawcaption/drawcaption.rbuild [iso-8859-1] Thu Apr 28
22:10:51 2011
@@ -16,3 +16,4 @@
<file>capicon.c</file>
<file>capicon.rc</file>
</module>
+</group>
Modified: trunk/rostests/winetests/cryptui/cryptui.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/cryptui/cryptui…
==============================================================================
--- trunk/rostests/winetests/cryptui/cryptui.rbuild [iso-8859-1] (original)
+++ trunk/rostests/winetests/cryptui/cryptui.rbuild [iso-8859-1] Thu Apr 28 22:10:51 2011
@@ -8,3 +8,4 @@
<library>crypt32</library>
<library>user32</library>
<library>ntdll</library>
+</module>