diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2020-07-06 16:45:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-06 16:45:34 -0700 |
| commit | 6a41626eaf33d2f3392e06d98a94c630bfc30977 (patch) | |
| tree | fb92f59f27b99c56ed48f6cae649468b4407a073 /toolsrc/src/vcpkg-test | |
| parent | ae4968fad40e8c14541dae89c481ec32c0500426 (diff) | |
| download | vcpkg-6a41626eaf33d2f3392e06d98a94c630bfc30977.tar.gz vcpkg-6a41626eaf33d2f3392e06d98a94c630bfc30977.zip | |
[vcpkg] Format the C++ in CI (#11655)
* [vcpkg] Format the C++ in the CI
* format the C++
* CR
Diffstat (limited to 'toolsrc/src/vcpkg-test')
| -rw-r--r-- | toolsrc/src/vcpkg-test/arguments.cpp | 4 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/binarycaching.cpp | 12 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/binaryconfigparser.cpp | 1 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/commands.build.cpp | 5 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/commands.create.cpp | 5 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/dependencies.cpp | 1 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/files.cpp | 15 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/hash.cpp | 4 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/json.cpp | 7 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/manifests.cpp | 14 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/optional.cpp | 4 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/paragraph.cpp | 3 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/plan.cpp | 10 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/statusparagraphs.cpp | 2 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/strings.cpp | 7 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/stringview.cpp | 22 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/system.cpp | 6 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/uint128.cpp | 100 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/update.cpp | 3 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/util.cpp | 18 |
20 files changed, 131 insertions, 112 deletions
diff --git a/toolsrc/src/vcpkg-test/arguments.cpp b/toolsrc/src/vcpkg-test/arguments.cpp index 3ce4c5a9b..a40edc945 100644 --- a/toolsrc/src/vcpkg-test/arguments.cpp +++ b/toolsrc/src/vcpkg-test/arguments.cpp @@ -1,9 +1,9 @@ #include <catch2/catch.hpp> -#include <vcpkg/vcpkgcmdarguments.h> - #include <vector> +#include <vcpkg/vcpkgcmdarguments.h> + using vcpkg::CommandSetting; using vcpkg::CommandStructure; using vcpkg::CommandSwitch; diff --git a/toolsrc/src/vcpkg-test/binarycaching.cpp b/toolsrc/src/vcpkg-test/binarycaching.cpp index b220b5ccb..49386b529 100644 --- a/toolsrc/src/vcpkg-test/binarycaching.cpp +++ b/toolsrc/src/vcpkg-test/binarycaching.cpp @@ -1,12 +1,14 @@ #include <catch2/catch.hpp> -#include <vcpkg/binarycaching.private.h> -#include <vcpkg/binarycaching.h> + +#include <string> + #include <vcpkg/base/files.h> +#include <vcpkg/binarycaching.h> +#include <vcpkg/binarycaching.private.h> #include <vcpkg/dependencies.h> -#include <vcpkg/vcpkgcmdarguments.h> -#include <vcpkg/sourceparagraph.h> #include <vcpkg/paragraphs.h> -#include <string> +#include <vcpkg/sourceparagraph.h> +#include <vcpkg/vcpkgcmdarguments.h> using namespace vcpkg; diff --git a/toolsrc/src/vcpkg-test/binaryconfigparser.cpp b/toolsrc/src/vcpkg-test/binaryconfigparser.cpp index 11ed32900..1fd158446 100644 --- a/toolsrc/src/vcpkg-test/binaryconfigparser.cpp +++ b/toolsrc/src/vcpkg-test/binaryconfigparser.cpp @@ -1,4 +1,5 @@ #include <catch2/catch.hpp> + #include <vcpkg/binarycaching.h> using namespace vcpkg; diff --git a/toolsrc/src/vcpkg-test/commands.build.cpp b/toolsrc/src/vcpkg-test/commands.build.cpp index bc0dc5b4e..573d217e4 100644 --- a/toolsrc/src/vcpkg-test/commands.build.cpp +++ b/toolsrc/src/vcpkg-test/commands.build.cpp @@ -1,12 +1,13 @@ #include <catch2/catch.hpp> -#include <string> #include <iterator> +#include <string> + +#include <vcpkg-test/util.h> #include <vcpkg/base/files.h> #include <vcpkg/commands.h> #include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkgpaths.h> -#include <vcpkg-test/util.h> using namespace vcpkg; diff --git a/toolsrc/src/vcpkg-test/commands.create.cpp b/toolsrc/src/vcpkg-test/commands.create.cpp index 4a89d0799..345527cca 100644 --- a/toolsrc/src/vcpkg-test/commands.create.cpp +++ b/toolsrc/src/vcpkg-test/commands.create.cpp @@ -1,7 +1,8 @@ #include <catch2/catch.hpp> -#include <string> #include <iterator> +#include <string> + #include <vcpkg/base/files.h> #include <vcpkg/commands.h> #include <vcpkg/vcpkgcmdarguments.h> @@ -11,7 +12,7 @@ TEST_CASE ("create smoke test", "[commands-create]") { using namespace vcpkg; static const std::string argsRaw[] = {"create", "zlib2", "http://zlib.net/zlib-1.2.11.tar.gz", "zlib-1.2.11.zip"}; - + auto& fsWrapper = Files::get_real_filesystem(); VcpkgCmdArguments args = VcpkgCmdArguments::create_from_arg_sequence(std::begin(argsRaw), std::end(argsRaw)); VcpkgPaths paths(fsWrapper, args); diff --git a/toolsrc/src/vcpkg-test/dependencies.cpp b/toolsrc/src/vcpkg-test/dependencies.cpp index 4a4b1ac06..ad4fff9e4 100644 --- a/toolsrc/src/vcpkg-test/dependencies.cpp +++ b/toolsrc/src/vcpkg-test/dependencies.cpp @@ -1,4 +1,5 @@ #include <catch2/catch.hpp> + #include <vcpkg-test/mockcmakevarprovider.h> #include <vcpkg-test/util.h> #include <vcpkg/dependencies.h> diff --git a/toolsrc/src/vcpkg-test/files.cpp b/toolsrc/src/vcpkg-test/files.cpp index cbe1e81c3..0a8362a51 100644 --- a/toolsrc/src/vcpkg-test/files.cpp +++ b/toolsrc/src/vcpkg-test/files.cpp @@ -1,14 +1,13 @@ #include <catch2/catch.hpp> -#include <vcpkg-test/util.h> - -#include <vcpkg/base/files.h> -#include <vcpkg/base/strings.h> #include <iostream> #include <random> - #include <vector> +#include <vcpkg-test/util.h> +#include <vcpkg/base/files.h> +#include <vcpkg/base/strings.h> + using vcpkg::Test::AllowSymlinks; using vcpkg::Test::base_temporary_directory; using vcpkg::Test::can_create_symlinks; @@ -38,21 +37,21 @@ namespace struct MaxDepth { std::uint64_t i; - explicit MaxDepth(std::uint64_t i) : i(i) {} + explicit MaxDepth(std::uint64_t i) : i(i) { } operator uint64_t() const { return i; } }; struct Width { std::uint64_t i; - explicit Width(std::uint64_t i) : i(i) {} + explicit Width(std::uint64_t i) : i(i) { } operator uint64_t() const { return i; } }; struct CurrentDepth { std::uint64_t i; - explicit CurrentDepth(std::uint64_t i) : i(i) {} + explicit CurrentDepth(std::uint64_t i) : i(i) { } operator uint64_t() const { return i; } CurrentDepth incremented() const { return CurrentDepth{i + 1}; } }; diff --git a/toolsrc/src/vcpkg-test/hash.cpp b/toolsrc/src/vcpkg-test/hash.cpp index 9f3ccc25e..88c7bd7b0 100644 --- a/toolsrc/src/vcpkg-test/hash.cpp +++ b/toolsrc/src/vcpkg-test/hash.cpp @@ -1,12 +1,12 @@ #include <catch2/catch.hpp> -#include <vcpkg/base/hash.h> - #include <algorithm> #include <iostream> #include <iterator> #include <map> +#include <vcpkg/base/hash.h> + namespace Hash = vcpkg::Hash; using vcpkg::StringView; diff --git a/toolsrc/src/vcpkg-test/json.cpp b/toolsrc/src/vcpkg-test/json.cpp index 86335d468..19aaaa6fe 100644 --- a/toolsrc/src/vcpkg-test/json.cpp +++ b/toolsrc/src/vcpkg-test/json.cpp @@ -1,10 +1,10 @@ #include <catch2/catch.hpp> #include <iostream> -#include <vcpkg/base/json.h> -#include <vcpkg/base/unicode.h> #include "math.h" +#include <vcpkg/base/json.h> +#include <vcpkg/base/unicode.h> // TODO: remove this once we switch to C++20 completely // This is the worst, but we also can't really deal with it any other way. @@ -178,7 +178,8 @@ TEST_CASE ("JSON parse full file", "[json]") ; auto res = Json::parse(json); - if (!res) { + if (!res) + { std::cerr << res.error()->format() << '\n'; } REQUIRE(res); diff --git a/toolsrc/src/vcpkg-test/manifests.cpp b/toolsrc/src/vcpkg-test/manifests.cpp index a6c661301..bfe15cd2a 100644 --- a/toolsrc/src/vcpkg-test/manifests.cpp +++ b/toolsrc/src/vcpkg-test/manifests.cpp @@ -1,6 +1,6 @@ #include <catch2/catch.hpp> -#include <vcpkg-test/util.h> +#include <vcpkg-test/util.h> #include <vcpkg/base/json.h> #include <vcpkg/base/util.h> #include <vcpkg/paragraphs.h> @@ -108,9 +108,12 @@ TEST_CASE ("manifest construct maximum", "[manifests]") REQUIRE(pgh.feature_paragraphs[0]->dependencies[2].name == "order.white-lotus"); REQUIRE(pgh.feature_paragraphs[0]->dependencies[2].features.size() == 1); REQUIRE(pgh.feature_paragraphs[0]->dependencies[2].features[0] == "the-ancient-ways"); - REQUIRE_FALSE(pgh.feature_paragraphs[0]->dependencies[2].platform.evaluate({{"VCPKG_CMAKE_SYSTEM_NAME", ""}, {"VCPKG_TARGET_ARCHITECTURE", "arm"}})); - REQUIRE(pgh.feature_paragraphs[0]->dependencies[2].platform.evaluate({{"VCPKG_CMAKE_SYSTEM_NAME", ""}, {"VCPKG_TARGET_ARCHITECTURE", "x86"}})); - REQUIRE(pgh.feature_paragraphs[0]->dependencies[2].platform.evaluate({{"VCPKG_CMAKE_SYSTEM_NAME", "Linux"}, {"VCPKG_TARGET_ARCHITECTURE", "x86"}})); + REQUIRE_FALSE(pgh.feature_paragraphs[0]->dependencies[2].platform.evaluate( + {{"VCPKG_CMAKE_SYSTEM_NAME", ""}, {"VCPKG_TARGET_ARCHITECTURE", "arm"}})); + REQUIRE(pgh.feature_paragraphs[0]->dependencies[2].platform.evaluate( + {{"VCPKG_CMAKE_SYSTEM_NAME", ""}, {"VCPKG_TARGET_ARCHITECTURE", "x86"}})); + REQUIRE(pgh.feature_paragraphs[0]->dependencies[2].platform.evaluate( + {{"VCPKG_CMAKE_SYSTEM_NAME", "Linux"}, {"VCPKG_TARGET_ARCHITECTURE", "x86"}})); REQUIRE(pgh.feature_paragraphs[1]->name == "zuko"); REQUIRE(pgh.feature_paragraphs[1]->description.size() == 2); @@ -230,6 +233,7 @@ TEST_CASE ("SourceParagraph manifest empty supports", "[manifests]") "name": "a", "version-string": "1.0", "supports": "" - })json", true); + })json", + true); REQUIRE_FALSE(m_pgh.has_value()); } diff --git a/toolsrc/src/vcpkg-test/optional.cpp b/toolsrc/src/vcpkg-test/optional.cpp index c2348c5c6..f7b2770b8 100644 --- a/toolsrc/src/vcpkg-test/optional.cpp +++ b/toolsrc/src/vcpkg-test/optional.cpp @@ -1,7 +1,9 @@ #include <catch2/catch.hpp> -#include <vcpkg/base/optional.h> + #include <vector> +#include <vcpkg/base/optional.h> + namespace { struct identity_projection diff --git a/toolsrc/src/vcpkg-test/paragraph.cpp b/toolsrc/src/vcpkg-test/paragraph.cpp index 6c2103d5f..e4b2cf0e2 100644 --- a/toolsrc/src/vcpkg-test/paragraph.cpp +++ b/toolsrc/src/vcpkg-test/paragraph.cpp @@ -1,8 +1,7 @@ #include <catch2/catch.hpp> -#include <vcpkg-test/util.h> +#include <vcpkg-test/util.h> #include <vcpkg/base/strings.h> - #include <vcpkg/paragraphs.h> namespace Strings = vcpkg::Strings; diff --git a/toolsrc/src/vcpkg-test/plan.cpp b/toolsrc/src/vcpkg-test/plan.cpp index b93ec54ce..a6c9a54ec 100644 --- a/toolsrc/src/vcpkg-test/plan.cpp +++ b/toolsrc/src/vcpkg-test/plan.cpp @@ -1,17 +1,17 @@ #include <catch2/catch.hpp> + +#include <memory> +#include <unordered_map> +#include <vector> + #include <vcpkg-test/mockcmakevarprovider.h> #include <vcpkg-test/util.h> - #include <vcpkg/base/graphs.h> #include <vcpkg/dependencies.h> #include <vcpkg/portfileprovider.h> #include <vcpkg/sourceparagraph.h> #include <vcpkg/triplet.h> -#include <memory> -#include <unordered_map> -#include <vector> - using namespace vcpkg; using Test::make_control_file; diff --git a/toolsrc/src/vcpkg-test/statusparagraphs.cpp b/toolsrc/src/vcpkg-test/statusparagraphs.cpp index acb8b333c..f2d8ba37c 100644 --- a/toolsrc/src/vcpkg-test/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg-test/statusparagraphs.cpp @@ -1,6 +1,6 @@ #include <catch2/catch.hpp> -#include <vcpkg-test/util.h> +#include <vcpkg-test/util.h> #include <vcpkg/base/util.h> #include <vcpkg/paragraphs.h> #include <vcpkg/statusparagraphs.h> diff --git a/toolsrc/src/vcpkg-test/strings.cpp b/toolsrc/src/vcpkg-test/strings.cpp index 3172b557f..da3198976 100644 --- a/toolsrc/src/vcpkg-test/strings.cpp +++ b/toolsrc/src/vcpkg-test/strings.cpp @@ -1,11 +1,12 @@ #include <catch2/catch.hpp> -#include <vcpkg/base/strings.h> - #include <stdint.h> + +#include <string> #include <utility> #include <vector> -#include <string> + +#include <vcpkg/base/strings.h> TEST_CASE ("b32 encoding", "[strings]") { diff --git a/toolsrc/src/vcpkg-test/stringview.cpp b/toolsrc/src/vcpkg-test/stringview.cpp index 4df8e6be5..953a7de99 100644 --- a/toolsrc/src/vcpkg-test/stringview.cpp +++ b/toolsrc/src/vcpkg-test/stringview.cpp @@ -2,16 +2,18 @@ #include <vcpkg/base/stringview.h> -template <std::size_t N> -static vcpkg::StringView sv(const char (&cstr)[N]) { - return cstr; +template<std::size_t N> +static vcpkg::StringView sv(const char (&cstr)[N]) +{ + return cstr; } -TEST_CASE("string view operator==", "[stringview]") { - // these are due to a bug in operator== - // see commit 782723959399a1a0725ac49 - REQUIRE(sv("hey") != sv("heys")); - REQUIRE(sv("heys") != sv("hey")); - REQUIRE(sv("hey") == sv("hey")); - REQUIRE(sv("hey") != sv("hex")); +TEST_CASE ("string view operator==", "[stringview]") +{ + // these are due to a bug in operator== + // see commit 782723959399a1a0725ac49 + REQUIRE(sv("hey") != sv("heys")); + REQUIRE(sv("heys") != sv("hey")); + REQUIRE(sv("hey") == sv("hey")); + REQUIRE(sv("hey") != sv("hex")); } diff --git a/toolsrc/src/vcpkg-test/system.cpp b/toolsrc/src/vcpkg-test/system.cpp index 8b44f8f24..596b569a7 100644 --- a/toolsrc/src/vcpkg-test/system.cpp +++ b/toolsrc/src/vcpkg-test/system.cpp @@ -1,13 +1,15 @@ #include <vcpkg/base/system_headers.h> + #include <catch2/catch.hpp> #include <string> + #include <vcpkg/base/optional.h> -#include <vcpkg/base/stringview.h> -#include <vcpkg/base/zstringview.h> #include <vcpkg/base/strings.h> +#include <vcpkg/base/stringview.h> #include <vcpkg/base/system.h> #include <vcpkg/base/system.process.h> +#include <vcpkg/base/zstringview.h> using vcpkg::nullopt; using vcpkg::Optional; diff --git a/toolsrc/src/vcpkg-test/uint128.cpp b/toolsrc/src/vcpkg-test/uint128.cpp index 57d0169af..a13b25e4f 100644 --- a/toolsrc/src/vcpkg-test/uint128.cpp +++ b/toolsrc/src/vcpkg-test/uint128.cpp @@ -2,63 +2,67 @@ #include <vcpkg/base/uint128.h> -TEST_CASE ("uint128 constructor and assign", "[uint128]") { - vcpkg::UInt128 x = 120; - REQUIRE(x.bottom_64_bits() == 120); - REQUIRE(x.top_64_bits() == 0); +TEST_CASE ("uint128 constructor and assign", "[uint128]") +{ + vcpkg::UInt128 x = 120; + REQUIRE(x.bottom_64_bits() == 120); + REQUIRE(x.top_64_bits() == 0); - x = 3201; - REQUIRE(x.bottom_64_bits() == 3201); - REQUIRE(x.top_64_bits() == 0); - - x = 0xFFFF'FFFF'FFFF'FFFF; - REQUIRE(x.bottom_64_bits() == 0xFFFF'FFFF'FFFF'FFFF); - REQUIRE(x.top_64_bits() == 0); + x = 3201; + REQUIRE(x.bottom_64_bits() == 3201); + REQUIRE(x.top_64_bits() == 0); + + x = 0xFFFF'FFFF'FFFF'FFFF; + REQUIRE(x.bottom_64_bits() == 0xFFFF'FFFF'FFFF'FFFF); + REQUIRE(x.top_64_bits() == 0); } -TEST_CASE ("uint128 add-assign", "[uint128]") { - vcpkg::UInt128 x = 0xFFFF'FFFF'FFFF'FFFF; - x += 1; - REQUIRE(x.bottom_64_bits() == 0); - REQUIRE(x.top_64_bits() == 1); +TEST_CASE ("uint128 add-assign", "[uint128]") +{ + vcpkg::UInt128 x = 0xFFFF'FFFF'FFFF'FFFF; + x += 1; + REQUIRE(x.bottom_64_bits() == 0); + REQUIRE(x.top_64_bits() == 1); } -TEST_CASE ("uint128 shl-assign", "[uint128]") { - vcpkg::UInt128 x = 0xFFFF'FFFF'FFFF'FFFF; - x <<= 32; - REQUIRE(x.bottom_64_bits() == 0xFFFF'FFFF'0000'0000); - REQUIRE(x.top_64_bits() == 0x0000'0000'FFFF'FFFF); - - x <<= 60; - REQUIRE(x.bottom_64_bits() == 0); - REQUIRE(x.top_64_bits() == 0xFFFF'FFFF'F000'0000); +TEST_CASE ("uint128 shl-assign", "[uint128]") +{ + vcpkg::UInt128 x = 0xFFFF'FFFF'FFFF'FFFF; + x <<= 32; + REQUIRE(x.bottom_64_bits() == 0xFFFF'FFFF'0000'0000); + REQUIRE(x.top_64_bits() == 0x0000'0000'FFFF'FFFF); + + x <<= 60; + REQUIRE(x.bottom_64_bits() == 0); + REQUIRE(x.top_64_bits() == 0xFFFF'FFFF'F000'0000); - x = 1; - x <<= 96; - REQUIRE(x.bottom_64_bits() == 0); - REQUIRE(x.top_64_bits() == (uint64_t(1) << 32)); + x = 1; + x <<= 96; + REQUIRE(x.bottom_64_bits() == 0); + REQUIRE(x.top_64_bits() == (uint64_t(1) << 32)); } -TEST_CASE ("uint128 shr-assign", "[uint128]") { - vcpkg::UInt128 x = 0xFFFF'FFFF'FFFF'FFFF; - x <<= 64; - REQUIRE(x.bottom_64_bits() == 0x0000'0000'0000'0000); - REQUIRE(x.top_64_bits() == 0xFFFF'FFFF'FFFF'FFFF); +TEST_CASE ("uint128 shr-assign", "[uint128]") +{ + vcpkg::UInt128 x = 0xFFFF'FFFF'FFFF'FFFF; + x <<= 64; + REQUIRE(x.bottom_64_bits() == 0x0000'0000'0000'0000); + REQUIRE(x.top_64_bits() == 0xFFFF'FFFF'FFFF'FFFF); + + x >>= 32; + REQUIRE(x.bottom_64_bits() == 0xFFFF'FFFF'0000'0000); + REQUIRE(x.top_64_bits() == 0x0000'0000'FFFF'FFFF); - x >>= 32; - REQUIRE(x.bottom_64_bits() == 0xFFFF'FFFF'0000'0000); - REQUIRE(x.top_64_bits() == 0x0000'0000'FFFF'FFFF); - - x >>= 60; - REQUIRE(x.bottom_64_bits() == 0x0000'000F'FFFF'FFFF); - REQUIRE(x.top_64_bits() == 0x0000'0000'0000'0000); + x >>= 60; + REQUIRE(x.bottom_64_bits() == 0x0000'000F'FFFF'FFFF); + REQUIRE(x.top_64_bits() == 0x0000'0000'0000'0000); - x = 0x8000'0000'0000'0000; - x <<= 64; - REQUIRE(x.bottom_64_bits() == 0); - REQUIRE(x.top_64_bits() == 0x8000'0000'0000'0000); + x = 0x8000'0000'0000'0000; + x <<= 64; + REQUIRE(x.bottom_64_bits() == 0); + REQUIRE(x.top_64_bits() == 0x8000'0000'0000'0000); - x >>= 96; - REQUIRE(x.bottom_64_bits() == (uint64_t(1) << 31)); - REQUIRE(x.top_64_bits() == 0); + x >>= 96; + REQUIRE(x.bottom_64_bits() == (uint64_t(1) << 31)); + REQUIRE(x.top_64_bits() == 0); } diff --git a/toolsrc/src/vcpkg-test/update.cpp b/toolsrc/src/vcpkg-test/update.cpp index 5370a8421..0ae893855 100644 --- a/toolsrc/src/vcpkg-test/update.cpp +++ b/toolsrc/src/vcpkg-test/update.cpp @@ -1,8 +1,7 @@ #include <catch2/catch.hpp> -#include <vcpkg-test/util.h> +#include <vcpkg-test/util.h> #include <vcpkg/base/sortedvector.h> - #include <vcpkg/update.h> using namespace vcpkg; diff --git a/toolsrc/src/vcpkg-test/util.cpp b/toolsrc/src/vcpkg-test/util.cpp index c0b898145..c857db5b2 100644 --- a/toolsrc/src/vcpkg-test/util.cpp +++ b/toolsrc/src/vcpkg-test/util.cpp @@ -1,8 +1,8 @@ #include <vcpkg/base/system_headers.h> #include <catch2/catch.hpp> -#include <vcpkg-test/util.h> +#include <vcpkg-test/util.h> #include <vcpkg/base/checks.h> #include <vcpkg/base/files.h> #include <vcpkg/base/util.h> @@ -10,7 +10,6 @@ // used to get the implementation specific compiler flags (i.e., __cpp_lib_filesystem) #include <ciso646> - #include <iostream> #include <memory> @@ -114,18 +113,20 @@ namespace vcpkg::Test #elif !defined(_WIN32) // FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_STD return AllowSymlinks::Yes; #else - constexpr static const wchar_t regkey[] = - LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock)"; + constexpr static const wchar_t regkey[] = LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock)"; constexpr static const wchar_t regkey_member[] = LR"(AllowDevelopmentWithoutDevLicense)"; DWORD data; DWORD dataSize = sizeof(data); - const auto status = RegGetValueW( - HKEY_LOCAL_MACHINE, regkey, regkey_member, RRF_RT_DWORD, nullptr, &data, &dataSize); + const auto status = + RegGetValueW(HKEY_LOCAL_MACHINE, regkey, regkey_member, RRF_RT_DWORD, nullptr, &data, &dataSize); - if (status == ERROR_SUCCESS && data == 1) { + if (status == ERROR_SUCCESS && data == 1) + { return AllowSymlinks::Yes; - } else { + } + else + { std::cout << "Symlinks are not allowed on this system\n"; return AllowSymlinks::No; } @@ -155,7 +156,6 @@ namespace vcpkg::Test #endif } - const fs::path& base_temporary_directory() noexcept { const static fs::path BASE_TEMPORARY_DIRECTORY = internal_base_temporary_directory(); |
