diff options
Diffstat (limited to 'test/libsystem_test')
| -rw-r--r-- | test/libsystem_test/Makefile | 22 | ||||
| -rw-r--r-- | test/libsystem_test/memory.test.cc | 2 | ||||
| -rw-r--r-- | test/libsystem_test/thread.test.cc | 2 |
3 files changed, 24 insertions, 2 deletions
diff --git a/test/libsystem_test/Makefile b/test/libsystem_test/Makefile new file mode 100644 index 00000000..0e38e134 --- /dev/null +++ b/test/libsystem_test/Makefile @@ -0,0 +1,22 @@ +################################################## +# (c) Amlal El Mahrouss and NeKernel Authors, licensed under the Apache 2.0 license. +# This file is for libSystem.dll's testing stubs. +################################################## + +GCC=x86_64-w64-mingw32-g++ -Wl,-subsystem=17 +LIB=-L../../src/libSystem -lSystem +STD=-std=c++20 -DKT_TESTING_ENABLED +INCLUDE=-I../../src -I../../public -I../../public/frameworks/ -I../../ + +OBJ_FILES = \ + thread.test.exe \ + memory.test.exe \ + io.test.exe + +.PHONY: all +all: $(OBJ_FILES) + +%.exe: %.cc + @echo "==> Building test: $@" + $(GCC) $(LIB) $< \ + $(STD) $(INCLUDE) -o $(basename $<).exe
\ No newline at end of file diff --git a/test/libsystem_test/memory.test.cc b/test/libsystem_test/memory.test.cc index 5083570c..28d758cc 100644 --- a/test/libsystem_test/memory.test.cc +++ b/test/libsystem_test/memory.test.cc @@ -110,7 +110,7 @@ KT_DECL_TEST(MmFillCRC32HeapValid, []() -> bool { }); /// \brief Run memory tests. -SInt32 KT_TEST_MAIN() { +IMPORT_C SInt32 KT_TEST_MAIN() { KT_RUN_TEST(MmCreateHeapSuccess); KT_RUN_TEST(MmCreateHeapZeroSize); KT_RUN_TEST(MmDestroyHeapValid); diff --git a/test/libsystem_test/thread.test.cc b/test/libsystem_test/thread.test.cc index ec8ccbad..db248e26 100644 --- a/test/libsystem_test/thread.test.cc +++ b/test/libsystem_test/thread.test.cc @@ -120,7 +120,7 @@ KT_DECL_TEST(ThrExitMainThreadValid, []() -> bool { }); /// \brief Run threading tests. -SInt32 KT_TEST_MAIN() { +IMPORT_C SInt32 KT_TEST_MAIN() { KT_RUN_TEST(ThrCreateThreadValid); KT_RUN_TEST(ThrCreateThreadNull); KT_RUN_TEST(ThrCreateThreadWithName); |
