Browse Source

Move test into public API

Kajetan Johannes Hammerle 9 months ago
parent
commit
61ca71ca37
6 changed files with 6 additions and 6 deletions
  1. 2 2
      CMakeLists.txt
  2. 0 0
      include/core/Test.h
  3. 1 1
      src/Test.c
  4. 1 1
      tasks
  5. 1 1
      test/Main.c
  6. 1 1
      test/Tests.h

+ 2 - 2
CMakeLists.txt

@@ -20,6 +20,7 @@ set(SRC
     "src/ReadLine.c"
     "src/RingBuffer.c"
     "src/SpinLock.c"
+    "src/Test.c"
     "src/Utility.c"
     "src/Vector.c"
     "src/View.c"
@@ -27,7 +28,6 @@ set(SRC
 
 set(SRC_TESTS
     "test/Main.c"
-    "test/Test.c"
     "test/modules/BitArrayTests.c"
     "test/modules/BoxTests.c"
     "test/modules/BufferTests.c"
@@ -50,7 +50,6 @@ set(SRC_TESTS
 
 set(SRC_PERFORMANCE
     "performance/Main.c"
-    "test/Test.c"
 )
 
 if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
@@ -118,6 +117,7 @@ target_sources(core PUBLIC
         ./include/core/ReadLine.h
         ./include/core/RingBuffer.h
         ./include/core/SpinLock.h
+        ./include/core/Test.h
         ./include/core/Types.h
         ./include/core/Utility.h
         ./include/core/Vector.h

+ 0 - 0
test/Test.h → include/core/Test.h


+ 1 - 1
test/Test.c → src/Test.c

@@ -1,4 +1,4 @@
-#include "Test.h"
+#include "core/Test.h"
 
 #include <stdio.h>
 #include <stdlib.h>

+ 1 - 1
tasks

@@ -126,7 +126,7 @@ buildProfile() {
     folder=$1
     shift 1
     if [ ! -e "$folder" ]; then 
-        cmake -B "$folder" -S . -G Ninja -DCMAKE_C_COMPILER=${compiler} -DCMAKE_INSTALL_PREFIX=./install $@
+        cmake -B "$folder" -S . -G Ninja -DCMAKE_C_COMPILER=${compiler} -DCMAKE_INSTALL_PREFIX=../install $@
     fi
     ninja -C "$folder"
 }

+ 1 - 1
test/Main.c

@@ -2,9 +2,9 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "Test.h"
 #include "Tests.h"
 #include "core/Logger.h"
+#include "core/Test.h"
 #include "core/Utility.h"
 
 static void onExit(int code, void* data) {

+ 1 - 1
test/Tests.h

@@ -1,7 +1,7 @@
 #ifndef CORE_TESTS_H
 #define CORE_TESTS_H
 
-#include "Test.h"
+#include "core/Test.h"
 
 [[noreturn]] void coreTestInvalidAllocate(void);
 [[noreturn]] void coreTestInvalidReallocate(void);