From f48bfcff10e7beeabe1cfa4a7aec7f8a5a5702a8 Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Thu, 26 Mar 2020 22:55:59 +0100 Subject: [PATCH] Move tests next to their implementations. --- CMakeLists.txt | 20 ++++++++++---------- {tests => src/ftxui/dom}/gauge_test.cpp | 0 {tests => src/ftxui/dom}/hbox_test.cpp | 0 {tests => src/ftxui/dom}/text_test.cpp | 0 {tests => src/ftxui/dom}/vbox_test.cpp | 0 5 files changed, 10 insertions(+), 10 deletions(-) rename {tests => src/ftxui/dom}/gauge_test.cpp (100%) rename {tests => src/ftxui/dom}/hbox_test.cpp (100%) rename {tests => src/ftxui/dom}/text_test.cpp (100%) rename {tests => src/ftxui/dom}/vbox_test.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ce8cd17..3dac375 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,25 +153,25 @@ export(TARGETS screen dom component NAMESPACE ftxui:: # https://stackoverflow.com/questions/24295876/cmake-cannot-find-a-googletest-required-library find_package(GTest) if (FTXUI_BUILD_TESTS AND GTEST_FOUND AND THREADS_FOUND) - add_executable(dom_tests - tests/gauge_test.cpp - tests/hbox_test.cpp - tests/text_test.cpp - tests/vbox_test.cpp + add_executable(tests + src/ftxui/dom/gauge_test.cpp + src/ftxui/dom/hbox_test.cpp + src/ftxui/dom/text_test.cpp + src/ftxui/dom/vbox_test.cpp ) - target_link_libraries(dom_tests + target_link_libraries(tests PRIVATE dom PRIVATE Threads::Threads PRIVATE ${GTEST_BOTH_LIBRARIES} ) - target_include_directories(dom_tests + target_include_directories(tests PRIVATE ${GTest_INCLUDE_DIRS} ) - set_property(TARGET dom_tests PROPERTY CXX_STANDARD 17) - gtest_discover_tests(dom_tests) - add_test(dom_tests dom_tests) + set_property(TARGET tests PROPERTY CXX_STANDARD 17) + gtest_discover_tests(tests) + add_test(tests tests) endif() if(FTXUI_BUILD_EXAMPLES) diff --git a/tests/gauge_test.cpp b/src/ftxui/dom/gauge_test.cpp similarity index 100% rename from tests/gauge_test.cpp rename to src/ftxui/dom/gauge_test.cpp diff --git a/tests/hbox_test.cpp b/src/ftxui/dom/hbox_test.cpp similarity index 100% rename from tests/hbox_test.cpp rename to src/ftxui/dom/hbox_test.cpp diff --git a/tests/text_test.cpp b/src/ftxui/dom/text_test.cpp similarity index 100% rename from tests/text_test.cpp rename to src/ftxui/dom/text_test.cpp diff --git a/tests/vbox_test.cpp b/src/ftxui/dom/vbox_test.cpp similarity index 100% rename from tests/vbox_test.cpp rename to src/ftxui/dom/vbox_test.cpp