diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-12-05 10:59:44 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-01-23 17:12:44 +0100 |
commit | a1fcad591968ec717214a73a2dbe78f608207bc5 (patch) | |
tree | d8b8bc5823e3ac98192d9e37491acb0058cd7fe5 /lib | |
parent | 8183a33c130f1284404edc61767ff6d29402d200 (diff) | |
download | libquotient-a1fcad591968ec717214a73a2dbe78f608207bc5.tar.gz libquotient-a1fcad591968ec717214a73a2dbe78f608207bc5.zip |
Move away Omittable static tests to autotests/
These are not required to build libQuotient, and omittable.cpp entirely
consisted of them.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/omittable.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/omittable.cpp b/lib/omittable.cpp deleted file mode 100644 index 245ae721..00000000 --- a/lib/omittable.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-FileCopyrightText: 2021 Kitsune Ral <kitsune-ral@users.sf.net> -// SPDX-License-Identifier: LGPL-2.1-or-later - -#include "omittable.h" - -// Omittable<> tests -using namespace Quotient; - -Omittable<int> testFn(bool) { return 0; } -bool testFn2(int) { return false; } -static_assert( - std::is_same_v<decltype(std::declval<Omittable<bool>>().then(testFn)), - Omittable<int>>); -static_assert( - std::is_same_v< - decltype(std::declval<Omittable<bool>>().then_or(testFn, 0)), int>); -static_assert( - std::is_same_v<decltype(std::declval<Omittable<bool>>().then(testFn)), - Omittable<int>>); -static_assert(std::is_same_v<decltype(std::declval<Omittable<int>>() - .then(testFn2) - .then(testFn)), - Omittable<int>>); -static_assert(std::is_same_v<decltype(std::declval<Omittable<bool>>() - .then(testFn) - .then_or(testFn2, false)), - bool>); - -constexpr auto visitTestFn(int, bool) { return false; } -static_assert( - std::is_same_v<Omittable<bool>, decltype(lift(testFn2, Omittable<int>()))>); -static_assert(std::is_same_v<Omittable<bool>, - decltype(lift(visitTestFn, Omittable<int>(), - Omittable<bool>()))>); |