diff --git a/.github/workflows/linux-clang-build.yml b/.github/workflows/linux-clang-build.yml index 50d7b7492..2a913bc1d 100644 --- a/.github/workflows/linux-clang-build.yml +++ b/.github/workflows/linux-clang-build.yml @@ -35,12 +35,17 @@ jobs: -DCMAKE_C_COMPILER=/usr/bin/clang-18 \ -DCMAKE_CXX_COMPILER=/usr/bin/clang++-18 \ -DCODE_COVERAGE:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ -GNinja - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build - name: Test + working-directory: ${{github.workspace}}/build/tests + run: ctest --output-on-failure + + - name: Generate code coverage working-directory: ${{github.workspace}}/build run: | ninja faker-ccov-all \ diff --git a/.github/workflows/linux-gcc-12.yml b/.github/workflows/linux-gcc-12.yml index 53c98efc3..57061eeea 100644 --- a/.github/workflows/linux-gcc-12.yml +++ b/.github/workflows/linux-gcc-12.yml @@ -33,12 +33,14 @@ jobs: run: | cmake -B ${{github.workspace}}/build \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -DCMAKE_C_COMPILER=gcc-12 \ -DCMAKE_CXX_COMPILER=g++-12 \ + -DBUILD_TESTING:BOOL=ON \ -GNinja - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build - name: Test - working-directory: ${{github.workspace}}/build + working-directory: ${{github.workspace}}/build/tests run: ctest --output-on-failure diff --git a/.github/workflows/linux-gxx-build.yml b/.github/workflows/linux-gxx-build.yml index 6932bd6e2..3dd8ea6fc 100644 --- a/.github/workflows/linux-gxx-build.yml +++ b/.github/workflows/linux-gxx-build.yml @@ -53,5 +53,6 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_COMPILER=g++-13 \ -DCMAKE_C_COMPILER=gcc-13 \ + -DBUILD_TESTING:BOOL=ON \ -DCMAKE_TOOLCHAIN_FILE=conan/conan_toolchain.cmake && \ cmake --build build diff --git a/.github/workflows/macos-clang-build.yml b/.github/workflows/macos-clang-build.yml index 560a69327..cf385276b 100644 --- a/.github/workflows/macos-clang-build.yml +++ b/.github/workflows/macos-clang-build.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Install clang run: brew install llvm@16 && echo 'export PATH="/opt/homebrew/opt/llvm@16/bin:$PATH"' >> /Users/runner/.bash_profile && source /Users/runner/.bash_profile && which clang++ - + - name: Checkout uses: actions/checkout@v3 with: @@ -27,10 +27,11 @@ jobs: run: | cmake -B ${{github.workspace}}/build \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -DBUILD_TESTING:BOOL=ON \ -DCMAKE_CXX_COMPILER=clang++ - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - working-directory: build/ + - working-directory: build/tests run: ./faker-cxx-UT diff --git a/.github/workflows/windows-msvc-build.yml b/.github/workflows/windows-msvc-build.yml index 0e60db441..5a066b614 100644 --- a/.github/workflows/windows-msvc-build.yml +++ b/.github/workflows/windows-msvc-build.yml @@ -23,10 +23,10 @@ jobs: - run: cmake -E make_directory build - working-directory: build/ - run: cmake .. -G "Visual Studio 17 2022" + run: cmake .. -G "Visual Studio 17 2022" -DBUILD_TESTING:BOOL=ON - working-directory: build/ - run: cmake --build . + run: cmake --build . --config ${{env.BUILD_TYPE}} - - working-directory: build/ - run: ctest -C Debug --output-on-failure \ No newline at end of file + - working-directory: build/tests + run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d9c3a088..8ed53ba4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,6 @@ project(${PROJECT_NAME} CXX) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -option(BUILD_FAKER_TESTS DEFAULT ON) option(USE_SYSTEM_DEPENDENCIES "Use fmt and GTest from system" OFF) if (NOT USE_SYSTEM_DEPENDENCIES) @@ -59,48 +58,6 @@ set(FAKER_SOURCES src/modules/structure/Structure.cpp ) -set(FAKER_UT_SOURCES - src/modules/animal/AnimalTest.cpp - src/modules/book/BookTest.cpp - src/modules/color/ColorTest.cpp - src/modules/commerce/CommerceTest.cpp - src/modules/company/CompanyTest.cpp - src/modules/datatype/DatatypeTest.cpp - src/modules/date/DateTest.cpp - src/modules/finance/FinanceTest.cpp - src/modules/food/FoodTest.cpp - src/modules/internet/InternetTest.cpp - src/modules/location/LocationTest.cpp - src/modules/lorem/LoremTest.cpp - src/modules/number/NumberTest.cpp - src/modules/person/PersonTest.cpp - src/modules/string/StringTest.cpp - src/modules/word/WordTest.cpp - src/common/StringHelperTest.cpp - src/modules/phone/PhoneTest.cpp - src/modules/helper/HelperTest.cpp - src/common/LuhnCheckTest.cpp - src/common/FormatHelperTest.cpp - src/common/mappers/precisionMapper/PrecisionMapperTest.cpp - src/modules/system/SystemTest.cpp - src/modules/database/DatabaseTest.cpp - src/modules/music/MusicTest.cpp - src/modules/movie/MovieTest.cpp - src/modules/git/GitTest.cpp - src/modules/hacker/HackerTest.cpp - src/modules/sport/SportTest.cpp - src/modules/videoGame/VideoGameTest.cpp - src/modules/medicine/MedicineTest.cpp - src/modules/weather/WeatherTest.cpp - src/modules/airline/AirlineTest.cpp - src/modules/image/ImageTest.cpp - src/modules/crypto/CryptoTest.cpp - src/modules/computer/ComputerTest.cpp - src/modules/vehicle/VehicleTest.cpp - src/modules/science/ScienceTest.cpp - src/modules/structure/StructureTest.cpp -) - add_library(${LIBRARY_NAME} ${FAKER_SOURCES}) target_include_directories( @@ -115,6 +72,7 @@ else () target_compile_options(${LIBRARY_NAME} PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wformat) endif () +include(GNUInstallDirs) install(TARGETS ${LIBRARY_NAME} EXPORT ${LIBRARY_NAME}-targets ARCHIVE DESTINATION lib @@ -143,55 +101,6 @@ else () target_link_libraries(${LIBRARY_NAME} PRIVATE fmt) endif () -if (BUILD_FAKER_TESTS) - enable_testing() - - set(target_code_coverage_ALL 1) - - include("cmake/cmake-coverage.cmake") - - add_code_coverage_all_targets() - - add_executable(${LIBRARY_NAME}-UT ${FAKER_UT_SOURCES}) - if (MSVC) - target_compile_options(${LIBRARY_NAME}-UT PRIVATE /permissive- /bigobj) - endif() - - if (USE_SYSTEM_DEPENDENCIES) - find_package(GTest REQUIRED) - target_link_libraries(${LIBRARY_NAME}-UT PRIVATE GTest::gtest - GTest::gtest_main GTest::gmock GTest::gmock_main faker-cxx) - else () - add_subdirectory(externals/googletest) - - set(GTEST_INCLUDE_DIR - "${CMAKE_SOURCE_DIR}/externals/googletest/googletest/include") - set(GMOCK_INCLUDE_DIR - "${CMAKE_SOURCE_DIR}/externals/googletest/googlemock/include") - - target_link_libraries(${LIBRARY_NAME}-UT PRIVATE gtest_main gmock_main - faker-cxx) - endif () - - if (HAS_STD_FORMAT) - target_include_directories( - ${LIBRARY_NAME}-UT - PRIVATE ${GTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} - ${CMAKE_CURRENT_LIST_DIR}) - target_compile_definitions(${LIBRARY_NAME}-UT PRIVATE HAS_STD_FORMAT) - else () - target_link_libraries(${LIBRARY_NAME}-UT PRIVATE - $,fmt::fmt,fmt>) - target_include_directories( - ${LIBRARY_NAME}-UT - PRIVATE ${FMT_INCLUDE_DIR} ${GTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} ${CMAKE_CURRENT_LIST_DIR}) - endif () - - add_test( - NAME ${LIBRARY_NAME}-UT - COMMAND ${LIBRARY_NAME}-UT - WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) - - target_code_coverage(${LIBRARY_NAME}-UT ALL) +if (BUILD_TESTING) + add_subdirectory(tests) endif () diff --git a/Dockerfile b/Dockerfile index 6ba40e393..f86925514 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ RUN apt install -y cmake ninja-build g++-13 libstdc++-13-dev COPY include/ faker-cxx/include/ COPY src/ faker-cxx/src/ +COPY tests/ faker-cxx/tests/ COPY externals/ faker-cxx/externals/ COPY cmake/ faker-cxx/cmake/ COPY CMakeLists.txt faker-cxx/CMakeLists.txt diff --git a/scripts/run_tests_linux_gxx.sh b/scripts/run_tests_linux_gxx.sh index 72cf6101f..71791e7c4 100755 --- a/scripts/run_tests_linux_gxx.sh +++ b/scripts/run_tests_linux_gxx.sh @@ -6,8 +6,11 @@ cd build-linux-gxx || exit 1 cmake .. -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_COMPILER=/usr/bin/g++-13 \ + -DBUILD_TESTING:BOOL=ON \ -GNinja cmake --build . +cd tests/ || exit 1 + ctest -C Debug --output-on-failure diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 000000000..3c461d7fb --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,102 @@ +cmake_minimum_required(VERSION 3.22) +project(${CMAKE_PROJECT_NAME}-UT CXX) + +include(CTest) +enable_testing() + +set(target_code_coverage_ALL 1) + +include("${CMAKE_SOURCE_DIR}/cmake/cmake-coverage.cmake") + +add_code_coverage_all_targets() + +set(FAKER_UT_SOURCES + common/FormatHelperTest.cpp + common/LuhnCheckTest.cpp + common/mappers/precisionMapper/PrecisionMapperTest.cpp + common/StringHelperTest.cpp + modules/airline/AirlineTest.cpp + modules/animal/AnimalTest.cpp + modules/book/BookTest.cpp + modules/color/ColorTest.cpp + modules/commerce/CommerceTest.cpp + modules/company/CompanyTest.cpp + modules/computer/ComputerTest.cpp + modules/crypto/CryptoTest.cpp + modules/database/DatabaseTest.cpp + modules/datatype/DatatypeTest.cpp + modules/date/DateTest.cpp + modules/finance/FinanceTest.cpp + modules/food/FoodTest.cpp + modules/git/GitTest.cpp + modules/hacker/HackerTest.cpp + modules/helper/HelperTest.cpp + modules/image/ImageTest.cpp + modules/internet/InternetTest.cpp + modules/location/LocationTest.cpp + modules/lorem/LoremTest.cpp + modules/medicine/MedicineTest.cpp + modules/movie/MovieTest.cpp + modules/music/MusicTest.cpp + modules/number/NumberTest.cpp + modules/person/PersonTest.cpp + modules/phone/PhoneTest.cpp + modules/science/ScienceTest.cpp + modules/sport/SportTest.cpp + modules/string/StringTest.cpp + modules/structure/StructureTest.cpp + modules/system/SystemTest.cpp + modules/vehicle/VehicleTest.cpp + modules/videoGame/VideoGameTest.cpp + modules/weather/WeatherTest.cpp + modules/word/WordTest.cpp +) + +add_executable(${PROJECT_NAME} ${FAKER_UT_SOURCES}) +if (MSVC) + target_compile_options(${PROJECT_NAME} PRIVATE /permissive- /bigobj) +endif() +target_include_directories(${PROJECT_NAME} PRIVATE + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/src/common + ${CMAKE_SOURCE_DIR}/src/modules +) + +if (USE_SYSTEM_DEPENDENCIES) + find_package(GTest REQUIRED) + target_link_libraries(${PROJECT_NAME} PRIVATE GTest::gtest + GTest::gtest_main GTest::gmock GTest::gmock_main faker-cxx) +else () + add_subdirectory("${CMAKE_SOURCE_DIR}/externals/googletest" + "${CMAKE_BINARY_DIR}/googletest") + + set(GTEST_INCLUDE_DIR + "${CMAKE_SOURCE_DIR}/externals/googletest/googletest/include") + set(GMOCK_INCLUDE_DIR + "${CMAKE_SOURCE_DIR}/externals/googletest/googlemock/include") + + target_link_libraries(${PROJECT_NAME} PRIVATE gtest_main gmock_main + faker-cxx) +endif () + +if (HAS_STD_FORMAT) + target_include_directories( + ${PROJECT_NAME} + PRIVATE ${GTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} + ${CMAKE_CURRENT_LIST_DIR}) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAS_STD_FORMAT) +else () + target_link_libraries(${PROJECT_NAME} PRIVATE + $,fmt::fmt,fmt>) + target_include_directories( + ${PROJECT_NAME} + PRIVATE ${FMT_INCLUDE_DIR} ${GTEST_INCLUDE_DIR} + ${GMOCK_INCLUDE_DIR} ${CMAKE_CURRENT_LIST_DIR}) +endif () + +add_test( + NAME ${PROJECT_NAME} + COMMAND ${PROJECT_NAME} + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) + +target_code_coverage(${PROJECT_NAME} ALL) diff --git a/src/common/FormatHelperTest.cpp b/tests/common/FormatHelperTest.cpp similarity index 96% rename from src/common/FormatHelperTest.cpp rename to tests/common/FormatHelperTest.cpp index 8f027a6a0..ae331fd2e 100644 --- a/src/common/FormatHelperTest.cpp +++ b/tests/common/FormatHelperTest.cpp @@ -2,7 +2,7 @@ #include "gtest/gtest.h" -#include "src/common/errors/TokenGeneratorNotFoundError.h" +#include "common/errors/TokenGeneratorNotFoundError.h" using namespace ::testing; using namespace faker; @@ -44,4 +44,4 @@ TEST_F(FormatHelperTest, shouldFormat) EXPECT_EQ(FormatHelper::format("{}", 1), "1"); EXPECT_EQ(FormatHelper::format("{} {}", "Hello", "World"), "Hello World"); EXPECT_EQ(FormatHelper::format("{0} {1}", "Hello", "World"), "Hello World"); -} \ No newline at end of file +} diff --git a/src/common/LuhnCheckTest.cpp b/tests/common/LuhnCheckTest.cpp similarity index 100% rename from src/common/LuhnCheckTest.cpp rename to tests/common/LuhnCheckTest.cpp diff --git a/src/common/StringHelperTest.cpp b/tests/common/StringHelperTest.cpp similarity index 100% rename from src/common/StringHelperTest.cpp rename to tests/common/StringHelperTest.cpp diff --git a/src/common/mappers/precisionMapper/PrecisionMapperTest.cpp b/tests/common/mappers/precisionMapper/PrecisionMapperTest.cpp similarity index 94% rename from src/common/mappers/precisionMapper/PrecisionMapperTest.cpp rename to tests/common/mappers/precisionMapper/PrecisionMapperTest.cpp index 11926c177..00d44a820 100644 --- a/src/common/mappers/precisionMapper/PrecisionMapperTest.cpp +++ b/tests/common/mappers/precisionMapper/PrecisionMapperTest.cpp @@ -1,4 +1,4 @@ -#include "PrecisionMapper.h" +#include "common/mappers/precisionMapper/PrecisionMapper.h" #include "gtest/gtest.h" diff --git a/src/modules/airline/AirlineTest.cpp b/tests/modules/airline/AirlineTest.cpp similarity index 96% rename from src/modules/airline/AirlineTest.cpp rename to tests/modules/airline/AirlineTest.cpp index 2186f9e34..3ed764abf 100644 --- a/src/modules/airline/AirlineTest.cpp +++ b/tests/modules/airline/AirlineTest.cpp @@ -5,11 +5,11 @@ #include "gtest/gtest.h" -#include "data/AircraftTypes.h" -#include "data/Airlines.h" -#include "data/Airplanes.h" -#include "data/Airports.h" -#include "data/Seat.h" +#include "airline/data/AircraftTypes.h" +#include "airline/data/Airlines.h" +#include "airline/data/Airplanes.h" +#include "airline/data/Airports.h" +#include "airline/data/Seat.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/animal/AnimalTest.cpp b/tests/modules/animal/AnimalTest.cpp similarity index 88% rename from src/modules/animal/AnimalTest.cpp rename to tests/modules/animal/AnimalTest.cpp index 901374264..c61035304 100644 --- a/src/modules/animal/AnimalTest.cpp +++ b/tests/modules/animal/AnimalTest.cpp @@ -4,21 +4,21 @@ #include "gtest/gtest.h" -#include "data/Bears.h" -#include "data/Birds.h" -#include "data/Cats.h" -#include "data/Cetaceans.h" -#include "data/Cows.h" -#include "data/Crocodiles.h" -#include "data/Dogs.h" -#include "data/Fishes.h" -#include "data/Horses.h" -#include "data/Insects.h" -#include "data/Lions.h" -#include "data/Rabbits.h" -#include "data/Rodents.h" -#include "data/Snakes.h" -#include "data/Types.h" +#include "animal/data/Bears.h" +#include "animal/data/Birds.h" +#include "animal/data/Cats.h" +#include "animal/data/Cetaceans.h" +#include "animal/data/Cows.h" +#include "animal/data/Crocodiles.h" +#include "animal/data/Dogs.h" +#include "animal/data/Fishes.h" +#include "animal/data/Horses.h" +#include "animal/data/Insects.h" +#include "animal/data/Lions.h" +#include "animal/data/Rabbits.h" +#include "animal/data/Rodents.h" +#include "animal/data/Snakes.h" +#include "animal/data/Types.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/book/BookTest.cpp b/tests/modules/book/BookTest.cpp similarity index 90% rename from src/modules/book/BookTest.cpp rename to tests/modules/book/BookTest.cpp index 5f8b5228b..69593a005 100644 --- a/src/modules/book/BookTest.cpp +++ b/tests/modules/book/BookTest.cpp @@ -4,14 +4,14 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" -#include "data/Authors.h" -#include "data/BookFormat.h" -#include "data/Genres.h" -#include "data/Publishers.h" -#include "data/Series.h" -#include "data/Titles.h" -#include "data/Translators.h" +#include "common/StringHelper.h" +#include "book/data/Authors.h" +#include "book/data/BookFormat.h" +#include "book/data/Genres.h" +#include "book/data/Publishers.h" +#include "book/data/Series.h" +#include "book/data/Titles.h" +#include "book/data/Translators.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/color/ColorTest.cpp b/tests/modules/color/ColorTest.cpp similarity index 99% rename from src/modules/color/ColorTest.cpp rename to tests/modules/color/ColorTest.cpp index e33db3daf..208da5886 100644 --- a/src/modules/color/ColorTest.cpp +++ b/tests/modules/color/ColorTest.cpp @@ -5,9 +5,9 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" -#include "../string/data/Characters.h" -#include "data/Colors.h" +#include "common/StringHelper.h" +#include "string/data/Characters.h" +#include "color/data/Colors.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/commerce/CommerceTest.cpp b/tests/modules/commerce/CommerceTest.cpp similarity index 99% rename from src/modules/commerce/CommerceTest.cpp rename to tests/modules/commerce/CommerceTest.cpp index 374ffa32b..50044b4d7 100644 --- a/src/modules/commerce/CommerceTest.cpp +++ b/tests/modules/commerce/CommerceTest.cpp @@ -4,9 +4,9 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" -#include "../string/data/Characters.h" -#include "data/Commerce.h" +#include "common/StringHelper.h" +#include "string/data/Characters.h" +#include "commerce/data/Commerce.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/company/CompanyTest.cpp b/tests/modules/company/CompanyTest.cpp similarity index 93% rename from src/modules/company/CompanyTest.cpp rename to tests/modules/company/CompanyTest.cpp index e397129a3..df7fedf8b 100644 --- a/src/modules/company/CompanyTest.cpp +++ b/tests/modules/company/CompanyTest.cpp @@ -4,19 +4,19 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" -#include "../person/data/england/EnglishFirstNames.h" -#include "../person/data/england/EnglishLastNames.h" -#include "../person/data/JobTitles.h" -#include "data/BuzzAdjectives.h" -#include "data/BuzzNouns.h" -#include "data/BuzzVerbs.h" -#include "data/CatchPhraseAdjectives.h" -#include "data/CatchPhraseDescriptors.h" -#include "data/CatchPhraseNouns.h" -#include "data/CompanyTypes.h" -#include "data/Industries.h" -#include "data/Suffixes.h" +#include "common/StringHelper.h" +#include "person/data/england/EnglishFirstNames.h" +#include "person/data/england/EnglishLastNames.h" +#include "person/data/JobTitles.h" +#include "company/data/BuzzAdjectives.h" +#include "company/data/BuzzNouns.h" +#include "company/data/BuzzVerbs.h" +#include "company/data/CatchPhraseAdjectives.h" +#include "company/data/CatchPhraseDescriptors.h" +#include "company/data/CatchPhraseNouns.h" +#include "company/data/CompanyTypes.h" +#include "company/data/Industries.h" +#include "company/data/Suffixes.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/computer/ComputerTest.cpp b/tests/modules/computer/ComputerTest.cpp similarity index 98% rename from src/modules/computer/ComputerTest.cpp rename to tests/modules/computer/ComputerTest.cpp index 4ec972c27..6c2c24583 100644 --- a/src/modules/computer/ComputerTest.cpp +++ b/tests/modules/computer/ComputerTest.cpp @@ -6,7 +6,7 @@ #include "gtest/gtest.h" -#include "data/ComputerData.h" +#include "computer/data/ComputerData.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/crypto/CryptoTest.cpp b/tests/modules/crypto/CryptoTest.cpp similarity index 100% rename from src/modules/crypto/CryptoTest.cpp rename to tests/modules/crypto/CryptoTest.cpp diff --git a/src/modules/database/DatabaseTest.cpp b/tests/modules/database/DatabaseTest.cpp similarity index 90% rename from src/modules/database/DatabaseTest.cpp rename to tests/modules/database/DatabaseTest.cpp index adf4f66b5..bc440ddad 100644 --- a/src/modules/database/DatabaseTest.cpp +++ b/tests/modules/database/DatabaseTest.cpp @@ -4,11 +4,11 @@ #include "gtest/gtest.h" -#include "../string/data/Characters.h" -#include "data/Collations.h" -#include "data/ColumnNames.h" -#include "data/ColumnTypes.h" -#include "data/Engines.h" +#include "string/data/Characters.h" +#include "database/data/Collations.h" +#include "database/data/ColumnNames.h" +#include "database/data/ColumnTypes.h" +#include "database/data/Engines.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/datatype/DatatypeTest.cpp b/tests/modules/datatype/DatatypeTest.cpp similarity index 100% rename from src/modules/datatype/DatatypeTest.cpp rename to tests/modules/datatype/DatatypeTest.cpp diff --git a/src/modules/date/DateTest.cpp b/tests/modules/date/DateTest.cpp similarity index 98% rename from src/modules/date/DateTest.cpp rename to tests/modules/date/DateTest.cpp index 37cd3412b..35891e0f4 100644 --- a/src/modules/date/DateTest.cpp +++ b/tests/modules/date/DateTest.cpp @@ -5,10 +5,10 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" -#include "data/MonthNames.h" -#include "data/TimeZones.h" -#include "data/WeekdayNames.h" +#include "common/StringHelper.h" +#include "date/data/MonthNames.h" +#include "date/data/TimeZones.h" +#include "date/data/WeekdayNames.h" #ifdef _WIN32 #define timegm _mkgmtime diff --git a/src/modules/finance/FinanceTest.cpp b/tests/modules/finance/FinanceTest.cpp similarity index 98% rename from src/modules/finance/FinanceTest.cpp rename to tests/modules/finance/FinanceTest.cpp index aca52283f..a3d2219a2 100644 --- a/src/modules/finance/FinanceTest.cpp +++ b/tests/modules/finance/FinanceTest.cpp @@ -7,13 +7,13 @@ #include "gtest/gtest.h" -#include "../../common/LuhnCheck.h" -#include "../../common/StringHelper.h" -#include "../string/data/Characters.h" -#include "data/AccountTypes.h" -#include "data/BankIndentifiersCodes.h" -#include "data/CreditCardTypeNames.h" -#include "data/Currencies.h" +#include "common/LuhnCheck.h" +#include "common/StringHelper.h" +#include "string/data/Characters.h" +#include "finance/data/AccountTypes.h" +#include "finance/data/BankIndentifiersCodes.h" +#include "finance/data/CreditCardTypeNames.h" +#include "finance/data/Currencies.h" #include "gmock/gmock.h" using namespace ::testing; diff --git a/src/modules/food/FoodTest.cpp b/tests/modules/food/FoodTest.cpp similarity index 89% rename from src/modules/food/FoodTest.cpp rename to tests/modules/food/FoodTest.cpp index 8986ab000..a44279a3a 100644 --- a/src/modules/food/FoodTest.cpp +++ b/tests/modules/food/FoodTest.cpp @@ -4,20 +4,20 @@ #include "gtest/gtest.h" -#include "data/AlcoholicBeverages.h" -#include "data/DishNames.h" -#include "data/FoodCategories.h" -#include "data/Fruits.h" -#include "data/Grains.h" -#include "data/Meats.h" -#include "data/MilkProducts.h" -#include "data/NonalcoholicBeverages.h" -#include "data/Nuts.h" -#include "data/Oils.h" -#include "data/Seafoods.h" -#include "data/Seeds.h" -#include "data/SugarProducts.h" -#include "data/Vegetables.h" +#include "food/data/AlcoholicBeverages.h" +#include "food/data/DishNames.h" +#include "food/data/FoodCategories.h" +#include "food/data/Fruits.h" +#include "food/data/Grains.h" +#include "food/data/Meats.h" +#include "food/data/MilkProducts.h" +#include "food/data/NonalcoholicBeverages.h" +#include "food/data/Nuts.h" +#include "food/data/Oils.h" +#include "food/data/Seafoods.h" +#include "food/data/Seeds.h" +#include "food/data/SugarProducts.h" +#include "food/data/Vegetables.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/git/GitTest.cpp b/tests/modules/git/GitTest.cpp similarity index 98% rename from src/modules/git/GitTest.cpp rename to tests/modules/git/GitTest.cpp index c08f58fc8..7949463dd 100644 --- a/src/modules/git/GitTest.cpp +++ b/tests/modules/git/GitTest.cpp @@ -6,7 +6,7 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" +#include "common/StringHelper.h" #include "faker-cxx/Number.h" using namespace ::testing; diff --git a/src/modules/hacker/HackerTest.cpp b/tests/modules/hacker/HackerTest.cpp similarity index 93% rename from src/modules/hacker/HackerTest.cpp rename to tests/modules/hacker/HackerTest.cpp index 9b627f2b8..287bd122e 100644 --- a/src/modules/hacker/HackerTest.cpp +++ b/tests/modules/hacker/HackerTest.cpp @@ -5,11 +5,11 @@ #include "gtest/gtest.h" -#include "data/Abbreviations.h" -#include "data/Adjectives.h" -#include "data/Ingverbs.h" -#include "data/Nouns.h" -#include "data/Verbs.h" +#include "hacker/data/Abbreviations.h" +#include "hacker/data/Adjectives.h" +#include "hacker/data/Ingverbs.h" +#include "hacker/data/Nouns.h" +#include "hacker/data/Verbs.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/helper/HelperTest.cpp b/tests/modules/helper/HelperTest.cpp similarity index 100% rename from src/modules/helper/HelperTest.cpp rename to tests/modules/helper/HelperTest.cpp diff --git a/src/modules/image/ImageTest.cpp b/tests/modules/image/ImageTest.cpp similarity index 96% rename from src/modules/image/ImageTest.cpp rename to tests/modules/image/ImageTest.cpp index a59277e6f..0635005e8 100644 --- a/src/modules/image/ImageTest.cpp +++ b/tests/modules/image/ImageTest.cpp @@ -5,8 +5,8 @@ #include "gtest/gtest.h" -#include "../src/common/StringHelper.h" -#include "data/Type.h" +#include "common/StringHelper.h" +#include "image/data/Type.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/internet/InternetTest.cpp b/tests/modules/internet/InternetTest.cpp similarity index 98% rename from src/modules/internet/InternetTest.cpp rename to tests/modules/internet/InternetTest.cpp index c150bd5a1..d299236a6 100644 --- a/src/modules/internet/InternetTest.cpp +++ b/tests/modules/internet/InternetTest.cpp @@ -5,20 +5,20 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" -#include "../person/data/england/EnglishFirstNames.h" -#include "../person/data/england/EnglishLastNames.h" -#include "../person/data/romania/RomanianFirstNames.h" -#include "../person/data/romania/RomanianLastNames.h" -#include "../string/data/Characters.h" -#include "../word/data/Adjectives.h" -#include "../word/data/Nouns.h" -#include "data/DomainSuffixes.h" -#include "data/EmailHosts.h" -#include "data/Emojis.h" -#include "data/HttpMediaType.h" -#include "data/HttpRequestHeaders.h" -#include "data/HttpResponseHeaders.h" +#include "common/StringHelper.h" +#include "person/data/england/EnglishFirstNames.h" +#include "person/data/england/EnglishLastNames.h" +#include "person/data/romania/RomanianFirstNames.h" +#include "person/data/romania/RomanianLastNames.h" +#include "string/data/Characters.h" +#include "word/data/Adjectives.h" +#include "word/data/Nouns.h" +#include "internet/data/DomainSuffixes.h" +#include "internet/data/EmailHosts.h" +#include "internet/data/Emojis.h" +#include "internet/data/HttpMediaType.h" +#include "internet/data/HttpRequestHeaders.h" +#include "internet/data/HttpResponseHeaders.h" #include "faker-cxx/Number.h" using namespace ::testing; diff --git a/src/modules/location/LocationTest.cpp b/tests/modules/location/LocationTest.cpp similarity index 95% rename from src/modules/location/LocationTest.cpp rename to tests/modules/location/LocationTest.cpp index a9561feb2..19cc04225 100644 --- a/src/modules/location/LocationTest.cpp +++ b/tests/modules/location/LocationTest.cpp @@ -4,51 +4,51 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" -#include "../person/data/argentina/ArgentinianFirstNames.h" -#include "../person/data/argentina/ArgentinianLastNames.h" -#include "../person/data/australia/AustralianFirstNames.h" -#include "../person/data/australia/AustralianLastNames.h" -#include "../person/data/brazil/BrazilianFirstNames.h" -#include "../person/data/brazil/BrazilianLastNames.h" -#include "../person/data/england/EnglishFirstNames.h" -#include "../person/data/england/EnglishLastNames.h" -#include "../person/data/finland/FinnishFirstNames.h" -#include "../person/data/finland/FinnishLastNames.h" -#include "../person/data/italy/ItalianFirstNames.h" -#include "../person/data/italy/ItalianLastNames.h" -#include "../person/data/russia/RussianFirstNames.h" -#include "../person/data/russia/RussianLastNames.h" -#include "../person/data/spain/SpanishFirstNames.h" -#include "../person/data/spain/SpanishLastNames.h" -#include "../person/data/ukraine/UkrainianFirstNames.h" -#include "../person/data/ukraine/UkrainianLastNames.h" -#include "../string/data/Characters.h" -#include "data/argentina/ArgentinaAddresses.h" -#include "data/australia/AustraliaAddresses.h" -#include "data/brazil/BrazilAddresses.h" -#include "data/Countries.h" -#include "data/CountryAddresses.h" -#include "data/belgium/BelgiumAddresses.h" -#include "data/czech/CzechAddresses.h" -#include "data/denmark/DenmarkAddresses.h" -#include "data/Directions.h" -#include "data/estonia/EstoniaAddresses.h" -#include "data/finland/FinlandAddresses.h" -#include "data/france/FranceAddresses.h" -#include "data/germany/GermanyAddresses.h" -#include "data/india/IndiaAddresses.h" -#include "data/italy/ItalyAddresses.h" -#include "data/latvia/LatviaAddresses.h" -#include "data/nepal/NepalAddresses.h" -#include "data/poland/PolandAddresses.h" -#include "data/romania/RomaniaAddresses.h" -#include "data/russia/RussiaAddresses.h" -#include "data/serbia/SerbiaAddresses.h" -#include "data/spain/SpainAddresses.h" -#include "data/TimeZones.h" -#include "data/ukraine/UkraineAddresses.h" -#include "data/usa/UsaAddresses.h" +#include "common/StringHelper.h" +#include "person/data/argentina/ArgentinianFirstNames.h" +#include "person/data/argentina/ArgentinianLastNames.h" +#include "person/data/australia/AustralianFirstNames.h" +#include "person/data/australia/AustralianLastNames.h" +#include "person/data/brazil/BrazilianFirstNames.h" +#include "person/data/brazil/BrazilianLastNames.h" +#include "person/data/england/EnglishFirstNames.h" +#include "person/data/england/EnglishLastNames.h" +#include "person/data/finland/FinnishFirstNames.h" +#include "person/data/finland/FinnishLastNames.h" +#include "person/data/italy/ItalianFirstNames.h" +#include "person/data/italy/ItalianLastNames.h" +#include "person/data/russia/RussianFirstNames.h" +#include "person/data/russia/RussianLastNames.h" +#include "person/data/spain/SpanishFirstNames.h" +#include "person/data/spain/SpanishLastNames.h" +#include "person/data/ukraine/UkrainianFirstNames.h" +#include "person/data/ukraine/UkrainianLastNames.h" +#include "string/data/Characters.h" +#include "location/data/argentina/ArgentinaAddresses.h" +#include "location/data/australia/AustraliaAddresses.h" +#include "location/data/brazil/BrazilAddresses.h" +#include "location/data/Countries.h" +#include "location/data/CountryAddresses.h" +#include "location/data/belgium/BelgiumAddresses.h" +#include "location/data/czech/CzechAddresses.h" +#include "location/data/denmark/DenmarkAddresses.h" +#include "location/data/Directions.h" +#include "location/data/estonia/EstoniaAddresses.h" +#include "location/data/finland/FinlandAddresses.h" +#include "location/data/france/FranceAddresses.h" +#include "location/data/germany/GermanyAddresses.h" +#include "location/data/india/IndiaAddresses.h" +#include "location/data/italy/ItalyAddresses.h" +#include "location/data/latvia/LatviaAddresses.h" +#include "location/data/nepal/NepalAddresses.h" +#include "location/data/poland/PolandAddresses.h" +#include "location/data/romania/RomaniaAddresses.h" +#include "location/data/russia/RussiaAddresses.h" +#include "location/data/serbia/SerbiaAddresses.h" +#include "location/data/spain/SpainAddresses.h" +#include "location/data/TimeZones.h" +#include "location/data/ukraine/UkraineAddresses.h" +#include "location/data/usa/UsaAddresses.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/lorem/LoremTest.cpp b/tests/modules/lorem/LoremTest.cpp similarity index 98% rename from src/modules/lorem/LoremTest.cpp rename to tests/modules/lorem/LoremTest.cpp index bac2f2340..054a4d44e 100644 --- a/src/modules/lorem/LoremTest.cpp +++ b/tests/modules/lorem/LoremTest.cpp @@ -4,8 +4,8 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" -#include "data/LoremWords.h" +#include "common/StringHelper.h" +#include "lorem/data/LoremWords.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/medicine/MedicineTest.cpp b/tests/modules/medicine/MedicineTest.cpp similarity index 90% rename from src/modules/medicine/MedicineTest.cpp rename to tests/modules/medicine/MedicineTest.cpp index 02c312c43..6cce7b51f 100644 --- a/src/modules/medicine/MedicineTest.cpp +++ b/tests/modules/medicine/MedicineTest.cpp @@ -3,9 +3,9 @@ #include #include -#include "data/conditon.h" -#include "data/medicaltests.h" -#include "data/specialty.h" +#include "medicine/data/conditon.h" +#include "medicine/data/medicaltests.h" +#include "medicine/data/specialty.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/movie/MovieTest.cpp b/tests/modules/movie/MovieTest.cpp similarity index 89% rename from src/modules/movie/MovieTest.cpp rename to tests/modules/movie/MovieTest.cpp index 80273a3d8..4069ef8ee 100644 --- a/src/modules/movie/MovieTest.cpp +++ b/tests/modules/movie/MovieTest.cpp @@ -4,12 +4,12 @@ #include "gtest/gtest.h" -#include "data/Actors.h" -#include "data/Actresses.h" -#include "data/Directors.h" -#include "data/Genres.h" -#include "data/Movies.h" -#include "data/TvShows.h" +#include "movie/data/Actors.h" +#include "movie/data/Actresses.h" +#include "movie/data/Directors.h" +#include "movie/data/Genres.h" +#include "movie/data/Movies.h" +#include "movie/data/TvShows.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/music/MusicTest.cpp b/tests/modules/music/MusicTest.cpp similarity index 90% rename from src/modules/music/MusicTest.cpp rename to tests/modules/music/MusicTest.cpp index 39acb6c4d..5002d39b7 100644 --- a/src/modules/music/MusicTest.cpp +++ b/tests/modules/music/MusicTest.cpp @@ -4,9 +4,9 @@ #include "gtest/gtest.h" -#include "data/Artists.h" -#include "data/Genres.h" -#include "data/SongNames.h" +#include "music/data/Artists.h" +#include "music/data/Genres.h" +#include "music/data/SongNames.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/number/NumberTest.cpp b/tests/modules/number/NumberTest.cpp similarity index 100% rename from src/modules/number/NumberTest.cpp rename to tests/modules/number/NumberTest.cpp diff --git a/src/modules/person/PersonTest.cpp b/tests/modules/person/PersonTest.cpp similarity index 91% rename from src/modules/person/PersonTest.cpp rename to tests/modules/person/PersonTest.cpp index 2f34e5ca7..11a78a61c 100644 --- a/src/modules/person/PersonTest.cpp +++ b/tests/modules/person/PersonTest.cpp @@ -5,77 +5,77 @@ #include "gtest/gtest.h" -#include "../word/data/Nouns.h" -#include "data/albania/AlbanianPeopleNames.h" -#include "data/argentina/ArgentinianPeopleNames.h" -#include "data/australia/AustralianPeopleNames.h" -#include "data/austria/AustrianPeopleNames.h" -#include "data/azerbaijan/AzerbaijaniPeopleNames.h" -#include "data/belarus/BelarusianPeopleNames.h" -#include "data/belgium/BelgianPeopleNames.h" -#include "data/Bio.h" -#include "data/bosnia/BosnianPeopleNames.h" -#include "data/brazil/BrazilianPeopleNames.h" -#include "data/bulgaria/BulgarianPeopleNames.h" -#include "data/canada/CanadianPeopleNames.h" -#include "data/china/ChinesePeopleNames.h" -#include "data/croatia/CroatianPeopleNames.h" -#include "data/czech/CzechPeopleNames.h" -#include "data/denmark/DanishPeopleNames.h" -#include "data/england/EnglishPeopleNames.h" -#include "data/estonia/EstonianPeopleNames.h" -#include "data/finland/FinnishPeopleNames.h" -#include "data/france/FrenchPeopleNames.h" -#include "data/Gender.h" -#include "data/germany/GermanPeopleNames.h" -#include "data/ghana/GhanaianPeopleNames.h" -#include "data/greece/GreekPeopleNames.h" -#include "data/Hobbies.h" -#include "data/hungary/HungarianPeopleNames.h" -#include "data/iceland/IcelandicPeopleNames.h" -#include "data/india/IndianPeopleNames.h" -#include "data/iran/PersianPeopleNames.h" -#include "data/ireland/IrishPeopleNames.h" -#include "data/israel/IsraeliPeopleNames.h" -#include "data/italy/ItalianPeopleNames.h" -#include "data/japan/JapanesePeopleNames.h" -#include "data/JobTitles.h" -#include "data/kazakhstan/KazakhPeopleNames.h" -#include "data/korea/KoreanPeopleNames.h" -#include "data/Languages.h" -#include "data/latvia/LatvianPeopleNames.h" -#include "data/lebanon/LebanesePeopleNames.h" -#include "data/liechtenstein/LiechtensteinerPeopleNames.h" -#include "data/lithuania/LithuanianPeopleNames.h" -#include "data/macedonia/MacedonianPeopleNames.h" -#include "data/maldives/MaldiviansPeopleNames.h" -#include "data/malta/MaltesePeopleNames.h" -#include "data/mexico/MexicanPeopleNames.h" -#include "data/moldova/MoldovanPeopleNames.h" -#include "data/monaco/MonacanPeopleNames.h" -#include "data/Nationalities.h" -#include "data/nepal/NepalesePeopleNames.h" -#include "data/netherlands/DutchPeopleNames.h" -#include "data/norway/NorwegianPeopleNames.h" -#include "data/palestine/PalestinianPeopleNames.h" -#include "data/PeopleNames.h" -#include "data/poland/PolishPeopleNames.h" -#include "data/portugal/PortuguesePeopleNames.h" -#include "data/romania/RomanianPeopleNames.h" -#include "data/russia/RussianPeopleNames.h" -#include "data/serbia/SerbianPeopleNames.h" -#include "data/slovakia/SlovakPeopleNames.h" -#include "data/slovenia/SlovenianPeopleNames.h" -#include "data/southAfrica/SouthAfricanPeopleNames.h" -#include "data/spain/SpanishPeopleNames.h" -#include "data/sweden/SwedishPeopleNames.h" -#include "data/switzerland/SwissPeopleNames.h" -#include "data/syria/SyrianPeopleNames.h" -#include "data/turkey/TurkishPeopleNames.h" -#include "data/ukraine/UkrainianPeopleNames.h" -#include "data/usa/UsaPeopleNames.h" -#include "data/vietnam/VietnamesePeopleNames.h" -#include "data/ZodiacSigns.h" +#include "word/data/Nouns.h" +#include "person/data/albania/AlbanianPeopleNames.h" +#include "person/data/argentina/ArgentinianPeopleNames.h" +#include "person/data/australia/AustralianPeopleNames.h" +#include "person/data/austria/AustrianPeopleNames.h" +#include "person/data/azerbaijan/AzerbaijaniPeopleNames.h" +#include "person/data/belarus/BelarusianPeopleNames.h" +#include "person/data/belgium/BelgianPeopleNames.h" +#include "person/data/Bio.h" +#include "person/data/bosnia/BosnianPeopleNames.h" +#include "person/data/brazil/BrazilianPeopleNames.h" +#include "person/data/bulgaria/BulgarianPeopleNames.h" +#include "person/data/canada/CanadianPeopleNames.h" +#include "person/data/china/ChinesePeopleNames.h" +#include "person/data/croatia/CroatianPeopleNames.h" +#include "person/data/czech/CzechPeopleNames.h" +#include "person/data/denmark/DanishPeopleNames.h" +#include "person/data/england/EnglishPeopleNames.h" +#include "person/data/estonia/EstonianPeopleNames.h" +#include "person/data/finland/FinnishPeopleNames.h" +#include "person/data/france/FrenchPeopleNames.h" +#include "person/data/Gender.h" +#include "person/data/germany/GermanPeopleNames.h" +#include "person/data/ghana/GhanaianPeopleNames.h" +#include "person/data/greece/GreekPeopleNames.h" +#include "person/data/Hobbies.h" +#include "person/data/hungary/HungarianPeopleNames.h" +#include "person/data/iceland/IcelandicPeopleNames.h" +#include "person/data/india/IndianPeopleNames.h" +#include "person/data/iran/PersianPeopleNames.h" +#include "person/data/ireland/IrishPeopleNames.h" +#include "person/data/israel/IsraeliPeopleNames.h" +#include "person/data/italy/ItalianPeopleNames.h" +#include "person/data/japan/JapanesePeopleNames.h" +#include "person/data/JobTitles.h" +#include "person/data/kazakhstan/KazakhPeopleNames.h" +#include "person/data/korea/KoreanPeopleNames.h" +#include "person/data/Languages.h" +#include "person/data/latvia/LatvianPeopleNames.h" +#include "person/data/lebanon/LebanesePeopleNames.h" +#include "person/data/liechtenstein/LiechtensteinerPeopleNames.h" +#include "person/data/lithuania/LithuanianPeopleNames.h" +#include "person/data/macedonia/MacedonianPeopleNames.h" +#include "person/data/maldives/MaldiviansPeopleNames.h" +#include "person/data/malta/MaltesePeopleNames.h" +#include "person/data/mexico/MexicanPeopleNames.h" +#include "person/data/moldova/MoldovanPeopleNames.h" +#include "person/data/monaco/MonacanPeopleNames.h" +#include "person/data/Nationalities.h" +#include "person/data/nepal/NepalesePeopleNames.h" +#include "person/data/netherlands/DutchPeopleNames.h" +#include "person/data/norway/NorwegianPeopleNames.h" +#include "person/data/palestine/PalestinianPeopleNames.h" +#include "person/data/PeopleNames.h" +#include "person/data/poland/PolishPeopleNames.h" +#include "person/data/portugal/PortuguesePeopleNames.h" +#include "person/data/romania/RomanianPeopleNames.h" +#include "person/data/russia/RussianPeopleNames.h" +#include "person/data/serbia/SerbianPeopleNames.h" +#include "person/data/slovakia/SlovakPeopleNames.h" +#include "person/data/slovenia/SlovenianPeopleNames.h" +#include "person/data/southAfrica/SouthAfricanPeopleNames.h" +#include "person/data/spain/SpanishPeopleNames.h" +#include "person/data/sweden/SwedishPeopleNames.h" +#include "person/data/switzerland/SwissPeopleNames.h" +#include "person/data/syria/SyrianPeopleNames.h" +#include "person/data/turkey/TurkishPeopleNames.h" +#include "person/data/ukraine/UkrainianPeopleNames.h" +#include "person/data/usa/UsaPeopleNames.h" +#include "person/data/vietnam/VietnamesePeopleNames.h" +#include "person/data/ZodiacSigns.h" #include "faker-cxx/Internet.h" using namespace ::testing; diff --git a/src/modules/phone/PhoneTest.cpp b/tests/modules/phone/PhoneTest.cpp similarity index 97% rename from src/modules/phone/PhoneTest.cpp rename to tests/modules/phone/PhoneTest.cpp index d3d109429..efbcb49e5 100644 --- a/src/modules/phone/PhoneTest.cpp +++ b/tests/modules/phone/PhoneTest.cpp @@ -5,8 +5,8 @@ #include "gtest/gtest.h" -#include "data/AreaCodes.h" -#include "data/PhoneData.h" +#include "phone/data/AreaCodes.h" +#include "phone/data/PhoneData.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/science/ScienceTest.cpp b/tests/modules/science/ScienceTest.cpp similarity index 97% rename from src/modules/science/ScienceTest.cpp rename to tests/modules/science/ScienceTest.cpp index f9d022aaa..2c28a87c4 100644 --- a/src/modules/science/ScienceTest.cpp +++ b/tests/modules/science/ScienceTest.cpp @@ -4,8 +4,8 @@ #include "gtest/gtest.h" -#include "data/ChemicalElements.h" -#include "data/Units.h" +#include "science/data/ChemicalElements.h" +#include "science/data/Units.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/sport/SportTest.cpp b/tests/modules/sport/SportTest.cpp similarity index 90% rename from src/modules/sport/SportTest.cpp rename to tests/modules/sport/SportTest.cpp index 634cbfed1..b2c29fe17 100644 --- a/src/modules/sport/SportTest.cpp +++ b/tests/modules/sport/SportTest.cpp @@ -5,11 +5,11 @@ #include "gtest/gtest.h" -#include "data/FemaleAthletes.h" -#include "data/MaleAthletes.h" -#include "data/SoccerTeams.h" -#include "data/SportEvents.h" -#include "data/SportNames.h" +#include "sport/data/FemaleAthletes.h" +#include "sport/data/MaleAthletes.h" +#include "sport/data/SoccerTeams.h" +#include "sport/data/SportEvents.h" +#include "sport/data/SportNames.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/string/StringTest.cpp b/tests/modules/string/StringTest.cpp similarity index 99% rename from src/modules/string/StringTest.cpp rename to tests/modules/string/StringTest.cpp index 8f285aac7..cc6e852fc 100644 --- a/src/modules/string/StringTest.cpp +++ b/tests/modules/string/StringTest.cpp @@ -6,7 +6,7 @@ #include "gtest/gtest.h" -#include "data/Characters.h" +#include "string/data/Characters.h" #include "faker-cxx/RandomGenerator.h" using namespace ::testing; diff --git a/src/modules/structure/StructureTest.cpp b/tests/modules/structure/StructureTest.cpp similarity index 95% rename from src/modules/structure/StructureTest.cpp rename to tests/modules/structure/StructureTest.cpp index 7840fd74a..4e1e73ccd 100644 --- a/src/modules/structure/StructureTest.cpp +++ b/tests/modules/structure/StructureTest.cpp @@ -5,11 +5,11 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" -#include "../airline/data/Airports.h" -#include "../animal/data/Birds.h" -#include "../book/data/Titles.h" -#include "../movie/data/Actors.h" +#include "common/StringHelper.h" +#include "airline/data/Airports.h" +#include "animal/data/Birds.h" +#include "book/data/Titles.h" +#include "movie/data/Actors.h" using namespace faker; using namespace ::testing; diff --git a/src/modules/system/SystemTest.cpp b/tests/modules/system/SystemTest.cpp similarity index 99% rename from src/modules/system/SystemTest.cpp rename to tests/modules/system/SystemTest.cpp index ebeb33c1b..c0efcb281 100644 --- a/src/modules/system/SystemTest.cpp +++ b/tests/modules/system/SystemTest.cpp @@ -5,7 +5,7 @@ #include "gtest/gtest.h" -#include "data/MimeTypes.h" +#include "system/data/MimeTypes.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/vehicle/VehicleTest.cpp b/tests/modules/vehicle/VehicleTest.cpp similarity index 93% rename from src/modules/vehicle/VehicleTest.cpp rename to tests/modules/vehicle/VehicleTest.cpp index 5d4ecb4ef..ffc7984a4 100644 --- a/src/modules/vehicle/VehicleTest.cpp +++ b/tests/modules/vehicle/VehicleTest.cpp @@ -6,12 +6,12 @@ #include "gtest/gtest.h" -#include "data/Bicycle.h" -#include "data/Color.h" -#include "data/Fuel.h" -#include "data/Manufacturer.h" -#include "data/Model.h" -#include "data/Type.h" +#include "vehicle/data/Bicycle.h" +#include "vehicle/data/Color.h" +#include "vehicle/data/Fuel.h" +#include "vehicle/data/Manufacturer.h" +#include "vehicle/data/Model.h" +#include "vehicle/data/Type.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/videoGame/VideoGameTest.cpp b/tests/modules/videoGame/VideoGameTest.cpp similarity index 89% rename from src/modules/videoGame/VideoGameTest.cpp rename to tests/modules/videoGame/VideoGameTest.cpp index a48814eea..59fb9ac76 100644 --- a/src/modules/videoGame/VideoGameTest.cpp +++ b/tests/modules/videoGame/VideoGameTest.cpp @@ -4,10 +4,10 @@ #include "gtest/gtest.h" -#include "data/GameTitles.h" -#include "data/Genres.h" -#include "data/Platforms.h" -#include "data/StudioNames.h" +#include "videoGame/data/GameTitles.h" +#include "videoGame/data/Genres.h" +#include "videoGame/data/Platforms.h" +#include "videoGame/data/StudioNames.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/weather/WeatherTest.cpp b/tests/modules/weather/WeatherTest.cpp similarity index 98% rename from src/modules/weather/WeatherTest.cpp rename to tests/modules/weather/WeatherTest.cpp index 1cdc43513..82d0c150e 100644 --- a/src/modules/weather/WeatherTest.cpp +++ b/tests/modules/weather/WeatherTest.cpp @@ -5,7 +5,7 @@ #include "gtest/gtest.h" -#include "data/WeatherDescription.h" +#include "weather/data/WeatherDescription.h" using namespace ::testing; using namespace faker; diff --git a/src/modules/word/WordTest.cpp b/tests/modules/word/WordTest.cpp similarity index 96% rename from src/modules/word/WordTest.cpp rename to tests/modules/word/WordTest.cpp index e542c4c33..471e405bc 100644 --- a/src/modules/word/WordTest.cpp +++ b/tests/modules/word/WordTest.cpp @@ -4,14 +4,14 @@ #include "gtest/gtest.h" -#include "../../common/StringHelper.h" -#include "data/Adjectives.h" -#include "data/Adverbs.h" -#include "data/Conjunctions.h" -#include "data/Interjections.h" -#include "data/Nouns.h" -#include "data/Prepositions.h" -#include "data/Verbs.h" +#include "common/StringHelper.h" +#include "word/data/Adjectives.h" +#include "word/data/Adverbs.h" +#include "word/data/Conjunctions.h" +#include "word/data/Interjections.h" +#include "word/data/Nouns.h" +#include "word/data/Prepositions.h" +#include "word/data/Verbs.h" using namespace ::testing; using namespace faker;