From 3dc8fcc6fc97b19eaa145586c4f745c9c5c97fac Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 27 Oct 2023 14:32:44 -0700 Subject: [PATCH] Always use rather than . This ensures the StringMakers in util.h are always available for better console output. --- .clang-format | 2 ++ include/vcpkg-test/util.h | 6 ++++++ src/vcpkg-test/archives.cpp | 2 +- src/vcpkg-test/arguments.cpp | 2 +- src/vcpkg-test/binarycaching.cpp | 4 +--- src/vcpkg-test/bundlesettings.cpp | 2 +- src/vcpkg-test/cache.cpp | 2 +- src/vcpkg-test/catch.cpp | 2 +- src/vcpkg-test/cgroup-parser.cpp | 2 +- src/vcpkg-test/chrono.cpp | 2 +- src/vcpkg-test/ci-baseline.cpp | 4 +--- src/vcpkg-test/cmd-parser.cpp | 2 +- src/vcpkg-test/coffilereader.cpp | 2 +- src/vcpkg-test/commands.dependinfo.cpp | 2 +- src/vcpkg-test/commands.export.cpp | 2 +- src/vcpkg-test/commands.extract.cpp | 4 +--- src/vcpkg-test/commands.install.cpp | 2 +- src/vcpkg-test/configmetadata.cpp | 4 +--- src/vcpkg-test/configparser.cpp | 4 +--- src/vcpkg-test/dependencies.cpp | 3 +-- src/vcpkg-test/dependinfo-graphs.cpp | 2 +- src/vcpkg-test/downloads.cpp | 2 +- src/vcpkg-test/expected.cpp | 2 +- src/vcpkg-test/files.cpp | 4 +--- src/vcpkg-test/git.parse.cpp | 2 +- src/vcpkg-test/hash.cpp | 2 +- src/vcpkg-test/integrate.cpp | 2 +- src/vcpkg-test/json.cpp | 2 +- src/vcpkg-test/manifests.cpp | 4 +--- src/vcpkg-test/messages.cpp | 2 +- src/vcpkg-test/metrics.cpp | 2 +- src/vcpkg-test/new.cpp | 2 +- src/vcpkg-test/optional.cpp | 2 +- src/vcpkg-test/paragraph.cpp | 4 +--- src/vcpkg-test/plan.cpp | 3 +-- src/vcpkg-test/registries.cpp | 2 +- src/vcpkg-test/spdx.cpp | 4 ++-- src/vcpkg-test/specifier.cpp | 4 +--- src/vcpkg-test/statusparagraphs.cpp | 4 +--- src/vcpkg-test/strings.cpp | 2 +- src/vcpkg-test/stringview.cpp | 2 +- src/vcpkg-test/system.cpp | 2 +- src/vcpkg-test/system.mac.cpp | 2 +- src/vcpkg-test/system.process.cpp | 2 +- src/vcpkg-test/tools.cpp | 4 +--- src/vcpkg-test/uint128.cpp | 2 +- src/vcpkg-test/update.cpp | 4 +--- src/vcpkg-test/util-tests.cpp | 2 +- src/vcpkg-test/util.cpp | 4 +--- src/vcpkg-test/versionplan.cpp | 3 +-- src/vcpkg-test/xunitwriter.cpp | 2 +- 51 files changed, 58 insertions(+), 79 deletions(-) diff --git a/.clang-format b/.clang-format index e59f067eed..37bee87847 100644 --- a/.clang-format +++ b/.clang-format @@ -59,6 +59,8 @@ IncludeCategories: Priority: -1 - Regex: '^$' Priority: 1 + - Regex: '^$' + Priority: 1 - Regex: '^$' Priority: 2 - Regex: '^$' diff --git a/include/vcpkg-test/util.h b/include/vcpkg-test/util.h index 507648b62a..85487cfcfe 100644 --- a/include/vcpkg-test/util.h +++ b/include/vcpkg-test/util.h @@ -84,6 +84,12 @@ namespace Catch return "{\"" + value.first.native() + "\", \"" + value.second.native() + "\"}"; } }; + + template<> + struct StringMaker + { + static const std::string convert(const vcpkg::Version& value) { return value.to_string(); } + }; } namespace vcpkg diff --git a/src/vcpkg-test/archives.cpp b/src/vcpkg-test/archives.cpp index 8ef4c443c0..905a46521e 100644 --- a/src/vcpkg-test/archives.cpp +++ b/src/vcpkg-test/archives.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/arguments.cpp b/src/vcpkg-test/arguments.cpp index e53688a327..3c1abd7483 100644 --- a/src/vcpkg-test/arguments.cpp +++ b/src/vcpkg-test/arguments.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/binarycaching.cpp b/src/vcpkg-test/binarycaching.cpp index e49924d4a2..0532d26d9e 100644 --- a/src/vcpkg-test/binarycaching.cpp +++ b/src/vcpkg-test/binarycaching.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -13,8 +13,6 @@ #include -#include - using namespace vcpkg; struct KnowNothingBinaryProvider : IReadBinaryProvider diff --git a/src/vcpkg-test/bundlesettings.cpp b/src/vcpkg-test/bundlesettings.cpp index 9db43c00ae..9009be614d 100644 --- a/src/vcpkg-test/bundlesettings.cpp +++ b/src/vcpkg-test/bundlesettings.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/cache.cpp b/src/vcpkg-test/cache.cpp index ba5b31262b..d11f454aee 100644 --- a/src/vcpkg-test/cache.cpp +++ b/src/vcpkg-test/cache.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/catch.cpp b/src/vcpkg-test/catch.cpp index b2e1e0aed5..0cf4eb0bc3 100644 --- a/src/vcpkg-test/catch.cpp +++ b/src/vcpkg-test/catch.cpp @@ -1,5 +1,5 @@ #define CATCH_CONFIG_RUNNER -#include +#include #include #include diff --git a/src/vcpkg-test/cgroup-parser.cpp b/src/vcpkg-test/cgroup-parser.cpp index 466b38d995..5bbeaa7fda 100644 --- a/src/vcpkg-test/cgroup-parser.cpp +++ b/src/vcpkg-test/cgroup-parser.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/chrono.cpp b/src/vcpkg-test/chrono.cpp index 37c2f367e7..c461850348 100644 --- a/src/vcpkg-test/chrono.cpp +++ b/src/vcpkg-test/chrono.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/ci-baseline.cpp b/src/vcpkg-test/ci-baseline.cpp index 07cd62de3c..32a038b5a4 100644 --- a/src/vcpkg-test/ci-baseline.cpp +++ b/src/vcpkg-test/ci-baseline.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -10,8 +10,6 @@ #include #include -#include - using namespace vcpkg; namespace vcpkg diff --git a/src/vcpkg-test/cmd-parser.cpp b/src/vcpkg-test/cmd-parser.cpp index c1ff1cf9cc..14a45fc735 100644 --- a/src/vcpkg-test/cmd-parser.cpp +++ b/src/vcpkg-test/cmd-parser.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/coffilereader.cpp b/src/vcpkg-test/coffilereader.cpp index 4dfda982ad..1fbfefbb20 100644 --- a/src/vcpkg-test/coffilereader.cpp +++ b/src/vcpkg-test/coffilereader.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/commands.dependinfo.cpp b/src/vcpkg-test/commands.dependinfo.cpp index 70d0b305d7..440d7d795a 100644 --- a/src/vcpkg-test/commands.dependinfo.cpp +++ b/src/vcpkg-test/commands.dependinfo.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/commands.export.cpp b/src/vcpkg-test/commands.export.cpp index e713caddce..9ff85b155e 100644 --- a/src/vcpkg-test/commands.export.cpp +++ b/src/vcpkg-test/commands.export.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/commands.extract.cpp b/src/vcpkg-test/commands.extract.cpp index eb1e2abb76..fbeae95516 100644 --- a/src/vcpkg-test/commands.extract.cpp +++ b/src/vcpkg-test/commands.extract.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -8,8 +8,6 @@ #include -#include - using namespace vcpkg; #if defined(_WIN32) diff --git a/src/vcpkg-test/commands.install.cpp b/src/vcpkg-test/commands.install.cpp index 5a39c8a793..62fa949c2b 100644 --- a/src/vcpkg-test/commands.install.cpp +++ b/src/vcpkg-test/commands.install.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/configmetadata.cpp b/src/vcpkg-test/configmetadata.cpp index 4d1adcfab7..b794cb2deb 100644 --- a/src/vcpkg-test/configmetadata.cpp +++ b/src/vcpkg-test/configmetadata.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -7,8 +7,6 @@ #include #include -#include - using namespace vcpkg; static constexpr StringLiteral KIND = "kind"; diff --git a/src/vcpkg-test/configparser.cpp b/src/vcpkg-test/configparser.cpp index 9ea3c75da4..05cc8470ee 100644 --- a/src/vcpkg-test/configparser.cpp +++ b/src/vcpkg-test/configparser.cpp @@ -1,11 +1,9 @@ -#include +#include #include #include -#include - using namespace vcpkg; #if defined(_WIN32) diff --git a/src/vcpkg-test/dependencies.cpp b/src/vcpkg-test/dependencies.cpp index 01a36d6d46..0201138489 100644 --- a/src/vcpkg-test/dependencies.cpp +++ b/src/vcpkg-test/dependencies.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -17,7 +17,6 @@ #include #include -#include using namespace vcpkg; diff --git a/src/vcpkg-test/dependinfo-graphs.cpp b/src/vcpkg-test/dependinfo-graphs.cpp index 0be38783f5..3356d4af96 100644 --- a/src/vcpkg-test/dependinfo-graphs.cpp +++ b/src/vcpkg-test/dependinfo-graphs.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/downloads.cpp b/src/vcpkg-test/downloads.cpp index f510aa4e7a..a3b2f9fd0a 100644 --- a/src/vcpkg-test/downloads.cpp +++ b/src/vcpkg-test/downloads.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/expected.cpp b/src/vcpkg-test/expected.cpp index 1b5440660f..d0d08c1232 100644 --- a/src/vcpkg-test/expected.cpp +++ b/src/vcpkg-test/expected.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/files.cpp b/src/vcpkg-test/files.cpp index 1e6fe160b1..08d5affb5e 100644 --- a/src/vcpkg-test/files.cpp +++ b/src/vcpkg-test/files.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include @@ -9,8 +9,6 @@ #include #include -#include - #if !defined(_WIN32) #include #endif // ^^^ !_WIN32 diff --git a/src/vcpkg-test/git.parse.cpp b/src/vcpkg-test/git.parse.cpp index 7b76206565..9753cd9b00 100644 --- a/src/vcpkg-test/git.parse.cpp +++ b/src/vcpkg-test/git.parse.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/hash.cpp b/src/vcpkg-test/hash.cpp index 0a2c30d87b..3e26b7fd8b 100644 --- a/src/vcpkg-test/hash.cpp +++ b/src/vcpkg-test/hash.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/integrate.cpp b/src/vcpkg-test/integrate.cpp index d2d5e08252..e9cd429a57 100644 --- a/src/vcpkg-test/integrate.cpp +++ b/src/vcpkg-test/integrate.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/json.cpp b/src/vcpkg-test/json.cpp index 66b11105d2..854cbdef54 100644 --- a/src/vcpkg-test/json.cpp +++ b/src/vcpkg-test/json.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/manifests.cpp b/src/vcpkg-test/manifests.cpp index 8f382aff0f..5b3547b523 100644 --- a/src/vcpkg-test/manifests.cpp +++ b/src/vcpkg-test/manifests.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -10,8 +10,6 @@ #include #include -#include - using namespace vcpkg; using namespace vcpkg::Paragraphs; using namespace vcpkg::Test; diff --git a/src/vcpkg-test/messages.cpp b/src/vcpkg-test/messages.cpp index b774ce6e42..3171bbce27 100644 --- a/src/vcpkg-test/messages.cpp +++ b/src/vcpkg-test/messages.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/metrics.cpp b/src/vcpkg-test/metrics.cpp index 2011349302..309abee672 100644 --- a/src/vcpkg-test/metrics.cpp +++ b/src/vcpkg-test/metrics.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/new.cpp b/src/vcpkg-test/new.cpp index 0254af66f8..9155f8a2ee 100644 --- a/src/vcpkg-test/new.cpp +++ b/src/vcpkg-test/new.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/optional.cpp b/src/vcpkg-test/optional.cpp index fa1bd15561..88c3211001 100644 --- a/src/vcpkg-test/optional.cpp +++ b/src/vcpkg-test/optional.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/paragraph.cpp b/src/vcpkg-test/paragraph.cpp index 90084cc95f..cf60cbeb13 100644 --- a/src/vcpkg-test/paragraph.cpp +++ b/src/vcpkg-test/paragraph.cpp @@ -1,11 +1,9 @@ -#include +#include #include #include -#include - namespace Strings = vcpkg::Strings; using vcpkg::Paragraph; diff --git a/src/vcpkg-test/plan.cpp b/src/vcpkg-test/plan.cpp index f5e9759d1f..0f2cc8c6b3 100644 --- a/src/vcpkg-test/plan.cpp +++ b/src/vcpkg-test/plan.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -12,7 +12,6 @@ #include #include -#include using namespace vcpkg; diff --git a/src/vcpkg-test/registries.cpp b/src/vcpkg-test/registries.cpp index c4f9830503..0b4dfdd386 100644 --- a/src/vcpkg-test/registries.cpp +++ b/src/vcpkg-test/registries.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/spdx.cpp b/src/vcpkg-test/spdx.cpp index 937dcda4a8..7250181a05 100644 --- a/src/vcpkg-test/spdx.cpp +++ b/src/vcpkg-test/spdx.cpp @@ -1,8 +1,8 @@ +#include + #include #include -#include - using namespace vcpkg; TEST_CASE ("spdx maximum serialization", "[spdx]") diff --git a/src/vcpkg-test/specifier.cpp b/src/vcpkg-test/specifier.cpp index 06db33fbd9..7574692393 100644 --- a/src/vcpkg-test/specifier.cpp +++ b/src/vcpkg-test/specifier.cpp @@ -1,11 +1,9 @@ -#include +#include #include #include -#include - using namespace vcpkg; TEST_CASE ("specifier conversion", "[specifier]") diff --git a/src/vcpkg-test/statusparagraphs.cpp b/src/vcpkg-test/statusparagraphs.cpp index f647484e60..30a96820ef 100644 --- a/src/vcpkg-test/statusparagraphs.cpp +++ b/src/vcpkg-test/statusparagraphs.cpp @@ -1,12 +1,10 @@ -#include +#include #include #include #include -#include - using namespace vcpkg; using namespace vcpkg::Paragraphs; using namespace vcpkg::Test; diff --git a/src/vcpkg-test/strings.cpp b/src/vcpkg-test/strings.cpp index 37494191c0..14ff010fec 100644 --- a/src/vcpkg-test/strings.cpp +++ b/src/vcpkg-test/strings.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/stringview.cpp b/src/vcpkg-test/stringview.cpp index 7ea56085d1..ca85db9af3 100644 --- a/src/vcpkg-test/stringview.cpp +++ b/src/vcpkg-test/stringview.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/system.cpp b/src/vcpkg-test/system.cpp index a25c09aeab..f10bf65c32 100644 --- a/src/vcpkg-test/system.cpp +++ b/src/vcpkg-test/system.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include diff --git a/src/vcpkg-test/system.mac.cpp b/src/vcpkg-test/system.mac.cpp index 227c3218f5..938de0dbe3 100644 --- a/src/vcpkg-test/system.mac.cpp +++ b/src/vcpkg-test/system.mac.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/system.process.cpp b/src/vcpkg-test/system.process.cpp index 997580b036..bce6c2d050 100644 --- a/src/vcpkg-test/system.process.cpp +++ b/src/vcpkg-test/system.process.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/vcpkg-test/tools.cpp b/src/vcpkg-test/tools.cpp index b52aaced5c..434e0d674f 100644 --- a/src/vcpkg-test/tools.cpp +++ b/src/vcpkg-test/tools.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -7,8 +7,6 @@ #include -#include - using namespace vcpkg; TEST_CASE ("parse_tool_version_string", "[tools]") diff --git a/src/vcpkg-test/uint128.cpp b/src/vcpkg-test/uint128.cpp index a13b25e4f9..700c26f030 100644 --- a/src/vcpkg-test/uint128.cpp +++ b/src/vcpkg-test/uint128.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/update.cpp b/src/vcpkg-test/update.cpp index 3e7194b8d9..f2cd0f1cb1 100644 --- a/src/vcpkg-test/update.cpp +++ b/src/vcpkg-test/update.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -6,8 +6,6 @@ #include #include -#include - using namespace vcpkg; using namespace vcpkg::Test; diff --git a/src/vcpkg-test/util-tests.cpp b/src/vcpkg-test/util-tests.cpp index b852994708..c8a3ecba78 100644 --- a/src/vcpkg-test/util-tests.cpp +++ b/src/vcpkg-test/util-tests.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/vcpkg-test/util.cpp b/src/vcpkg-test/util.cpp index 5c6f56da7b..b2f5de1909 100644 --- a/src/vcpkg-test/util.cpp +++ b/src/vcpkg-test/util.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -15,8 +15,6 @@ #include #include -#include - namespace vcpkg::Test { const Triplet ARM64_WINDOWS = Triplet::from_canonical_name("arm64-windows"); diff --git a/src/vcpkg-test/versionplan.cpp b/src/vcpkg-test/versionplan.cpp index a7d2d5fcaf..a5245866c1 100644 --- a/src/vcpkg-test/versionplan.cpp +++ b/src/vcpkg-test/versionplan.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -6,7 +6,6 @@ #include #include -#include using namespace vcpkg; diff --git a/src/vcpkg-test/xunitwriter.cpp b/src/vcpkg-test/xunitwriter.cpp index da3b97a4df..6358be980e 100644 --- a/src/vcpkg-test/xunitwriter.cpp +++ b/src/vcpkg-test/xunitwriter.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include