Author: tfaber
Date: Tue Nov 17 13:45:59 2015
New Revision: 69923
URL:
http://svn.reactos.org/svn/reactos?rev=69923&view=rev
Log:
[USER32_DYNAMIC_APITEST]
- Add a test that uses LoadLibrary/FreeLibrary on user32.dll, causing it to
re-initialize.
CORE-10540
Added:
trunk/rostests/apitests/user32_dynamic/ (with props)
trunk/rostests/apitests/user32_dynamic/CMakeLists.txt (with props)
trunk/rostests/apitests/user32_dynamic/load.c (with props)
trunk/rostests/apitests/user32_dynamic/testlist.c (with props)
Modified:
trunk/rostests/apitests/CMakeLists.txt
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] Tue Nov 17 13:45:59 2015
@@ -22,6 +22,7 @@
add_subdirectory(shell32)
add_subdirectory(psapi)
add_subdirectory(user32)
+add_subdirectory(user32_dynamic)
if(NOT ARCH STREQUAL "amd64")
add_subdirectory(w32kdll)
add_subdirectory(w32knapi)
Propchange: trunk/rostests/apitests/user32_dynamic/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Tue Nov 17 13:45:59 2015
@@ -0,0 +1 @@
+((CORE|ROSTESTS|ROSAPPS)-\d+)(,? ?((CORE|ROSTESTS|ROSAPPS)-\d+))*(,? ?(and |or
)?((CORE|ROSTESTS|ROSAPPS)-\d+))?
Propchange: trunk/rostests/apitests/user32_dynamic/
------------------------------------------------------------------------------
bugtraq:message = See issue %BUGID% for more details.
Propchange: trunk/rostests/apitests/user32_dynamic/
------------------------------------------------------------------------------
bugtraq:url =
https://jira.reactos.org/browse/%BUGID%
Added: trunk/rostests/apitests/user32_dynamic/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32_dynamic/C…
==============================================================================
--- trunk/rostests/apitests/user32_dynamic/CMakeLists.txt (added)
+++ trunk/rostests/apitests/user32_dynamic/CMakeLists.txt [iso-8859-1] Tue Nov 17 13:45:59
2015
@@ -0,0 +1,5 @@
+
+add_executable(user32_dynamic_apitest load.c testlist.c)
+set_module_type(user32_dynamic_apitest win32cui)
+add_importlibs(user32_dynamic_apitest msvcrt kernel32)
+add_cd_file(TARGET user32_dynamic_apitest DESTINATION reactos/bin FOR all)
Propchange: trunk/rostests/apitests/user32_dynamic/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/user32_dynamic/load.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32_dynamic/l…
==============================================================================
--- trunk/rostests/apitests/user32_dynamic/load.c (added)
+++ trunk/rostests/apitests/user32_dynamic/load.c [iso-8859-1] Tue Nov 17 13:45:59 2015
@@ -0,0 +1,49 @@
+/*
+ * PROJECT: ReactOS API tests
+ * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
+ * PURPOSE: Test for loading/unloading user32.dll
+ * PROGRAMMERS: Thomas Faber <thomas.faber(a)reactos.org>
+ */
+
+#include <apitest.h>
+
+START_TEST(load)
+{
+ HMODULE hUser32;
+ HMODULE hUser32_2;
+ BOOL Ret;
+ DWORD Error;
+
+ SetLastError(12345);
+ hUser32 = LoadLibraryW(L"user32");
+ Error = GetLastError();
+ ok(hUser32 != NULL, "LoadLibrary failed\n");
+ ok(Error != 12345, "Error = %lu\n", Error);
+
+ SetLastError(12345);
+ hUser32_2 = LoadLibraryW(L"user32");
+ Error = GetLastError();
+ ok(hUser32_2 == hUser32, "LoadLibrary failed\n");
+ ok(Error == 12345, "Error = %lu\n", Error);
+
+ Ret = FreeLibrary(hUser32);
+ Error = GetLastError();
+ ok(Ret == TRUE, "FreeLibrary returned %d\n", Ret);
+ ok(Error == 12345, "Error = %lu\n", Error);
+
+ Ret = FreeLibrary(hUser32);
+ Error = GetLastError();
+ ok(Ret == TRUE, "FreeLibrary returned %d\n", Ret);
+ ok(Error == 12345, "Error = %lu\n", Error);
+
+ SetLastError(12345);
+ hUser32 = LoadLibraryW(L"user32");
+ Error = GetLastError();
+ ok(hUser32 != NULL, "LoadLibrary failed\n");
+ ok(Error == 12345, "Error = %lu\n", Error);
+
+ Ret = FreeLibrary(hUser32);
+ Error = GetLastError();
+ ok(Ret == TRUE, "FreeLibrary returned %d\n", Ret);
+ ok(Error == 12345, "Error = %lu\n", Error);
+}
Propchange: trunk/rostests/apitests/user32_dynamic/load.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rostests/apitests/user32_dynamic/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32_dynamic/t…
==============================================================================
--- trunk/rostests/apitests/user32_dynamic/testlist.c (added)
+++ trunk/rostests/apitests/user32_dynamic/testlist.c [iso-8859-1] Tue Nov 17 13:45:59
2015
@@ -0,0 +1,10 @@
+#define STANDALONE
+#include <apitest.h>
+
+extern void func_load(void);
+
+const struct test winetest_testlist[] =
+{
+ { "load", func_load },
+ { 0, 0 }
+};
Propchange: trunk/rostests/apitests/user32_dynamic/testlist.c
------------------------------------------------------------------------------
svn:eol-style = native