Author: tkreuzer
Date: Sat Apr 5 14:24:16 2014
New Revision: 62620
URL:
http://svn.reactos.org/svn/reactos?rev=62620&view=rev
Log:
[PSEH2_TEST}
Use the tests with C++, too.
Added:
trunk/rostests/tests/pseh2/psehtest_cpp.cpp (with props)
Modified:
trunk/rostests/tests/pseh2/CMakeLists.txt
trunk/rostests/tests/pseh2/psehtest.c
Modified: trunk/rostests/tests/pseh2/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/pseh2/CMakeLists.tx…
==============================================================================
--- trunk/rostests/tests/pseh2/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/rostests/tests/pseh2/CMakeLists.txt [iso-8859-1] Sat Apr 5 14:24:16 2014
@@ -8,3 +8,14 @@
if(NOT MSVC)
add_target_compile_flags(pseh2_test "-Wno-format")
endif()
+
+
+add_executable(pseh2_test_cpp psehtest_cpp.cpp psehtest2.c)
+target_link_libraries(pseh2_test_cpp wine ${PSEH_LIB})
+set_module_type(pseh2_test_cpp win32cui)
+add_importlibs(pseh2_test_cpp msvcrt kernel32 ntdll)
+add_cd_file(TARGET pseh2_test_cpp DESTINATION reactos/bin FOR all)
+
+if(NOT MSVC)
+ add_target_compile_flags(pseh2_test_cpp "-Wno-format")
+endif()
Modified: trunk/rostests/tests/pseh2/psehtest.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/pseh2/psehtest.c?re…
==============================================================================
--- trunk/rostests/tests/pseh2/psehtest.c [iso-8859-1] (original)
+++ trunk/rostests/tests/pseh2/psehtest.c [iso-8859-1] Sat Apr 5 14:24:16 2014
@@ -22,6 +22,10 @@
#include <pseh/pseh2.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define STANDALONE
#include <wine/test.h>
@@ -54,7 +58,11 @@
extern void set_positive(int *);
-static int call_test(int (*)(void));
+//static int call_test(int (*)(void));
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#define DEFINE_TEST(NAME_) static int NAME_(void)
@@ -2485,6 +2493,25 @@
return TRUE;
return FALSE;
+}
+
+DEFINE_TEST(test_unvolatile_4)
+{
+ unsigned result = 0xdeadbeef;
+
+ _SEH2_TRY
+ {
+ *(char*)0x80000000 = 1;
+ }
+ _SEH2_EXCEPT(result == 0xdeadbeef)
+ {
+ result = 2;
+ }
+ _SEH2_END;
+
+ result = (result == 0xdeadbeef) ? 0 : result + 1;
+
+ return result == 3;
}
DEFINE_TEST(test_finally_goto)
@@ -2814,6 +2841,7 @@
USE_TEST(test_unvolatile),
USE_TEST(test_unvolatile_2),
USE_TEST(test_unvolatile_3),
+ USE_TEST(test_unvolatile_4),
USE_TEST(test_finally_goto),
USE_TEST(test_nested_exception),
USE_TEST(test_PSEH3_bug),
Added: trunk/rostests/tests/pseh2/psehtest_cpp.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/pseh2/psehtest_cpp.…
==============================================================================
--- trunk/rostests/tests/pseh2/psehtest_cpp.cpp (added)
+++ trunk/rostests/tests/pseh2/psehtest_cpp.cpp [iso-8859-1] Sat Apr 5 14:24:16 2014
@@ -0,0 +1,3 @@
+
+
+#include "psehtest.c"
Propchange: trunk/rostests/tests/pseh2/psehtest_cpp.cpp
------------------------------------------------------------------------------
svn:eol-style = native