2017-11-12 11:47:56 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <CppUnitTest.h>
|
|
|
|
|
|
|
|
#include <vcpkg/dependencies.h>
|
|
|
|
#include <vcpkg/packagespec.h>
|
|
|
|
#include <vcpkg/packagespecparseresult.h>
|
|
|
|
#include <vcpkg/statusparagraph.h>
|
2018-01-23 18:36:39 +08:00
|
|
|
#include <vcpkg/triplet.h>
|
2017-11-12 11:47:56 +08:00
|
|
|
|
|
|
|
#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 = "",
|
2018-02-15 08:18:25 +08:00
|
|
|
const char* default_features = "",
|
2017-11-12 11:47:56 +08:00
|
|
|
const char* triplet = "x86-windows");
|
|
|
|
std::unique_ptr<vcpkg::StatusParagraph> make_status_feature_pgh(const char* name,
|
|
|
|
const char* feature,
|
|
|
|
const char* depends = "",
|
2017-12-13 21:43:00 +08:00
|
|
|
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());
|
|
|
|
}
|
2018-01-23 18:36:39 +08:00
|
|
|
|
|
|
|
vcpkg::PackageSpec unsafe_pspec(std::string name, vcpkg::Triplet t = vcpkg::Triplet::X86_WINDOWS);
|