diff --git a/.gitignore b/.gitignore index 6b4455f..ab3dff6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /.cache/ /*.o /libft.a +/build/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3df2e18 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 3.14) +project(libft) + +# GoogleTest requires at least C++14 +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +include(FetchContent) +FetchContent_Declare( + googletest + URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip +) +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +FetchContent_MakeAvailable(googletest) + +enable_testing() + +# Flags +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") + +file(GLOB SRC_FILES "src/*.c") +file(GLOB BONUS_SRC_FILES "src_bonus/*.c") +file(GLOB TEST_FILES "tests/*.cpp") + +# Handle BUFFER_SIZE values +set(TEST_NAME "run_tests") +add_executable(${TEST_NAME} ${SRC_FILES} ${BONUS_SRC_FILES} ${TEST_FILES}) + +target_include_directories(${TEST_NAME} PRIVATE includes) +target_include_directories(${TEST_NAME} PRIVATE ${gtest_SOURCE_DIR}/googletest/include) + +target_link_libraries( + ${TEST_NAME} + GTest::gtest + GTest::gtest_main + pthread + bsd +) + + +# find_package(PkgConfig REQUIRED) +# pkg_check_modules(LIBBSD REQUIRED libbsd) + +# # Link the library to your target +# target_link_libraries(${TEST_NAME} ${LIBBSD_LIBRARIES}) + +# Register the test with CTest +include(GoogleTest) +gtest_discover_tests(${TEST_NAME}) diff --git a/Makefile b/Makefile index af74277..93a76ec 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ CFLAGS := -Wall -Wextra -Werror CFLAGS += -Iincludes CXXFLAGS := -Wall -Wextra CXXFLAGS += -Iincludes -LDFLAGS := -Lgtest -lgtest -lgtest_main -pthread +LDFLAGS := -lgtest -lgtest_main -pthread BSD := -lbsd # Test Flags diff --git a/compile_commands.json b/compile_commands.json index c0e2888..57ef195 100644 --- a/compile_commands.json +++ b/compile_commands.json @@ -1,595 +1,347 @@ [ - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_atoi.o", - "src/ft_atoi.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_atoi.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_atoi.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_bzero.o", - "src/ft_bzero.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_bzero.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_bzero.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_calloc.o", - "src/ft_calloc.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_calloc.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_calloc.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_get_empty_string.o", - "src/ft_get_empty_string.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_get_empty_string.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_get_empty_string.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_isalnum.o", - "src/ft_isalnum.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_isalnum.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_isalnum.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_isalpha.o", - "src/ft_isalpha.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_isalpha.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_isalpha.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_isascii.o", - "src/ft_isascii.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_isascii.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_isascii.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_isdigit.o", - "src/ft_isdigit.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_isdigit.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_isdigit.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_isprint.o", - "src/ft_isprint.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_isprint.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_isprint.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_memchr.o", - "src/ft_memchr.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_memchr.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_memchr.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_memcmp.o", - "src/ft_memcmp.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_memcmp.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_memcmp.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_memcpy.o", - "src/ft_memcpy.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_memcpy.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_memcpy.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_memmove.o", - "src/ft_memmove.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_memmove.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_memmove.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_memset.o", - "src/ft_memset.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_memset.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_memset.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_putchar_fd.o", - "src/ft_putchar_fd.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_putchar_fd.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_putchar_fd.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_putendl_fd.o", - "src/ft_putendl_fd.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_putendl_fd.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_putendl_fd.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_putnbr_fd.o", - "src/ft_putnbr_fd.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_putnbr_fd.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_putnbr_fd.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_putstr_fd.o", - "src/ft_putstr_fd.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_putstr_fd.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_putstr_fd.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_split.o", - "src/ft_split.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_split.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_split.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_strchr.o", - "src/ft_strchr.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_strchr.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_strchr.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_strdup.o", - "src/ft_strdup.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_strdup.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_strdup.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_strjoin.o", - "src/ft_strjoin.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_strjoin.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_strjoin.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_strlcat.o", - "src/ft_strlcat.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_strlcat.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_strlcat.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_strlcpy.o", - "src/ft_strlcpy.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_strlcpy.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_strlcpy.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_strlen.o", - "src/ft_strlen.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_strlen.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_strlen.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_strncmp.o", - "src/ft_strncmp.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_strncmp.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_strncmp.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_strnstr.o", - "src/ft_strnstr.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_strnstr.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_strnstr.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_strrchr.o", - "src/ft_strrchr.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_strrchr.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_strrchr.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_strtrim.o", - "src/ft_strtrim.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_strtrim.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_strtrim.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_substr.o", - "src/ft_substr.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_substr.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_substr.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_tolower.o", - "src/ft_tolower.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_tolower.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_tolower.o" - }, - { - "arguments": [ - "/usr/bin/cc", - "-Wall", - "-Wextra", - "-Werror", - "-Iincludes", - "-c", - "-I", - "includes", - "-o", - "obj/ft_toupper.o", - "src/ft_toupper.c" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/src/ft_toupper.c", - "output": "/home/kfreyer/workspace/libft/obj/ft_toupper.o" - }, - { - "arguments": [ - "/usr/bin/g++", - "-Wall", - "-Wextra", - "-std=c++14", - "-c", - "-I", - "includes", - "-o", - "obj/test_ft_atoi.o", - "tests/test_ft_atoi.cpp" - ], - "directory": "/home/kfreyer/workspace/libft", - "file": "/home/kfreyer/workspace/libft/tests/test_ft_atoi.cpp", - "output": "/home/kfreyer/workspace/libft/obj/test_ft_atoi.o" - } -] +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_atoi.c.o -c /home/kfreyer/workspace/libft/src/ft_atoi.c", + "file": "/home/kfreyer/workspace/libft/src/ft_atoi.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_bzero.c.o -c /home/kfreyer/workspace/libft/src/ft_bzero.c", + "file": "/home/kfreyer/workspace/libft/src/ft_bzero.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_calloc.c.o -c /home/kfreyer/workspace/libft/src/ft_calloc.c", + "file": "/home/kfreyer/workspace/libft/src/ft_calloc.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_isalnum.c.o -c /home/kfreyer/workspace/libft/src/ft_isalnum.c", + "file": "/home/kfreyer/workspace/libft/src/ft_isalnum.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_isalpha.c.o -c /home/kfreyer/workspace/libft/src/ft_isalpha.c", + "file": "/home/kfreyer/workspace/libft/src/ft_isalpha.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_isascii.c.o -c /home/kfreyer/workspace/libft/src/ft_isascii.c", + "file": "/home/kfreyer/workspace/libft/src/ft_isascii.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_isdigit.c.o -c /home/kfreyer/workspace/libft/src/ft_isdigit.c", + "file": "/home/kfreyer/workspace/libft/src/ft_isdigit.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_isprint.c.o -c /home/kfreyer/workspace/libft/src/ft_isprint.c", + "file": "/home/kfreyer/workspace/libft/src/ft_isprint.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_itoa.c.o -c /home/kfreyer/workspace/libft/src/ft_itoa.c", + "file": "/home/kfreyer/workspace/libft/src/ft_itoa.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_memchr.c.o -c /home/kfreyer/workspace/libft/src/ft_memchr.c", + "file": "/home/kfreyer/workspace/libft/src/ft_memchr.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_memcmp.c.o -c /home/kfreyer/workspace/libft/src/ft_memcmp.c", + "file": "/home/kfreyer/workspace/libft/src/ft_memcmp.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_memcpy.c.o -c /home/kfreyer/workspace/libft/src/ft_memcpy.c", + "file": "/home/kfreyer/workspace/libft/src/ft_memcpy.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_memmove.c.o -c /home/kfreyer/workspace/libft/src/ft_memmove.c", + "file": "/home/kfreyer/workspace/libft/src/ft_memmove.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_memset.c.o -c /home/kfreyer/workspace/libft/src/ft_memset.c", + "file": "/home/kfreyer/workspace/libft/src/ft_memset.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_putchar_fd.c.o -c /home/kfreyer/workspace/libft/src/ft_putchar_fd.c", + "file": "/home/kfreyer/workspace/libft/src/ft_putchar_fd.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_putendl_fd.c.o -c /home/kfreyer/workspace/libft/src/ft_putendl_fd.c", + "file": "/home/kfreyer/workspace/libft/src/ft_putendl_fd.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_putnbr_fd.c.o -c /home/kfreyer/workspace/libft/src/ft_putnbr_fd.c", + "file": "/home/kfreyer/workspace/libft/src/ft_putnbr_fd.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_putstr_fd.c.o -c /home/kfreyer/workspace/libft/src/ft_putstr_fd.c", + "file": "/home/kfreyer/workspace/libft/src/ft_putstr_fd.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_split.c.o -c /home/kfreyer/workspace/libft/src/ft_split.c", + "file": "/home/kfreyer/workspace/libft/src/ft_split.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strchr.c.o -c /home/kfreyer/workspace/libft/src/ft_strchr.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strchr.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strdup.c.o -c /home/kfreyer/workspace/libft/src/ft_strdup.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strdup.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_striteri.c.o -c /home/kfreyer/workspace/libft/src/ft_striteri.c", + "file": "/home/kfreyer/workspace/libft/src/ft_striteri.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strjoin.c.o -c /home/kfreyer/workspace/libft/src/ft_strjoin.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strjoin.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strlcat.c.o -c /home/kfreyer/workspace/libft/src/ft_strlcat.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strlcat.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strlcpy.c.o -c /home/kfreyer/workspace/libft/src/ft_strlcpy.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strlcpy.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strlen.c.o -c /home/kfreyer/workspace/libft/src/ft_strlen.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strlen.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strmapi.c.o -c /home/kfreyer/workspace/libft/src/ft_strmapi.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strmapi.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strncmp.c.o -c /home/kfreyer/workspace/libft/src/ft_strncmp.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strncmp.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strnstr.c.o -c /home/kfreyer/workspace/libft/src/ft_strnstr.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strnstr.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strrchr.c.o -c /home/kfreyer/workspace/libft/src/ft_strrchr.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strrchr.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_strtrim.c.o -c /home/kfreyer/workspace/libft/src/ft_strtrim.c", + "file": "/home/kfreyer/workspace/libft/src/ft_strtrim.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_substr.c.o -c /home/kfreyer/workspace/libft/src/ft_substr.c", + "file": "/home/kfreyer/workspace/libft/src/ft_substr.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_tolower.c.o -c /home/kfreyer/workspace/libft/src/ft_tolower.c", + "file": "/home/kfreyer/workspace/libft/src/ft_tolower.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src/ft_toupper.c.o -c /home/kfreyer/workspace/libft/src/ft_toupper.c", + "file": "/home/kfreyer/workspace/libft/src/ft_toupper.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src_bonus/ft_lstadd_back.c.o -c /home/kfreyer/workspace/libft/src_bonus/ft_lstadd_back.c", + "file": "/home/kfreyer/workspace/libft/src_bonus/ft_lstadd_back.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src_bonus/ft_lstadd_front.c.o -c /home/kfreyer/workspace/libft/src_bonus/ft_lstadd_front.c", + "file": "/home/kfreyer/workspace/libft/src_bonus/ft_lstadd_front.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src_bonus/ft_lstclear.c.o -c /home/kfreyer/workspace/libft/src_bonus/ft_lstclear.c", + "file": "/home/kfreyer/workspace/libft/src_bonus/ft_lstclear.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src_bonus/ft_lstdelone.c.o -c /home/kfreyer/workspace/libft/src_bonus/ft_lstdelone.c", + "file": "/home/kfreyer/workspace/libft/src_bonus/ft_lstdelone.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src_bonus/ft_lstiter.c.o -c /home/kfreyer/workspace/libft/src_bonus/ft_lstiter.c", + "file": "/home/kfreyer/workspace/libft/src_bonus/ft_lstiter.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src_bonus/ft_lstlast.c.o -c /home/kfreyer/workspace/libft/src_bonus/ft_lstlast.c", + "file": "/home/kfreyer/workspace/libft/src_bonus/ft_lstlast.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src_bonus/ft_lstmap.c.o -c /home/kfreyer/workspace/libft/src_bonus/ft_lstmap.c", + "file": "/home/kfreyer/workspace/libft/src_bonus/ft_lstmap.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src_bonus/ft_lstnew.c.o -c /home/kfreyer/workspace/libft/src_bonus/ft_lstnew.c", + "file": "/home/kfreyer/workspace/libft/src_bonus/ft_lstnew.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/cc -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -o CMakeFiles/run_tests.dir/src_bonus/ft_lstsize.c.o -c /home/kfreyer/workspace/libft/src_bonus/ft_lstsize.c", + "file": "/home/kfreyer/workspace/libft/src_bonus/ft_lstsize.c" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/main.cpp.o -c /home/kfreyer/workspace/libft/tests/main.cpp", + "file": "/home/kfreyer/workspace/libft/tests/main.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_atoi.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_atoi.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_atoi.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_bzero.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_bzero.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_bzero.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_calloc.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_calloc.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_calloc.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_itoa.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_itoa.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_itoa.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_lstadd_back.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_lstadd_back.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_lstadd_back.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_lstaddfront.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_lstaddfront.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_lstaddfront.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_lstlast.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_lstlast.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_lstlast.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_lstnew.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_lstnew.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_lstnew.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_lstsize.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_lstsize.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_lstsize.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_memcpy.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_memcpy.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_memcpy.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_memmove.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_memmove.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_memmove.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_putnbr_fd.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_putnbr_fd.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_putnbr_fd.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_striteri.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_striteri.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_striteri.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_strlcat.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_strlcat.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_strlcat.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_strlcpy.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_strlcpy.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_strlcpy.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_strmapi.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_strmapi.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_strmapi.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_strncmp.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_strncmp.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_strncmp.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_strnstr.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_strnstr.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_strnstr.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_strrchr.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_strrchr.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_strrchr.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_strtrim.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_strtrim.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_strtrim.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/includes -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -fsanitize=address -std=gnu++14 -o CMakeFiles/run_tests.dir/tests/test_ft_substr.cpp.o -c /home/kfreyer/workspace/libft/tests/test_ft_substr.cpp", + "file": "/home/kfreyer/workspace/libft/tests/test_ft_substr.cpp" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build/_deps/googletest-build/googlemock", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googlemock/include -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googlemock -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -Wall -Wshadow -Wno-error=dangling-else -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=c++14 -o CMakeFiles/gmock.dir/src/gmock-all.cc.o -c /home/kfreyer/workspace/libft/build/_deps/googletest-src/googlemock/src/gmock-all.cc", + "file": "/home/kfreyer/workspace/libft/build/_deps/googletest-src/googlemock/src/gmock-all.cc" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build/_deps/googletest-build/googlemock", + "command": "/usr/bin/c++ -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googlemock/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googlemock -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -Wall -Wshadow -Wno-error=dangling-else -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=c++14 -o CMakeFiles/gmock_main.dir/src/gmock_main.cc.o -c /home/kfreyer/workspace/libft/build/_deps/googletest-src/googlemock/src/gmock_main.cc", + "file": "/home/kfreyer/workspace/libft/build/_deps/googletest-src/googlemock/src/gmock_main.cc" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build/_deps/googletest-build/googletest", + "command": "/usr/bin/c++ -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -I/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -Wall -Wshadow -Wno-error=dangling-else -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=c++14 -o CMakeFiles/gtest.dir/src/gtest-all.cc.o -c /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/src/gtest-all.cc", + "file": "/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/src/gtest-all.cc" +}, +{ + "directory": "/home/kfreyer/workspace/libft/build/_deps/googletest-build/googletest", + "command": "/usr/bin/c++ -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/include -isystem /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest -Wall -Wshadow -Wno-error=dangling-else -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=c++14 -o CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -c /home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/src/gtest_main.cc", + "file": "/home/kfreyer/workspace/libft/build/_deps/googletest-src/googletest/src/gtest_main.cc" +} +] \ No newline at end of file diff --git a/includes/libft.h b/includes/libft.h index e668d48..14dca71 100644 --- a/includes/libft.h +++ b/includes/libft.h @@ -24,60 +24,51 @@ typedef struct s_list struct s_list *next; } t_list; -# ifdef __cplusplus -extern "C" -{ -# endif - /* mandatory */ - int ft_isalpha(int c); - int ft_isdigit(int c); - int ft_isalnum(int c); - int ft_isascii(int c); - int ft_isprint(int c); - size_t ft_strlen(char const *s); - void *ft_memset(void *s, int c, size_t n); - void ft_bzero(void *s, size_t n); - void *ft_memcpy(void *dest, void const *src, size_t n); - void *ft_memmove(void *dest, const void *src, size_t n); - size_t ft_strlcpy(char *dst, char const *src, size_t size); - size_t ft_strlcat(char *dst, char const *src, size_t size); - int ft_tolower(int c); - int ft_toupper(int c); - char *ft_strchr(char const *s, int c); - char *ft_strrchr(char const *s, int c); - int ft_strncmp(char const *s1, char const *s2, size_t n); - void *ft_memchr(void const *s, int c, size_t n); - int ft_memcmp(void const *s1, void const *s2, size_t n); - char *ft_strnstr(char const *big, char const *little, +/* mandatory */ +int ft_isalpha(int c); +int ft_isdigit(int c); +int ft_isalnum(int c); +int ft_isascii(int c); +int ft_isprint(int c); +size_t ft_strlen(char const *s); +void *ft_memset(void *s, int c, size_t n); +void ft_bzero(void *s, size_t n); +void *ft_memcpy(void *dest, void const *src, size_t n); +void *ft_memmove(void *dest, const void *src, size_t n); +size_t ft_strlcpy(char *dst, char const *src, size_t size); +size_t ft_strlcat(char *dst, char const *src, size_t size); +int ft_tolower(int c); +int ft_toupper(int c); +char *ft_strchr(char const *s, int c); +char *ft_strrchr(char const *s, int c); +int ft_strncmp(char const *s1, char const *s2, size_t n); +void *ft_memchr(void const *s, int c, size_t n); +int ft_memcmp(void const *s1, void const *s2, size_t n); +char *ft_strnstr(char const *big, char const *little, size_t len); - int ft_atoi(char const *nptr); - char *ft_strdup(char const *s); - void *ft_calloc(size_t nmemb, size_t size); - char *ft_substr(char const *s, unsigned int start, size_t len); - char *ft_strjoin(char const *s1, char const *s2); - char *ft_strtrim(char const *s1, char const *set); - char **ft_split(char const *str, char c); - char *ft_itoa(int n); - char *ft_strmapi(char const *s, char (*f)(unsigned int, char)); - void ft_striteri(char *s, void (*f)(unsigned int, char *)); - void ft_putchar_fd(char c, int fd); - void ft_putstr_fd(char *s, int fd); - void ft_putendl_fd(char *s, int fd); - void ft_putnbr_fd(int nb, int fd); - - t_list *ft_lstnew(void *content); - void ft_lstadd_front(t_list **lst, t_list *new_node); - int ft_lstsize(t_list *lst); - t_list *ft_lstlast(t_list *lst); - void ft_lstadd_back(t_list **lst, t_list *new_node); - void ft_lstdelone(t_list *lst, void (*del)(void *)); - void ft_lstclear(t_list **lst, void (*del)(void *)); - void ft_lstiter(t_list *lst, void (*f)(void *)); - t_list *ft_lstmap(t_list *lst, void *(*f)(void *), - void (*del)(void *)); - -# ifdef __cplusplus -} -# endif +int ft_atoi(char const *nptr); +char *ft_strdup(char const *s); +void *ft_calloc(size_t nmemb, size_t size); +char *ft_substr(char const *s, unsigned int start, size_t len); +char *ft_strjoin(char const *s1, char const *s2); +char *ft_strtrim(char const *s1, char const *set); +char **ft_split(char const *str, char c); +char *ft_itoa(int n); +char *ft_strmapi(char const *s, char (*f)(unsigned int, char)); +void ft_striteri(char *s, void (*f)(unsigned int, char *)); +void ft_putchar_fd(char c, int fd); +void ft_putstr_fd(char *s, int fd); +void ft_putendl_fd(char *s, int fd); +void ft_putnbr_fd(int nb, int fd); +t_list *ft_lstnew(void *content); +void ft_lstadd_front(t_list **lst, t_list *new_node); +int ft_lstsize(t_list *lst); +t_list *ft_lstlast(t_list *lst); +void ft_lstadd_back(t_list **lst, t_list *new_node); +void ft_lstdelone(t_list *lst, void (*del)(void *)); +void ft_lstclear(t_list **lst, void (*del)(void *)); +void ft_lstiter(t_list *lst, void (*f)(void *)); +t_list *ft_lstmap(t_list *lst, void *(*f)(void *), + void (*del)(void *)); #endif // LIBFT_H diff --git a/includes/test_libft.hpp b/includes/test_libft.hpp new file mode 100644 index 0000000..50c1db3 --- /dev/null +++ b/includes/test_libft.hpp @@ -0,0 +1,13 @@ +#ifndef TEST_LIBFT_H +#define TEST_LIBFT_H + +extern "C" { + #include "libft.h" +} + +#include +#include +#include +#include + +#endif // TEST_LIBFT_H diff --git a/tests/main.cpp b/tests/main.cpp index 76f841f..521fc4a 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -1,4 +1,4 @@ -#include +#include "test_libft.hpp" int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/tests/test_ft_atoi.cpp b/tests/test_ft_atoi.cpp index 1a9d367..da89cfa 100644 --- a/tests/test_ft_atoi.cpp +++ b/tests/test_ft_atoi.cpp @@ -1,5 +1,4 @@ -#include "libft.h" -#include +#include "test_libft.hpp" TEST(FtAtoiTest, ErrorInputs) { EXPECT_EQ(ft_atoi("-"), atoi("-")); diff --git a/tests/test_ft_bzero.cpp b/tests/test_ft_bzero.cpp index bb464d1..e73160a 100644 --- a/tests/test_ft_bzero.cpp +++ b/tests/test_ft_bzero.cpp @@ -1,6 +1,4 @@ -#include -#include -#include "libft.h" +#include "test_libft.hpp" struct FtBzeroTestParam { size_t size; diff --git a/tests/test_ft_calloc.cpp b/tests/test_ft_calloc.cpp index e6b07bc..074c2ef 100644 --- a/tests/test_ft_calloc.cpp +++ b/tests/test_ft_calloc.cpp @@ -1,5 +1,4 @@ -#include -#include "libft.h" +#include "test_libft.hpp" TEST(FtCallocTest, ZeroInitialisation) { size_t nmemb = 10; diff --git a/tests/test_ft_itoa.cpp b/tests/test_ft_itoa.cpp index 6071b24..5cc9233 100644 --- a/tests/test_ft_itoa.cpp +++ b/tests/test_ft_itoa.cpp @@ -1,5 +1,4 @@ -#include -#include "libft.h" +#include "test_libft.hpp" struct FtItoaTestParam { int n; diff --git a/tests/test_ft_lstadd_back.cpp b/tests/test_ft_lstadd_back.cpp index 25ff171..a71aa1a 100644 --- a/tests/test_ft_lstadd_back.cpp +++ b/tests/test_ft_lstadd_back.cpp @@ -1,65 +1,62 @@ -#include "libft.h" -#include -#include - - -t_list *create_list_2(int length) { - if (length <= 0) { - return NULL; - } - t_list *lst = new t_list{.content = (void*)1, .next = nullptr}; - t_list *head = lst; - while (length > 1) { - head->next = new t_list{.content = (void*)1, .next = nullptr}; - head = head->next; - length--; - } - - const char* last = "last"; - head->content = (void*)last; - return lst; -} - -void clear_list_2(t_list *lst) { - while (lst) { - t_list *tmp = lst; - lst = lst->next; - delete tmp; - } -} - -struct FtLstaddBackParams { - t_list* lst; - t_list* new_node; -}; - - -class FtLstaddBackTest : public testing::TestWithParam {}; - - -TEST_P(FtLstaddBackTest, HandleVariousInputs) { - FtLstaddBackParams params = GetParam(); - t_list *lst = params.lst; - t_list *new_node = params.new_node; - ft_lstadd_back(&lst, new_node); - - t_list *head = lst; - while (head->next) { - head = head->next; - } - EXPECT_STREQ((char*)(head->content), "new"); - clear_list_2(lst); -} - -INSTANTIATE_TEST_SUITE_P( - FtLstaddBackTests, - FtLstaddBackTest, - ::testing::Values( - // FtLstlastParams{create_list_last_element_eq_length(0)}, - // FtLstlastParams{create_list_last_element_eq_length(1)}, - // FtLstlastParams{create_list_last_element_eq_length(5)}, - FtLstaddBackParams{create_list_2(0), new t_list{.content = (void *)"new", .next=nullptr}}, - FtLstaddBackParams{create_list_2(1), new t_list{.content = (void *)"new", .next=nullptr}}, - FtLstaddBackParams{create_list_2(3), new t_list{.content = (void *)"new", .next=nullptr}} - ) - ); +// #include "test_libft.hpp" + +// t_list *create_list_2(int length) { +// if (length <= 0) { +// return NULL; +// } +// t_list *lst = new t_list{.content = (void*)1, .next = nullptr}; +// t_list *head = lst; +// while (length > 1) { +// head->next = new t_list{.content = (void*)1, .next = nullptr}; +// head = head->next; +// length--; +// } + +// const char* last = "last"; +// head->content = (void*)last; +// return lst; +// } + +// void clear_list_2(t_list *lst) { +// while (lst) { +// t_list *tmp = lst; +// lst = lst->next; +// delete tmp; +// } +// } + +// struct FtLstaddBackParams { +// t_list* lst; +// t_list* new_node; +// }; + + +// class FtLstaddBackTest : public testing::TestWithParam {}; + + +// TEST_P(FtLstaddBackTest, HandleVariousInputs) { +// FtLstaddBackParams params = GetParam(); +// t_list *lst = params.lst; +// t_list *new_node = params.new_node; +// ft_lstadd_back(&lst, new_node); + +// t_list *head = lst; +// while (head->next) { +// head = head->next; +// } +// EXPECT_STREQ((char*)(head->content), "new"); +// clear_list_2(lst); +// } + +// INSTANTIATE_TEST_SUITE_P( +// FtLstaddBackTests, +// FtLstaddBackTest, +// ::testing::Values( +// // FtLstlastParams{create_list_last_element_eq_length(0)}, +// // FtLstlastParams{create_list_last_element_eq_length(1)}, +// // FtLstlastParams{create_list_last_element_eq_length(5)}, +// FtLstaddBackParams{create_list_2(0), new t_list{.content = (void *)"new", .next=nullptr}}, +// FtLstaddBackParams{create_list_2(1), new t_list{.content = (void *)"new", .next=nullptr}}, +// FtLstaddBackParams{create_list_2(3), new t_list{.content = (void *)"new", .next=nullptr}} +// ) +// ); diff --git a/tests/test_ft_lstaddfront.cpp b/tests/test_ft_lstaddfront.cpp index 4f66872..2b807c8 100644 --- a/tests/test_ft_lstaddfront.cpp +++ b/tests/test_ft_lstaddfront.cpp @@ -1,40 +1,31 @@ -#include -#include -#include -#include -#include "libft.h" +// #include "test_libft.hpp" -struct FtLstaddFrontParams { - t_list **lst; - t_list *new_node; -}; +// struct FtLstaddFrontParams { +// t_list **lst; +// t_list *new_node; +// }; -class FtLstaddFrontTest : public testing::TestWithParam> { -public: - ~FtLstaddFrontTest() { - // Deallocate the t_list instances after the test - delete std::get<0>(GetParam()); - delete std::get<1>(GetParam()); - } -}; +// class FtLstaddFrontTest : public testing::TestWithParam> {}; -INSTANTIATE_TEST_SUITE_P( - FtLstaddFrontTests, FtLstaddFrontTest, - ::testing::Values( - std::make_tuple(new t_list{.content = (void *)1, .next = nullptr}, - new t_list{.content = (void *)2, .next = nullptr}), - std::make_tuple(new t_list{.content=(void*)3, .next=nullptr}, - new t_list{.content=(void*)4, .next=nullptr}) - ) - ); +// INSTANTIATE_TEST_SUITE_P( +// FtLstaddFrontTests, FtLstaddFrontTest, +// ::testing::Values( +// std::make_tuple(new t_list{.content = (void *)1, .next = nullptr}, +// new t_list{.content = (void *)2, .next = nullptr}), +// std::make_tuple(new t_list{.content=(void*)3, .next=nullptr}, +// new t_list{.content=(void*)4, .next=nullptr}) +// ) +// ); -TEST_P(FtLstaddFrontTest, FtTestLstaddFront) { - t_list* lst = std::get<0>(GetParam()); - t_list* newElem = std::get<1>(GetParam()); - t_list* old_lst = lst; +// TEST_P(FtLstaddFrontTest, FtTestLstaddFront) { +// t_list* lst = std::get<0>(GetParam()); +// t_list* newElem = std::get<1>(GetParam()); +// t_list* old_lst = lst; - ft_lstadd_front(&lst, newElem); +// ft_lstadd_front(&lst, newElem); - EXPECT_EQ(lst, newElem); - EXPECT_EQ(newElem->next, old_lst); -} +// EXPECT_EQ(lst, newElem); +// EXPECT_EQ(newElem->next, old_lst); + +// // ft_lstclear(&lst, free); +// } diff --git a/tests/test_ft_lstlast.cpp b/tests/test_ft_lstlast.cpp index bbacbd8..47c1986 100644 --- a/tests/test_ft_lstlast.cpp +++ b/tests/test_ft_lstlast.cpp @@ -1,65 +1,63 @@ -#include "libft.h" -#include "gtest/gtest.h" -#include - - -t_list *create_list_last_element_eq_length(int length) { - if (length <= 0) { - return NULL; - } - t_list *lst = new t_list{.content = (void*)1, .next = nullptr}; - t_list *head = lst; - while (length > 1) { - head->next = new t_list{.content = (void*)1, .next = nullptr}; - head = head->next; - length--; - } - - const char* last = "last"; - head->content = (void*)last; - return lst; -} - -void clear_list_3(t_list *lst) { - while (lst) { - t_list *tmp = lst; - lst = lst->next; - delete tmp; - } -} - -struct FtLstlastParams { - t_list* lst; -}; - - -class FtLstlastTest : public testing::TestWithParam { -public: - ~FtLstlastTest() { - FtLstlastParams params = GetParam(); - clear_list_3(params.lst); - } -}; - - -TEST_P(FtLstlastTest, HandleVariousInputs) { - FtLstlastParams params = GetParam(); - t_list *lst = params.lst; - t_list *got = ft_lstlast(lst); - if (lst) { - EXPECT_STREQ((char*)(got->content), "last"); - } else { - EXPECT_EQ(got, nullptr); - } -} - -INSTANTIATE_TEST_SUITE_P( - FtLstlastTests, - FtLstlastTest, - ::testing::Values( - FtLstlastParams{create_list_last_element_eq_length(0)}, - FtLstlastParams{create_list_last_element_eq_length(1)}, - FtLstlastParams{create_list_last_element_eq_length(5)}, - FtLstlastParams{create_list_last_element_eq_length(3)} - ) - ); +// #include "test_libft.hpp" + + +// t_list *create_list_last_element_eq_length(int length) { +// if (length <= 0) { +// return NULL; +// } +// t_list *lst = new t_list{.content = (void*)1, .next = nullptr}; +// t_list *head = lst; +// while (length > 1) { +// head->next = new t_list{.content = (void*)1, .next = nullptr}; +// head = head->next; +// length--; +// } + +// const char* last = "last"; +// head->content = (void*)last; +// return lst; +// } + +// void clear_list_3(t_list *lst) { +// while (lst) { +// t_list *tmp = lst; +// lst = lst->next; +// delete tmp; +// } +// } + +// struct FtLstlastParams { +// t_list* lst; +// }; + + +// class FtLstlastTest : public testing::TestWithParam { +// public: +// ~FtLstlastTest() { +// FtLstlastParams params = GetParam(); +// clear_list_3(params.lst); +// } +// }; + + +// TEST_P(FtLstlastTest, HandleVariousInputs) { +// FtLstlastParams params = GetParam(); +// t_list *lst = params.lst; +// t_list *got = ft_lstlast(lst); +// if (lst) { +// EXPECT_STREQ((char*)(got->content), "last"); +// } else { +// EXPECT_EQ(got, nullptr); +// } +// } + +// INSTANTIATE_TEST_SUITE_P( +// FtLstlastTests, +// FtLstlastTest, +// ::testing::Values( +// FtLstlastParams{create_list_last_element_eq_length(0)}, +// FtLstlastParams{create_list_last_element_eq_length(1)}, +// FtLstlastParams{create_list_last_element_eq_length(5)}, +// FtLstlastParams{create_list_last_element_eq_length(3)} +// ) +// ); diff --git a/tests/test_ft_lstnew.cpp b/tests/test_ft_lstnew.cpp index eb3e68e..dba6f88 100644 --- a/tests/test_ft_lstnew.cpp +++ b/tests/test_ft_lstnew.cpp @@ -1,24 +1,23 @@ -#include -#include "libft.h" +// #include "test_libft.hpp" -struct FtLstnewParams { - void* content; -}; +// struct FtLstnewParams { +// void* content; +// }; -class FtLstnewTest : public ::testing::TestWithParam {}; +// class FtLstnewTest : public ::testing::TestWithParam {}; -TEST_P(FtLstnewTest, HandlesVariousContents) { - FtLstnewParams params = GetParam(); +// TEST_P(FtLstnewTest, HandlesVariousContents) { +// FtLstnewParams params = GetParam(); - t_list *n = ft_lstnew(params.content); - EXPECT_EQ(n->next, (void*)0); - EXPECT_EQ(n->content, params.content); - free(n); -} +// t_list *n = ft_lstnew(params.content); +// EXPECT_EQ(n->next, (void*)0); +// EXPECT_EQ(n->content, params.content); +// free(n); +// } -INSTANTIATE_TEST_SUITE_P(FtLstnewTests, FtLstnewTest, - ::testing::Values( - FtLstnewParams{(void*)0}, - FtLstnewParams{(void*)"Hello"} - ) - ); +// INSTANTIATE_TEST_SUITE_P(FtLstnewTests, FtLstnewTest, +// ::testing::Values( +// FtLstnewParams{(void*)0}, +// FtLstnewParams{(void*)"Hello"} +// ) +// ); diff --git a/tests/test_ft_lstsize.cpp b/tests/test_ft_lstsize.cpp index 1973354..5772e87 100644 --- a/tests/test_ft_lstsize.cpp +++ b/tests/test_ft_lstsize.cpp @@ -1,59 +1,57 @@ -#include "libft.h" -#include "gtest/gtest.h" -#include - - -t_list *create_list(int length) { - if (length <= 0) { - return NULL; - } - t_list *lst = new t_list{.content = (void*)1, .next = nullptr}; - t_list *head = lst; - while (length > 1) { - head->next = new t_list{.content = (void*)1, .next = nullptr}; - head = head->next; - length--; - } - return lst; -} - -void clear_list(t_list *lst) { - while (lst) { - t_list *tmp = lst; - lst = lst->next; - delete tmp; - } -} - -struct FtLstsizeParams { - t_list* lst; - int want; -}; - - -class FtLstsizeTest : public testing::TestWithParam { -public: - ~FtLstsizeTest() { - FtLstsizeParams params = GetParam(); - clear_list(params.lst); - } -}; - - -TEST_P(FtLstsizeTest, HandleVariousInputs) { - FtLstsizeParams params = GetParam(); - t_list *lst = params.lst; - int got = ft_lstsize(lst); - EXPECT_EQ(got, params.want); -} - -INSTANTIATE_TEST_SUITE_P( - FtLstsizeTests, - FtLstsizeTest, - ::testing::Values( - FtLstsizeParams{create_list(10), 10}, - FtLstsizeParams{create_list(1), 1}, - FtLstsizeParams{create_list(0), 0}, - FtLstsizeParams{create_list(3), 3} - ) - ); +// #include "test_libft.hpp" + + +// t_list *create_list(int length) { +// if (length <= 0) { +// return NULL; +// } +// t_list *lst = new t_list{.content = (void*)1, .next = nullptr}; +// t_list *head = lst; +// while (length > 1) { +// head->next = new t_list{.content = (void*)1, .next = nullptr}; +// head = head->next; +// length--; +// } +// return lst; +// } + +// void clear_list(t_list *lst) { +// while (lst) { +// t_list *tmp = lst; +// lst = lst->next; +// delete tmp; +// } +// } + +// struct FtLstsizeParams { +// t_list* lst; +// int want; +// }; + + +// class FtLstsizeTest : public testing::TestWithParam { +// public: +// ~FtLstsizeTest() { +// FtLstsizeParams params = GetParam(); +// clear_list(params.lst); +// } +// }; + + +// TEST_P(FtLstsizeTest, HandleVariousInputs) { +// FtLstsizeParams params = GetParam(); +// t_list *lst = params.lst; +// int got = ft_lstsize(lst); +// EXPECT_EQ(got, params.want); +// } + +// INSTANTIATE_TEST_SUITE_P( +// FtLstsizeTests, +// FtLstsizeTest, +// ::testing::Values( +// FtLstsizeParams{create_list(10), 10}, +// FtLstsizeParams{create_list(1), 1}, +// FtLstsizeParams{create_list(0), 0}, +// FtLstsizeParams{create_list(3), 3} +// ) +// ); diff --git a/tests/test_ft_memcpy.cpp b/tests/test_ft_memcpy.cpp index 77f4b20..55b697a 100644 --- a/tests/test_ft_memcpy.cpp +++ b/tests/test_ft_memcpy.cpp @@ -1,6 +1,4 @@ -#include -#include -#include "libft.h" +#include "test_libft.hpp" struct FtMemcpyTestParam { const void* src; diff --git a/tests/test_ft_memmove.cpp b/tests/test_ft_memmove.cpp index 07496f6..535718c 100644 --- a/tests/test_ft_memmove.cpp +++ b/tests/test_ft_memmove.cpp @@ -1,7 +1,4 @@ -#include -#include -#include -#include "libft.h" +#include "test_libft.hpp" struct FtMemmoveTestParam { size_t offset_dest; diff --git a/tests/test_ft_putnbr_fd.cpp b/tests/test_ft_putnbr_fd.cpp index cefe875..4b28db7 100644 --- a/tests/test_ft_putnbr_fd.cpp +++ b/tests/test_ft_putnbr_fd.cpp @@ -1,9 +1,4 @@ -#include -#include -#include -#include -#include -#include "libft.h" +#include "test_libft.hpp" struct FtPutnbrfdTestParam { int nbr; diff --git a/tests/test_ft_striteri.cpp b/tests/test_ft_striteri.cpp index fd31467..05e2682 100644 --- a/tests/test_ft_striteri.cpp +++ b/tests/test_ft_striteri.cpp @@ -1,5 +1,4 @@ -#include -#include "libft.h" +#include "test_libft.hpp" struct FtStriteriTestParams { const char *s; diff --git a/tests/test_ft_strlcat.cpp b/tests/test_ft_strlcat.cpp index 5ea2610..8d796cb 100644 --- a/tests/test_ft_strlcat.cpp +++ b/tests/test_ft_strlcat.cpp @@ -1,6 +1,4 @@ -#include -#include -#include "libft.h" +#include "test_libft.hpp" struct FtStrlcatTestParam { const char* dst; diff --git a/tests/test_ft_strlcpy.cpp b/tests/test_ft_strlcpy.cpp index 8340f8b..7471ce7 100644 --- a/tests/test_ft_strlcpy.cpp +++ b/tests/test_ft_strlcpy.cpp @@ -1,6 +1,4 @@ -#include "libft.h" -#include -#include +#include "test_libft.hpp" struct FtStrlcpyTestParam { const char* src; diff --git a/tests/test_ft_strmapi.cpp b/tests/test_ft_strmapi.cpp index e021f90..4be8709 100644 --- a/tests/test_ft_strmapi.cpp +++ b/tests/test_ft_strmapi.cpp @@ -1,5 +1,4 @@ -#include -#include "libft.h" +#include "test_libft.hpp" struct FtStrmapiTestParams { const char *s; diff --git a/tests/test_ft_strncmp.cpp b/tests/test_ft_strncmp.cpp index dc2cd19..4cd3850 100644 --- a/tests/test_ft_strncmp.cpp +++ b/tests/test_ft_strncmp.cpp @@ -1,6 +1,5 @@ -#include -#include -#include +#include "test_libft.hpp" + struct FtStrncmpTestParams { const char *s1; diff --git a/tests/test_ft_strnstr.cpp b/tests/test_ft_strnstr.cpp index 6a3dec2..cd21711 100644 --- a/tests/test_ft_strnstr.cpp +++ b/tests/test_ft_strnstr.cpp @@ -1,9 +1,4 @@ -#include "gtest/gtest.h" -#include -#include -#include "libft.h" -#include - +#include "test_libft.hpp" TEST(FtStrnstrDeathTest, HandleNullInputs) { EXPECT_DEATH(strnstr(NULL, NULL, 0), ""); diff --git a/tests/test_ft_strrchr.cpp b/tests/test_ft_strrchr.cpp index 855ae4c..4178ab3 100644 --- a/tests/test_ft_strrchr.cpp +++ b/tests/test_ft_strrchr.cpp @@ -1,6 +1,4 @@ -#include -#include -#include "libft.h" +#include "test_libft.hpp" struct FtStrrchrTestParams { const char *s; diff --git a/tests/test_ft_strtrim.cpp b/tests/test_ft_strtrim.cpp index d84c07c..64c8872 100644 --- a/tests/test_ft_strtrim.cpp +++ b/tests/test_ft_strtrim.cpp @@ -1,5 +1,4 @@ -#include -#include "libft.h" +#include "test_libft.hpp" struct FtStrtrimTestParam { const char* s1; diff --git a/tests/test_ft_substr.cpp b/tests/test_ft_substr.cpp index 6781080..27d9c57 100644 --- a/tests/test_ft_substr.cpp +++ b/tests/test_ft_substr.cpp @@ -1,5 +1,4 @@ -#include -#include "libft.h" +#include "test_libft.hpp" struct FtSubstrTestParam { const char* s;