ソースを参照

Formatting

default_compile_flags
vector-of-bool 5年前
コミット
810c0a69a3
10個のファイルの変更19行の追加19行の削除
  1. +1
    -1
      src/dds/build/plan/compile_file.hpp
  2. +1
    -1
      src/dds/catch2_embedded.hpp
  3. +1
    -2
      src/dds/package_manifest.cpp
  4. +1
    -1
      src/dds/repo/remote.hpp
  5. +1
    -1
      src/dds/repo/repo.cpp
  6. +2
    -2
      src/dds/sdist.hpp
  7. +6
    -6
      src/dds/toolchain/from_dds.cpp
  8. +1
    -1
      src/dds/toolchain/from_dds.test.cpp
  9. +2
    -1
      src/dds/toolchain/toolchain.test.cpp
  10. +3
    -3
      src/dds/util/string.test.cpp

+ 1
- 1
src/dds/build/plan/compile_file.hpp ファイルの表示

@@ -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;
}

+ 1
- 1
src/dds/catch2_embedded.hpp ファイルの表示

@@ -4,4 +4,4 @@ namespace dds::detail {

extern const char* const catch2_embedded_single_header_str;

} // namespace dds::detail
} // namespace dds::detail

+ 1
- 2
src/dds/package_manifest.cpp ファイルの表示

@@ -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));
}
}


+ 1
- 1
src/dds/repo/remote.hpp ファイルの表示

@@ -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>

+ 1
- 1
src/dds/repo/repo.cpp ファイルの表示

@@ -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)};
}


+ 2
- 2
src/dds/sdist.hpp ファイルの表示

@@ -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))

+ 6
- 6
src/dds/toolchain/from_dds.cpp ファイルの表示

@@ -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();

+ 1
- 1
src/dds/toolchain/from_dds.test.cpp ファイルの表示

@@ -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";

+ 2
- 1
src/dds/toolchain/toolchain.test.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") {

+ 3
- 3
src/dds/util/string.test.cpp ファイルの表示

@@ -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(".", ".", {"", ""});

読み込み中…
キャンセル
保存