summaryrefslogtreecommitdiff
path: root/tests/projects/other/native_module/modules/shared/foo
diff options
context:
space:
mode:
authorruki <[email protected]>2024-07-25 00:54:13 +0800
committerruki <[email protected]>2024-07-25 00:54:13 +0800
commitc7c412f6458f5aceeb02e9bfc292dc7aac0852d3 (patch)
tree90fc1076e7dd5a2971d7033bee28825a80e59477 /tests/projects/other/native_module/modules/shared/foo
parent039cd576af844dc146b7517160648765b90b81b1 (diff)
move autogen tests
Diffstat (limited to 'tests/projects/other/native_module/modules/shared/foo')
-rw-r--r--tests/projects/other/native_module/modules/shared/foo/src/foo.c26
-rw-r--r--tests/projects/other/native_module/modules/shared/foo/xmake.lua6
2 files changed, 0 insertions, 32 deletions
diff --git a/tests/projects/other/native_module/modules/shared/foo/src/foo.c b/tests/projects/other/native_module/modules/shared/foo/src/foo.c
deleted file mode 100644
index 0555b071f..000000000
--- a/tests/projects/other/native_module/modules/shared/foo/src/foo.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <xmi.h>
-
-static int add(lua_State* lua) {
- int a = lua_tointeger(lua, 1);
- int b = lua_tointeger(lua, 2);
- lua_pushinteger(lua, a + b);
- return 1;
-}
-
-static int sub(lua_State* lua) {
- int a = lua_tointeger(lua, 1);
- int b = lua_tointeger(lua, 2);
- lua_pushinteger(lua, a - b);
- return 1;
-}
-
-int luaopen(foo, lua_State* lua) {
- static const luaL_Reg funcs[] = {
- {"add", add},
- {"sub", sub},
- {NULL, NULL}
- };
- lua_newtable(lua);
- luaL_setfuncs(lua, funcs, 0);
- return 1;
-}
diff --git a/tests/projects/other/native_module/modules/shared/foo/xmake.lua b/tests/projects/other/native_module/modules/shared/foo/xmake.lua
deleted file mode 100644
index 035573d9f..000000000
--- a/tests/projects/other/native_module/modules/shared/foo/xmake.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-add_rules("mode.debug", "mode.release")
-
-target("foo")
- add_rules("module.shared")
- add_files("src/foo.c")
-