diff --git a/support/test/include/test.hpp b/support/test/include/test.hpp index df9498e9..8d9b9cdf 100644 --- a/support/test/include/test.hpp +++ b/support/test/include/test.hpp @@ -19,8 +19,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef REPERTORY_TEST_INCLUDE_TEST_HPP_ -#define REPERTORY_TEST_INCLUDE_TEST_HPP_ +#ifndef FIFTHGRID_TEST_INCLUDE_TEST_HPP_ +#define FIFTHGRID_TEST_INCLUDE_TEST_HPP_ #if defined(U) #undef U @@ -36,7 +36,7 @@ using namespace ::testing; #include "utils/all.hpp" -namespace repertory::test { +namespace fifthgrid::test { #if defined(PROJECT_ENABLE_LIBSODIUM) [[nodiscard]] auto create_random_file(std::size_t size) -> utils::file::i_file &; @@ -58,6 +58,6 @@ auto generate_test_directory() -> utils::file::i_directory &; [[nodiscard]] auto get_test_input_dir() -> std::string; [[nodiscard]] auto get_test_output_dir() -> std::string; -} // namespace repertory::test +} // namespace fifthgrid::test -#endif // REPERTORY_TEST_INCLUDE_TEST_HPP_ +#endif // FIFTHGRID_TEST_INCLUDE_TEST_HPP_ diff --git a/support/test/src/test.cpp b/support/test/src/test.cpp index 42bcf44d..a7c4d182 100644 --- a/support/test/src/test.cpp +++ b/support/test/src/test.cpp @@ -24,15 +24,15 @@ namespace { static std::recursive_mutex file_mtx{}; -static std::vector> +static std::vector> generated_files{}; static void delete_generated_files() { - repertory::recur_mutex_lock lock{file_mtx}; + fifthgrid::recur_mutex_lock lock{file_mtx}; std::optional parent_path; for (auto &&path : generated_files) { if (parent_path->empty()) { - parent_path = repertory::utils::path::get_parent_path(path->get_path()); + parent_path = fifthgrid::utils::path::get_parent_path(path->get_path()); } [[maybe_unused]] auto removed = path->remove(); @@ -41,7 +41,7 @@ static void delete_generated_files() { if (parent_path.has_value()) { EXPECT_TRUE( - repertory::utils::file::directory(*parent_path).remove_recursively()); + fifthgrid::utils::file::directory(*parent_path).remove_recursively()); } } @@ -52,7 +52,7 @@ struct file_deleter final { static auto deleter{std::make_unique()}; } // namespace -namespace repertory::test { +namespace fifthgrid::test { #if defined(PROJECT_ENABLE_LIBSODIUM) auto create_random_file(std::size_t size) -> utils::file::i_file & { recur_mutex_lock lock{file_mtx}; @@ -134,4 +134,4 @@ auto get_test_output_dir() -> std::string { return test_path; } -} // namespace repertory::test +} // namespace fifthgrid::test diff --git a/support/test/src/utils/collection_test.cpp b/support/test/src/utils/collection_test.cpp index 39d85bb5..fcc0927d 100644 --- a/support/test/src/utils/collection_test.cpp +++ b/support/test/src/utils/collection_test.cpp @@ -21,7 +21,7 @@ */ #include "test.hpp" -namespace repertory { +namespace fifthgrid { TEST(utils_collection, excludes) { auto data = {"cow", "moose", "dog", "chicken"}; EXPECT_FALSE(utils::collection::excludes(data, "chicken")); @@ -247,4 +247,4 @@ TEST(utils_collection, remove_element) { EXPECT_EQ(static_cast(0xEE), col.at(1U)); } } -} // namespace repertory +} // namespace fifthgrid diff --git a/support/test/src/utils/common_test.cpp b/support/test/src/utils/common_test.cpp index f07eabb3..451ae98c 100644 --- a/support/test/src/utils/common_test.cpp +++ b/support/test/src/utils/common_test.cpp @@ -21,7 +21,7 @@ */ #include "test.hpp" -namespace repertory { +namespace fifthgrid { TEST(utils_common, calculate_read_size) { auto read_size = utils::calculate_read_size(0U, 0U, 0U); EXPECT_EQ(0U, read_size); @@ -273,7 +273,7 @@ TEST(utils_common, get_environment_variable) { std::string path; #if defined(_WIN32) - path.resize(repertory::max_path_length + 1U); + path.resize(fifthgrid::max_path_length + 1U); auto size = ::GetEnvironmentVariableA(path_env.c_str(), path.data(), 0U); path.resize(size); @@ -305,4 +305,4 @@ TEST(utils_common, get_next_available_port_fails_if_starting_point_is_zero) { EXPECT_EQ(0U, available_port); } #endif // defined(PROJECT_ENABLE_BOOST) -} // namespace repertory +} // namespace fifthgrid diff --git a/support/test/src/utils/encrypting_reader_test.cpp b/support/test/src/utils/encrypting_reader_test.cpp index 078dba8a..e1c4643e 100644 --- a/support/test/src/utils/encrypting_reader_test.cpp +++ b/support/test/src/utils/encrypting_reader_test.cpp @@ -23,7 +23,7 @@ #if defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST) -namespace repertory { +namespace fifthgrid { TEST(utils_encrypting_reader, read_file_data) { const auto token = std::string("moose"); auto &source_file = test::create_random_file( @@ -220,6 +220,6 @@ TEST(utils_encrypting_reader, read_file_data_in_multiple_chunks_as_stream) { } } } -} // namespace repertory +} // namespace fifthgrid #endif // defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST) diff --git a/support/test/src/utils/encryption_test.cpp b/support/test/src/utils/encryption_test.cpp index 6a0e1913..8a03815d 100644 --- a/support/test/src/utils/encryption_test.cpp +++ b/support/test/src/utils/encryption_test.cpp @@ -23,7 +23,7 @@ #if defined(PROJECT_ENABLE_LIBSODIUM) -namespace repertory { +namespace fifthgrid { static constexpr const std::string_view token{"moose"}; static constexpr const std::wstring_view token_w{L"moose"}; @@ -278,6 +278,6 @@ TEST(utils_encryption, decrypt_file_path) { } } #endif // defined(PROJECT_ENABLE_BOOST) -} // namespace repertory +} // namespace fifthgrid #endif // defined(PROJECT_ENABLE_LIBSODIUM) diff --git a/support/test/src/utils/error_test.cpp b/support/test/src/utils/error_test.cpp index ccb710cb..a31a26f6 100644 --- a/support/test/src/utils/error_test.cpp +++ b/support/test/src/utils/error_test.cpp @@ -21,7 +21,7 @@ */ #include "test.hpp" -namespace repertory { +namespace fifthgrid { template constexpr bool is_decay_equ = std::is_same_v, U>; @@ -63,4 +63,4 @@ TEST(utils_error, can_override_exception_handler) { utils::error::set_exception_handler(&utils::error::default_exception_handler); } -} // namespace repertory +} // namespace fifthgrid diff --git a/support/test/src/utils/file_test.cpp b/support/test/src/utils/file_test.cpp index 330898b6..159b9f65 100644 --- a/support/test/src/utils/file_test.cpp +++ b/support/test/src/utils/file_test.cpp @@ -25,7 +25,7 @@ namespace { static constexpr const auto file_type_count{1U}; } -namespace repertory { +namespace fifthgrid { TEST(utils_file, can_create_file) { for (auto idx = 0U; idx < file_type_count; ++idx) { auto path = test::generate_test_file_name("utils_file"); @@ -300,4 +300,4 @@ TEST(util_file, file_exists_in_path) { utils::string::from_utf8(test_dir.get_path()), L"moose.txt")); } } -} // namespace repertory +} // namespace fifthgrid diff --git a/support/test/src/utils/hash_test.cpp b/support/test/src/utils/hash_test.cpp index 13287bbd..c3f47d72 100644 --- a/support/test/src/utils/hash_test.cpp +++ b/support/test/src/utils/hash_test.cpp @@ -23,7 +23,7 @@ #if defined(PROJECT_ENABLE_LIBSODIUM) -namespace repertory { +namespace fifthgrid { TEST(utils_hash, hash_type_sizes) { EXPECT_EQ(32U, utils::encryption::hash_256_t{}.size()); EXPECT_EQ(48U, utils::encryption::hash_384_t{}.size()); @@ -181,6 +181,6 @@ TEST(utils_hash, sha512) { "5ac3bcc80844b7d50b1cc6603444bbe7cfcf8fc0aa1ee3c636d9e339", hash.c_str()); } -} // namespace repertory +} // namespace fifthgrid #endif // defined(PROJECT_ENABLE_LIBSODIUM) diff --git a/support/test/src/utils/path_test.cpp b/support/test/src/utils/path_test.cpp index fff28838..57a6b91f 100644 --- a/support/test/src/utils/path_test.cpp +++ b/support/test/src/utils/path_test.cpp @@ -25,27 +25,27 @@ namespace { static const auto test_path = [](std::string str) -> std::string { #if defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES) - if (repertory::utils::string::begins_with(str, "\\")) { - str = repertory::utils::string::to_lower( + if (fifthgrid::utils::string::begins_with(str, "\\")) { + str = fifthgrid::utils::string::to_lower( std::filesystem::current_path().string().substr(0U, 2U)) + str; } - str = std::string{repertory::utils::path::long_notation} + str; + str = std::string{fifthgrid::utils::path::long_notation} + str; #else // !defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES) - if (repertory::utils::string::begins_with(str, "\\")) { - str = repertory::utils::string::to_lower( + if (fifthgrid::utils::string::begins_with(str, "\\")) { + str = fifthgrid::utils::string::to_lower( std::filesystem::current_path().string().substr(0U, 2U)) + str; } #endif // defined(PROJECT_ENABLE_WIN32_LONG_PATH_NAMES) - return repertory::utils::string::right_trim(str, '\\'); + return fifthgrid::utils::string::right_trim(str, '\\'); }; } // namespace #endif // defined(_WIN32) -namespace repertory { +namespace fifthgrid { TEST(utils_path, constants) { EXPECT_EQ(std::string_view{"\\"}, utils::path::backslash); EXPECT_EQ(std::wstring_view{L"\\"}, utils::path::backslash_w); @@ -400,7 +400,7 @@ TEST(utils_path, absolute_can_resolve_path_variables) { std::string home{}; #if defined(_WIN32) - home.resize(repertory::max_path_length + 1U); + home.resize(fifthgrid::max_path_length + 1U); auto size = ::GetEnvironmentVariableA("USERPROFILE", home.data(), 0U); home.resize(size); @@ -546,4 +546,4 @@ TEST(utils_path, does_not_contain_trash_directory) { } #endif // defined(_WIN32) } -} // namespace repertory +} // namespace fifthgrid diff --git a/support/test/src/utils/string_test.cpp b/support/test/src/utils/string_test.cpp index f25bc9d6..023dbe65 100644 --- a/support/test/src/utils/string_test.cpp +++ b/support/test/src/utils/string_test.cpp @@ -21,7 +21,7 @@ */ #include "test.hpp" -namespace repertory { +namespace fifthgrid { TEST(utils_string, begins_with) { std::string str{"moose"}; EXPECT_TRUE(utils::string::begins_with(str, "m")); @@ -134,4 +134,4 @@ TEST(utils_string, to_bool) { EXPECT_FALSE(utils::string::to_bool("0")); EXPECT_FALSE(utils::string::to_bool("00000.00000")); } -} // namespace repertory +} // namespace fifthgrid