aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.util/match.test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.util/match.test.cc')
-rw-r--r--nihil.util/match.test.cc32
1 files changed, 0 insertions, 32 deletions
diff --git a/nihil.util/match.test.cc b/nihil.util/match.test.cc
deleted file mode 100644
index 6cc0e27..0000000
--- a/nihil.util/match.test.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// This source code is released into the public domain.
-
-#include <catch2/catch_test_macros.hpp>
-
-import nihil.std;
-import nihil.util;
-
-namespace {
-TEST_CASE("match", "[nihil]")
-{
- using namespace nihil;
- using namespace std::literals;
-
- auto v = std::variant<int, std::string>(42);
-
- auto s = v | match {
- [](int) { return "int"s; },
- [](std::string const &) { return "string"s; }
- };
-
- REQUIRE(s == "int");
-
- v = "test"s;
-
- s = v | match {
- [](int) { return "int"s; },
- [](std::string const &) { return "string"s; }
- };
-
- REQUIRE(s == "string");
-}
-} // anonymous namespace