diff options
| author | xoviat <xoviat@users.noreply.github.com> | 2017-12-20 13:24:59 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-20 13:24:59 -0600 |
| commit | f1f373b189453f33a944e9db8b3451b1c785e223 (patch) | |
| tree | 8713b7dc28734e4d4ad0ebba76459850955ce004 /toolsrc/include/tests.utils.h | |
| parent | 6363688b6d2f3522a4ce48cedb60da31775cd923 (diff) | |
| parent | 6cb6a61aaf5ef2c143f974e9f731778bcd3f5cbe (diff) | |
| download | vcpkg-f1f373b189453f33a944e9db8b3451b1c785e223.tar.gz vcpkg-f1f373b189453f33a944e9db8b3451b1c785e223.zip | |
Merge branch 'master' into fftw
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()); +} |
