diff --git a/CMakeLists.txt b/CMakeLists.txt index 3964bc3..943cf43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,12 +22,12 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) foreach (module ${b_modules}) add_subdirectory(${module}) - if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${module}-test) + if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/${module}) message(STATUS "Building unit tests for module ${module}") - if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${module}-test/${module}-units.c) + if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/${module}/${module}-units.c) add_executable(blue-${module}-units - ${module}-test/${module}-units.c + test/${module}/${module}-units.c misc/AllTests.c misc/CuTest.c misc/CuTest.h) @@ -37,8 +37,8 @@ foreach (module ${b_modules}) endif () - file(GLOB test_sources ${module}-test/*.c) - list(REMOVE_ITEM test_sources "${CMAKE_CURRENT_SOURCE_DIR}/${module}-test/${module}-units.c") + file(GLOB test_sources test/${module}/*.c) + list(REMOVE_ITEM test_sources "${CMAKE_CURRENT_SOURCE_DIR}/test/${module}/${module}-units.c") foreach (test_file ${test_sources}) get_filename_component(test_name ${test_file} NAME_WE) diff --git a/cmd-test/example.c b/test/cmd/example.c similarity index 100% rename from cmd-test/example.c rename to test/cmd/example.c diff --git a/compress-test/mix-compress.c b/test/compress/mix-compress.c similarity index 100% rename from compress-test/mix-compress.c rename to test/compress/mix-compress.c diff --git a/compress-test/mix-decompress.c b/test/compress/mix-decompress.c similarity index 100% rename from compress-test/mix-decompress.c rename to test/compress/mix-decompress.c diff --git a/compress-test/simple1.c b/test/compress/simple1.c similarity index 100% rename from compress-test/simple1.c rename to test/compress/simple1.c diff --git a/compress-test/stream.c b/test/compress/stream.c similarity index 100% rename from compress-test/stream.c rename to test/compress/stream.c diff --git a/core-test/core-units.c b/test/core/core-units.c similarity index 100% rename from core-test/core-units.c rename to test/core/core-units.c diff --git a/core-test/errors.c b/test/core/errors.c similarity index 100% rename from core-test/errors.c rename to test/core/errors.c diff --git a/core-test/hash.c b/test/core/hash.c similarity index 100% rename from core-test/hash.c rename to test/core/hash.c diff --git a/core-test/randomise.c b/test/core/randomise.c similarity index 100% rename from core-test/randomise.c rename to test/core/randomise.c diff --git a/core-test/ringbuffers.c b/test/core/ringbuffers.c similarity index 100% rename from core-test/ringbuffers.c rename to test/core/ringbuffers.c diff --git a/core-test/ropes.c b/test/core/ropes.c similarity index 100% rename from core-test/ropes.c rename to test/core/ropes.c diff --git a/core-test/streams.c b/test/core/streams.c similarity index 100% rename from core-test/streams.c rename to test/core/streams.c diff --git a/ds-test/arrays.c b/test/ds/arrays.c similarity index 100% rename from ds-test/arrays.c rename to test/ds/arrays.c diff --git a/ds-test/ds-units.c b/test/ds/ds-units.c similarity index 100% rename from ds-test/ds-units.c rename to test/ds/ds-units.c diff --git a/ds-test/numbers.c b/test/ds/numbers.c similarity index 100% rename from ds-test/numbers.c rename to test/ds/numbers.c diff --git a/ds-test/simple.c b/test/ds/simple.c similarity index 100% rename from ds-test/simple.c rename to test/ds/simple.c diff --git a/ds-test/streams.c b/test/ds/streams.c similarity index 100% rename from ds-test/streams.c rename to test/ds/streams.c diff --git a/ds-test/strings.c b/test/ds/strings.c similarity index 100% rename from ds-test/strings.c rename to test/ds/strings.c diff --git a/ds-test/trees.c b/test/ds/trees.c similarity index 100% rename from ds-test/trees.c rename to test/ds/trees.c diff --git a/ds-test/unicode-strings.c b/test/ds/unicode-strings.c similarity index 100% rename from ds-test/unicode-strings.c rename to test/ds/unicode-strings.c diff --git a/ds-test/uuids.c b/test/ds/uuids.c similarity index 100% rename from ds-test/uuids.c rename to test/ds/uuids.c diff --git a/io-test/io-units.c b/test/io/io-units.c similarity index 100% rename from io-test/io-units.c rename to test/io/io-units.c diff --git a/io-test/mkdir.c b/test/io/mkdir.c similarity index 100% rename from io-test/mkdir.c rename to test/io/mkdir.c diff --git a/io-test/rmdir.c b/test/io/rmdir.c similarity index 100% rename from io-test/rmdir.c rename to test/io/rmdir.c diff --git a/io-test/streams.c b/test/io/streams.c similarity index 100% rename from io-test/streams.c rename to test/io/streams.c diff --git a/io-test/tree.c b/test/io/tree.c similarity index 100% rename from io-test/tree.c rename to test/io/tree.c diff --git a/serial-test/streams.c b/test/serial/streams.c similarity index 100% rename from serial-test/streams.c rename to test/serial/streams.c diff --git a/serial-test/toml-decode.c b/test/serial/toml-decode.c similarity index 100% rename from serial-test/toml-decode.c rename to test/serial/toml-decode.c diff --git a/serial-test/toml-encode.c b/test/serial/toml-encode.c similarity index 100% rename from serial-test/toml-encode.c rename to test/serial/toml-encode.c diff --git a/term-test/errors.c b/test/term/errors.c similarity index 100% rename from term-test/errors.c rename to test/term/errors.c diff --git a/term-test/printing.c b/test/term/printing.c similarity index 100% rename from term-test/printing.c rename to test/term/printing.c