@@ -24,7 +24,7 @@ public: | |||
shared_compile_file_rules() = default; | |||
auto clone() const noexcept { | |||
auto cp = *this; | |||
auto cp = *this; | |||
cp._impl = std::make_shared<rules_impl>(*_impl); | |||
return cp; | |||
} |
@@ -4,4 +4,4 @@ namespace dds::detail { | |||
extern const char* const catch2_embedded_single_header_str; | |||
} // namespace dds::detail | |||
} // namespace dds::detail |
@@ -42,8 +42,7 @@ package_manifest package_manifest::load_from_file(const fs::path& fpath) { | |||
} else if (test_driver_str == "Catch") { | |||
ret.test_driver = test_lib::catch_; | |||
} else { | |||
throw std::runtime_error( | |||
fmt::format("Unknown 'Test-Driver': '{}'", test_driver_str)); | |||
throw std::runtime_error(fmt::format("Unknown 'Test-Driver': '{}'", test_driver_str)); | |||
} | |||
} | |||
@@ -4,8 +4,8 @@ | |||
#include <dds/sdist.hpp> | |||
#include <dds/temp.hpp> | |||
#include <semver/version.hpp> | |||
#include <libman/library.hpp> | |||
#include <semver/version.hpp> | |||
#include <set> | |||
#include <string> |
@@ -57,7 +57,7 @@ void repository::_init_repo_dir(path_ref dirpath) noexcept { fs::create_director | |||
fs::path repository::default_local_path() noexcept { return dds_data_dir() / "repo"; } | |||
repository repository::_open_for_directory(bool writeable, path_ref dirpath) { | |||
sdist_set entries = load_sdists(dirpath) | to<sdist_set>(); | |||
sdist_set entries = load_sdists(dirpath) | to<sdist_set>(); | |||
return {writeable, dirpath, std::move(entries)}; | |||
} | |||
@@ -16,8 +16,8 @@ struct sdist_params { | |||
}; | |||
struct sdist { | |||
package_manifest manifest; | |||
fs::path path; | |||
package_manifest manifest; | |||
fs::path path; | |||
sdist(package_manifest man, path_ref path_) | |||
: manifest(std::move(man)) |
@@ -501,12 +501,12 @@ toolchain dds::parse_toolchain_dds(const lm::pair_list& pairs, strv context) { | |||
ret = {get_compiler(language::cxx), "/nologo", "/EHsc", "<IN>", "/Fe<OUT>"}; | |||
} else if (is_gnu_like) { | |||
ret = {get_compiler(language::cxx), | |||
"-fPIC", | |||
"-fdiagnostics-color", | |||
"<IN>", | |||
"-pthread", | |||
"-lstdc++fs", | |||
"-o<OUT>"}; | |||
"-fPIC", | |||
"-fdiagnostics-color", | |||
"<IN>", | |||
"-pthread", | |||
"-lstdc++fs", | |||
"-o<OUT>"}; | |||
} else { | |||
assert(false && "No link-exe command"); | |||
std::terminate(); |
@@ -12,7 +12,7 @@ void check_tc_compile(std::string_view tc_content, | |||
std::string_view expected_compile_warnings, | |||
std::string_view expected_ar, | |||
std::string_view expected_exe) { | |||
auto tc = dds::parse_toolchain_dds(tc_content); | |||
auto tc = dds::parse_toolchain_dds(tc_content); | |||
dds::compile_file_spec cf; | |||
cf.source_path = "foo.cpp"; |
@@ -4,7 +4,8 @@ | |||
#define CHECK_SHLEX(str, ...) \ | |||
do { \ | |||
INFO("Shell-lexing string: '" << str << "'"); CHECK(dds::split_shell_string(str) == std::vector<std::string>(__VA_ARGS__)); \ | |||
INFO("Shell-lexing string: '" << str << "'"); \ | |||
CHECK(dds::split_shell_string(str) == std::vector<std::string>(__VA_ARGS__)); \ | |||
} while (0) | |||
TEST_CASE("Shell lexer") { |
@@ -31,20 +31,20 @@ TEST_CASE("ends_with") { | |||
CHECK(!ends_with("foo.bar", "foo")); | |||
} | |||
TEST_CASE( "trim" ) { | |||
TEST_CASE("trim") { | |||
CHECK(trim_view("foo") == "foo"); | |||
CHECK(trim_view("foo ") == "foo"); | |||
CHECK(trim_view(" ").size() == 0); | |||
} | |||
TEST_CASE( "contains" ) { | |||
TEST_CASE("contains") { | |||
CHECK(contains("foo", "foo")); | |||
CHECK(contains("foo", "")); | |||
CHECK(contains("foo", "o")); | |||
CHECK(!contains("foo", "bar")); | |||
} | |||
TEST_CASE( "split" ) { | |||
TEST_CASE("split") { | |||
CHECK_SPLIT("foo.bar", ".", {"foo", "bar"}); | |||
CHECK_SPLIT("foo.bar.baz", ".", {"foo", "bar", "baz"}); | |||
CHECK_SPLIT(".", ".", {"", ""}); |