summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-01 22:44:47 +0800
committerruki <[email protected]>2023-11-01 22:44:47 +0800
commit3ba30810808986745dc0644ce495e3ab46d41291 (patch)
tree944220035774d042ad7b089384576fb325196207
parent62e71bb6aa56d397edc45a0a3112248778a42bac (diff)
add tests
-rw-r--r--tests/actions/test/tests/stub_1.cpp3
-rw-r--r--tests/actions/test/tests/stub_2.cpp3
-rw-r--r--tests/actions/test/tests/stub_n1.cpp3
-rw-r--r--tests/actions/test/tests/stub_n2.cpp3
-rw-r--r--tests/actions/test/xmake.lua18
5 files changed, 30 insertions, 0 deletions
diff --git a/tests/actions/test/tests/stub_1.cpp b/tests/actions/test/tests/stub_1.cpp
new file mode 100644
index 000000000..f44749b33
--- /dev/null
+++ b/tests/actions/test/tests/stub_1.cpp
@@ -0,0 +1,3 @@
+#ifndef STUB_1
+#error
+#endif
diff --git a/tests/actions/test/tests/stub_2.cpp b/tests/actions/test/tests/stub_2.cpp
new file mode 100644
index 000000000..fd4050d90
--- /dev/null
+++ b/tests/actions/test/tests/stub_2.cpp
@@ -0,0 +1,3 @@
+#ifndef STUB_2
+#error
+#endif
diff --git a/tests/actions/test/tests/stub_n1.cpp b/tests/actions/test/tests/stub_n1.cpp
new file mode 100644
index 000000000..229bfe431
--- /dev/null
+++ b/tests/actions/test/tests/stub_n1.cpp
@@ -0,0 +1,3 @@
+#ifndef STUB_N
+#error
+#endif
diff --git a/tests/actions/test/tests/stub_n2.cpp b/tests/actions/test/tests/stub_n2.cpp
new file mode 100644
index 000000000..229bfe431
--- /dev/null
+++ b/tests/actions/test/tests/stub_n2.cpp
@@ -0,0 +1,3 @@
+#ifndef STUB_N
+#error
+#endif
diff --git a/tests/actions/test/xmake.lua b/tests/actions/test/xmake.lua
index 328e817dd..83718245f 100644
--- a/tests/actions/test/xmake.lua
+++ b/tests/actions/test/xmake.lua
@@ -24,3 +24,21 @@ target("test_11")
set_default(false)
add_files("src/compile.cpp")
add_tests("compile_pass", {build_should_pass = true})
+
+target("test_13")
+ set_kind("binary")
+ set_default(false)
+ add_files("src/test_1.cpp")
+ add_tests("stub_1", {files = "tests/stub_1.cpp", defines = "STUB_1"})
+
+target("test_14")
+ set_kind("binary")
+ set_default(false)
+ add_files("src/test_2.cpp")
+ add_tests("stub_2", {files = "tests/stub_2.cpp", defines = "STUB_2"})
+
+target("test_15")
+ set_kind("binary")
+ set_default(false)
+ add_files("src/test_1.cpp")
+ add_tests("stub_n", {files = "tests/stub_n*.cpp", defines = "STUB_N"})