[COMPILER_APITEST] Add new compiler_apitest, using pseh tests
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 10 Mar 2020 00:27:59 +0000 (01:27 +0100)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 24 Oct 2020 11:26:33 +0000 (13:26 +0200)
modules/rostests/apitests/compiler/CMakeLists.txt
modules/rostests/apitests/compiler/pseh.c [moved from modules/rostests/apitests/compiler/psehtest.c with 99% similarity]
modules/rostests/apitests/compiler/pseh_cpp.cpp [new file with mode: 0644]
modules/rostests/apitests/compiler/psehtest_cpp.cpp [deleted file]
modules/rostests/apitests/compiler/testlist.c [new file with mode: 0644]

index fe5ee66..1cff26d 100644 (file)
@@ -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)
similarity index 99%
rename from modules/rostests/apitests/compiler/psehtest.c
rename to modules/rostests/apitests/compiler/pseh.c
index 242b3ec..61800b1 100644 (file)
@@ -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 (file)
index 0000000..8a63874
--- /dev/null
@@ -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 (file)
index d6fe2e5..0000000
+++ /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 (file)
index 0000000..998fc16
--- /dev/null
@@ -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 }
+};