diff options
| author | Barath Kannan <barathsotd@gmail.com> | 2017-12-27 16:57:43 +1100 |
|---|---|---|
| committer | Barath Kannan <barathsotd@gmail.com> | 2017-12-27 16:57:43 +1100 |
| commit | d8f0ea999983892b8e5e49340ece3474ee257156 (patch) | |
| tree | ce9b615075350d90d0b7312874bae6dd202fe93b /toolsrc/include/tests.utils.h | |
| parent | 22e9a2b25db21e1d1a1f75786442f2c90ae0db0c (diff) | |
| parent | 6e05f9cdf5cf4d53153214f4d4b29133b368bc4d (diff) | |
| download | vcpkg-d8f0ea999983892b8e5e49340ece3474ee257156.tar.gz vcpkg-d8f0ea999983892b8e5e49340ece3474ee257156.zip | |
resolve merge conflicts
Diffstat (limited to 'toolsrc/include/tests.utils.h')
| -rw-r--r-- | toolsrc/include/tests.utils.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h index 485b8c294..0c0add7ab 100644 --- a/toolsrc/include/tests.utils.h +++ b/toolsrc/include/tests.utils.h @@ -23,4 +23,18 @@ std::unique_ptr<vcpkg::StatusParagraph> make_status_pgh(const char* name, std::unique_ptr<vcpkg::StatusParagraph> make_status_feature_pgh(const char* name, const char* feature, const char* depends = "", - const char* triplet = "x86-windows");
\ No newline at end of file + 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()); +} |
