https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a713e63b8bb8e3b9495f75c262c9ffd0157305a6

commit a713e63b8bb8e3b9495f75c262c9ffd0157305a6
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Tue Mar 10 01:27:59 2020 +0100
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Sat Oct 24 13:26:33 2020 +0200

    [COMPILER_APITEST] Add new compiler_apitest, using pseh tests
---
 modules/rostests/apitests/compiler/CMakeLists.txt  | 31 ++++++++--------------
 .../apitests/compiler/{psehtest.c => pseh.c}       |  8 +-----
 modules/rostests/apitests/compiler/pseh_cpp.cpp    |  3 +++
 .../rostests/apitests/compiler/psehtest_cpp.cpp    |  3 ---
 modules/rostests/apitests/compiler/testlist.c      | 12 +++++++++
 5 files changed, 27 insertions(+), 30 deletions(-)

diff --git a/modules/rostests/apitests/compiler/CMakeLists.txt 
b/modules/rostests/apitests/compiler/CMakeLists.txt
index fe5ee66e0b0..1cff26dbe19 100644
--- a/modules/rostests/apitests/compiler/CMakeLists.txt
+++ b/modules/rostests/apitests/compiler/CMakeLists.txt
@@ -1,21 +1,12 @@
 
-add_executable(pseh2_test psehtest.c psehtest2.c)
-target_link_libraries(pseh2_test wine ${PSEH_LIB})
-set_module_type(pseh2_test win32cui)
-add_importlibs(pseh2_test msvcrt kernel32 ntdll)
-add_rostests_file(TARGET pseh2_test)
-
-if(NOT MSVC)
-    target_compile_options(pseh2_test PRIVATE "-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_rostests_file(TARGET pseh2_test_cpp)
-
-if(NOT MSVC)
-    target_compile_options(pseh2_test_cpp PRIVATE "-Wno-format")
-endif()
+list(APPEND SOURCE
+    pseh.c
+    pseh_cpp.cpp
+    psehtest2.c
+    testlist.c)
+
+add_executable(compiler_apitest ${SOURCE})
+target_link_libraries(compiler_apitest wine ${PSEH_LIB})
+set_module_type(compiler_apitest win32cui)
+add_importlibs(compiler_apitest msvcrt kernel32 ntdll)
+add_rostests_file(TARGET compiler_apitest)
diff --git a/modules/rostests/apitests/compiler/psehtest.c 
b/modules/rostests/apitests/compiler/pseh.c
similarity index 99%
rename from modules/rostests/apitests/compiler/psehtest.c
rename to modules/rostests/apitests/compiler/pseh.c
index 242b3ecff8e..61800b17cf6 100644
--- a/modules/rostests/apitests/compiler/psehtest.c
+++ b/modules/rostests/apitests/compiler/pseh.c
@@ -26,7 +26,6 @@
 extern "C" {
 #endif
 
-#define STANDALONE
 #include <wine/test.h>
 
 extern void no_op(void);
@@ -2760,7 +2759,7 @@ struct subtest
        int (* func)(void);
 };
 
-void testsuite_syntax(void)
+START_TEST(pseh)
 {
        const struct subtest testsuite[] =
        {
@@ -2893,9 +2892,4 @@ void testsuite_syntax(void)
                ok(call_test(testsuite[i].func), "%s failed\n", 
testsuite[i].name);
 }
 
-const struct test winetest_testlist[] = {
-       { "pseh2_syntax", testsuite_syntax },
-       { 0, 0 }
-};
-
 /* EOF */
diff --git a/modules/rostests/apitests/compiler/pseh_cpp.cpp 
b/modules/rostests/apitests/compiler/pseh_cpp.cpp
new file mode 100644
index 00000000000..8a638741e64
--- /dev/null
+++ b/modules/rostests/apitests/compiler/pseh_cpp.cpp
@@ -0,0 +1,3 @@
+
+#define func_pseh func_pseh_cpp
+#include "pseh.c"
diff --git a/modules/rostests/apitests/compiler/psehtest_cpp.cpp 
b/modules/rostests/apitests/compiler/psehtest_cpp.cpp
deleted file mode 100644
index d6fe2e51d75..00000000000
--- a/modules/rostests/apitests/compiler/psehtest_cpp.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-#include "psehtest.c"
diff --git a/modules/rostests/apitests/compiler/testlist.c 
b/modules/rostests/apitests/compiler/testlist.c
new file mode 100644
index 00000000000..998fc1642e0
--- /dev/null
+++ b/modules/rostests/apitests/compiler/testlist.c
@@ -0,0 +1,12 @@
+#define STANDALONE
+#include <apitest.h>
+
+extern void func_pseh(void);
+extern void func_pseh_cpp(void);
+
+const struct test winetest_testlist[] =
+{
+    { "pseh", func_pseh },
+    { "pseh_cpp", func_pseh_cpp },
+    { 0, 0 }
+};

Reply via email to