Use the wapp.h header in tests

This commit is contained in:
Abdelrahman Said 2025-02-24 08:52:46 +00:00
parent 9403193f09
commit 82c23eed5e
15 changed files with 15 additions and 32 deletions

View File

@ -11,7 +11,7 @@ $Kernel = (Get-ChildItem Env:OS).Value
$Machine = (Get-ChildItem Env:PROCESSOR_ARCHITECTURE).Value $Machine = (Get-ChildItem Env:PROCESSOR_ARCHITECTURE).Value
$Platform = "${Kernel}_${Machine}" $Platform = "${Kernel}_${Machine}"
$IncludeDirs = Get-ChildItem -Path src -Recurse -Directory -ErrorAction SilentlyContinue -Force | %{$("/I " + '"' + $_.FullName + '"')} $IncludeDirs = "/I src"
$SrcFiles = "src/wapp.c" $SrcFiles = "src/wapp.c"
$TestIncludeDirs = Get-ChildItem -Path tests -Recurse -Directory -ErrorAction SilentlyContinue -Force | %{$("/I " + '"' + $_.FullName + '"')} $TestIncludeDirs = Get-ChildItem -Path tests -Recurse -Directory -ErrorAction SilentlyContinue -Force | %{$("/I " + '"' + $_.FullName + '"')}

View File

@ -61,7 +61,7 @@ case $COMPONENTS in
;; ;;
esac esac
TEST_INCLUDE="$(find src -type d | xargs -I{} echo -n "-I{} ") $(find tests -type d | xargs -I{} echo -n "-I{} ")" TEST_INCLUDE="-Isrc $(find tests -type d | xargs -I{} echo -n "-I{} ")"
TEST_SRC="$(find tests -type f -name "*.c" | xargs -I{} echo -n "{} ")" TEST_SRC="$(find tests -type f -name "*.c" | xargs -I{} echo -n "{} ")"
BUILD_DIR="libwapp-build/$PLATFORM-$BUILD_TYPE" BUILD_DIR="libwapp-build/$PLATFORM-$BUILD_TYPE"

View File

@ -1,7 +1,5 @@
#include "test_allocator.h" #include "test_allocator.h"
#include "mem_allocator.h" #include "wapp.h"
#include "mem_arena_allocator.h"
#include "tester.h"
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,7 +1,7 @@
#ifndef TEST_ALLOCATOR_H #ifndef TEST_ALLOCATOR_H
#define TEST_ALLOCATOR_H #define TEST_ALLOCATOR_H
#include "tester.h" #include "wapp.h"
#ifdef __cplusplus #ifdef __cplusplus
BEGIN_C_LINKAGE BEGIN_C_LINKAGE

View File

@ -1,8 +1,5 @@
#include "test_arena.h" #include "test_arena.h"
#include "aliases.h" #include "wapp.h"
#include "mem_arena.h"
#include "misc_utils.h"
#include "tester.h"
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,7 +1,7 @@
#ifndef TEST_ARENA_H #ifndef TEST_ARENA_H
#define TEST_ARENA_H #define TEST_ARENA_H
#include "tester.h" #include "wapp.h"
#ifdef __cplusplus #ifdef __cplusplus
BEGIN_C_LINKAGE BEGIN_C_LINKAGE

View File

@ -1,10 +1,5 @@
#include "test_cpath.h" #include "test_cpath.h"
#include "cpath.h" #include "wapp.h"
#include "mem_allocator.h"
#include "mem_arena_allocator.h"
#include "misc_utils.h"
#include "str8.h"
#include "tester.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,7 +1,7 @@
#ifndef TEST_CPATH_H #ifndef TEST_CPATH_H
#define TEST_CPATH_H #define TEST_CPATH_H
#include "tester.h" #include "wapp.h"
#ifdef __cplusplus #ifdef __cplusplus
BEGIN_C_LINKAGE BEGIN_C_LINKAGE

View File

@ -1,7 +1,5 @@
#include "test_shell_commander.h" #include "test_shell_commander.h"
#include "commander.h" #include "wapp.h"
#include "str8.h"
#include "tester.h"
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,7 +1,7 @@
#ifndef TEST_SHELL_COMMANDER_H #ifndef TEST_SHELL_COMMANDER_H
#define TEST_SHELL_COMMANDER_H #define TEST_SHELL_COMMANDER_H
#include "tester.h" #include "wapp.h"
#ifdef __cplusplus #ifdef __cplusplus
BEGIN_C_LINKAGE BEGIN_C_LINKAGE

View File

@ -1,9 +1,5 @@
#include "test_str8.h" #include "test_str8.h"
#include "mem_allocator.h" #include "wapp.h"
#include "mem_arena_allocator.h"
#include "misc_utils.h"
#include "str8.h"
#include "tester.h"
#include <stdbool.h> #include <stdbool.h>
#define ARRLEN(ARR) (sizeof(ARR) / sizeof(ARR[0])) #define ARRLEN(ARR) (sizeof(ARR) / sizeof(ARR[0]))

View File

@ -1,7 +1,7 @@
#ifndef TEST_STR8_H #ifndef TEST_STR8_H
#define TEST_STR8_H #define TEST_STR8_H
#include "tester.h" #include "wapp.h"
#ifdef __cplusplus #ifdef __cplusplus
BEGIN_C_LINKAGE BEGIN_C_LINKAGE

View File

@ -1,6 +1,5 @@
#include "test_str8_list.h" #include "test_str8_list.h"
#include "str8.h" #include "wapp.h"
#include "tester.h"
TestFuncResult test_str8_list_get(void) { TestFuncResult test_str8_list_get(void) {
bool result; bool result;

View File

@ -1,7 +1,7 @@
#ifndef TEST_STR8_LIST_H #ifndef TEST_STR8_LIST_H
#define TEST_STR8_LIST_H #define TEST_STR8_LIST_H
#include "tester.h" #include "wapp.h"
#ifdef __cplusplus #ifdef __cplusplus
BEGIN_C_LINKAGE BEGIN_C_LINKAGE

View File

@ -4,7 +4,7 @@
#include "test_arena.h" #include "test_arena.h"
#include "test_cpath.h" #include "test_cpath.h"
#include "test_shell_commander.h" #include "test_shell_commander.h"
#include "tester.h" #include "wapp.h"
#include <stdlib.h> #include <stdlib.h>
int main(void) { int main(void) {