updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit

This commit is contained in:
2024-08-02 17:18:09 -05:00
parent e7b576bc45
commit dd492ff52d
5 changed files with 45 additions and 6 deletions

View File

@@ -22,6 +22,7 @@
#include "gtest/gtest.h"
#include "utils/path.hpp"
#include "utils/string.hpp"
namespace repertory {
TEST(utils_path, constants) {
@@ -39,16 +40,41 @@ TEST(utils_path, directory_seperator) {
#if defined(_WIN32)
EXPECT_EQ(utils::path::backslash, utils::path::directory_seperator);
EXPECT_EQ(utils::path::backslash_w, utils::path::directory_seperator_w);
EXPECT_EQ(utils::path::slash, utils::path::not_directory_seperator);
EXPECT_EQ(utils::path::slash_w, utils::path::not_directory_seperator_w);
#else // !defined(_WIN32)
EXPECT_EQ(utils::path::slash, utils::path::directory_seperator);
EXPECT_EQ(utils::path::slash_w, utils::path::directory_seperator_w);
EXPECT_EQ(utils::path::backslash, utils::path::not_directory_seperator);
EXPECT_EQ(utils::path::backslash_w, utils::path::not_directory_seperator_w);
#endif // defined(_WIN32)
}
TEST(utils_path, get_directory_seperator) {
#if defined(_WIN32)
EXPECT_EQ(utils::path::backslash,
utils::path::get_directory_seperator<char>());
EXPECT_EQ(utils::path::backslash_w,
utils::path::get_directory_seperator<wchar_t>());
EXPECT_EQ(utils::path::slash,
utils::path::get_not_directory_seperator<char>());
EXPECT_EQ(utils::path::slash_w,
utils::path::get_not_directory_seperator<wchar_t>());
#else // !defined(_WIN32)
EXPECT_EQ(utils::path::slash, utils::path::get_directory_seperator<char>());
EXPECT_EQ(utils::path::slash_w,
utils::path::get_directory_seperator<wchar_t>());
EXPECT_EQ(utils::path::backslash,
utils::path::get_not_directory_seperator<char>());
EXPECT_EQ(utils::path::backslash_w,
utils::path::get_not_directory_seperator<wchar_t>());
#endif // defined(_WIN32)
}
TEST(utils_path, get_backslash) {
EXPECT_EQ(utils::path::backslash, utils::path::get_backslash<char>());
EXPECT_EQ(utils::path::backslash_w, utils::path::get_backslash<wchar_t>());
@@ -59,6 +85,16 @@ TEST(utils_path, get_dot) {
EXPECT_EQ(utils::path::dot_w, utils::path::get_dot<wchar_t>());
}
TEST(utils_path, get_dot_slash) {
EXPECT_EQ(utils::path::dot_slash, utils::path::get_dot_slash<char>());
EXPECT_EQ(utils::path::dot_slash_w, utils::path::get_dot_slash<wchar_t>());
}
TEST(utils_path, get_slash) {
EXPECT_EQ(utils::path::slash, utils::path::get_slash<char>());
EXPECT_EQ(utils::path::slash_w, utils::path::get_slash<wchar_t>());
}
TEST(utils_path, combine) {
auto s = utils::path::combine(R"(\test\path)", {});