mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 09:17:53 +08:00
425d07ef7f
* [vcpkg] Add Default-Feature to make_status_pgh utility function Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Parse "Default-Features" as dependencies and add test for parsing Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Document some methods and structures Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Add install_default_features_test Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Change install_default_features_test to not have preinstalled package * [vcpkg] Test install behaviour of default features Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Implement default features Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Test default features upgrade behavior Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Implement upgrade with default features Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Test behaviour of upgrade with default features in dependencies Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Make upgrade install new default features Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Move collecting of packages for which to prevent defaults Further down the line to create_feature_install_plan. Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Fix core missing from default features and potential inf loop Signed-off-by: Squareys <squareys@googlemail.com> * [vcpkg] Rename, fix and move some tests Signed-off-by: Squareys <squareys@googlemail.com>
45 lines
1.6 KiB
C++
45 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include <CppUnitTest.h>
|
|
|
|
#include <vcpkg/dependencies.h>
|
|
#include <vcpkg/packagespec.h>
|
|
#include <vcpkg/packagespecparseresult.h>
|
|
#include <vcpkg/statusparagraph.h>
|
|
#include <vcpkg/triplet.h>
|
|
|
|
#include <memory>
|
|
|
|
namespace Microsoft::VisualStudio::CppUnitTestFramework
|
|
{
|
|
std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t);
|
|
std::wstring ToString(const vcpkg::Dependencies::RequestType& t);
|
|
std::wstring ToString(const vcpkg::PackageSpecParseResult& t);
|
|
std::wstring ToString(const vcpkg::PackageSpec& t);
|
|
}
|
|
|
|
std::unique_ptr<vcpkg::StatusParagraph> make_status_pgh(const char* name,
|
|
const char* depends = "",
|
|
const char* default_features = "",
|
|
const char* triplet = "x86-windows");
|
|
std::unique_ptr<vcpkg::StatusParagraph> make_status_feature_pgh(const char* name,
|
|
const char* feature,
|
|
const char* depends = "",
|
|
const char* triplet = "x86-windows");
|
|
|
|
template<class T, class S>
|
|
T&& unwrap(vcpkg::ExpectedT<T, S>&& p)
|
|
{
|
|
Assert::IsTrue(p.has_value());
|
|
return std::move(*p.get());
|
|
}
|
|
|
|
template<class T>
|
|
T&& unwrap(vcpkg::Optional<T>&& opt)
|
|
{
|
|
Assert::IsTrue(opt.has_value());
|
|
return std::move(*opt.get());
|
|
}
|
|
|
|
vcpkg::PackageSpec unsafe_pspec(std::string name, vcpkg::Triplet t = vcpkg::Triplet::X86_WINDOWS);
|