Skip to content

Commit

Permalink
tests work now but still getting relocation warnin
Browse files Browse the repository at this point in the history
  • Loading branch information
Kay Freyer committed Nov 12, 2024
1 parent 4d73f58 commit 63ddf14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
11 changes: 2 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(libft)
project(libft LANGUAGES C CXX)

# GoogleTest requires at least C++14
set(CMAKE_CXX_STANDARD 14)
Expand Down Expand Up @@ -32,19 +32,12 @@ target_include_directories(${TEST_NAME} PRIVATE ${gtest_SOURCE_DIR}/googletest/i

target_link_libraries(
${TEST_NAME}
GTest::gtest
# 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})
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ $(TEST_TARGET)-FSANITIZE: $(OBJ_FILES) $(TEST_OBJ_FILES) $(OBJ_FILES_BONUS)

############ PHONY ##################
clean:
rm -f $(OBJ_FILES) $(TEST_OBJ_FILES)
rm -f $(OBJ_FILES) $(OBJ_FILES_BONUS) $(TEST_OBJ_FILES)
rm -rf build

fclean: clean
rm -f $(BIN_DIR)/*

re: fclean all

bear: $(OBJ_FILES) $(TEST_OBJ_FILES)
bear: $(OBJ_FILES) $(TEST_OBJ_FILES)

test-fsanitize: $(TEST_TARGET)-FSANITIZE
- $(TEST_TARGET)-FSANITIZE
Expand Down
2 changes: 1 addition & 1 deletion tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
// ::testing::GTEST_FLAG(filter) = "FtLstaddBackTests/FtLstaddBackTest*";
::testing::GTEST_FLAG(filter) = "FtLstaddFrontTest*";
// ::testing::GTEST_FLAG(filter) = "FtLstaddFrontTest*";

return RUN_ALL_TESTS();
}

0 comments on commit 63ddf14

Please sign in to comment.