Files
expected/tests/relops.cpp

18 lines
364 B
C++
Raw Permalink Normal View History

#include <catch2/catch.hpp>
2019-05-01 12:15:40 +01:00
#include <tl/expected.hpp>
2017-11-27 14:48:16 +00:00
TEST_CASE("Relational operators", "[relops]") {
2022-11-24 11:50:20 +00:00
tl::expected<int, int> o1 = 42;
tl::expected<int, int> o2{tl::unexpect, 0};
const tl::expected<int, int> o3 = 42;
REQUIRE(o1 == o1);
REQUIRE(o1 != o2);
REQUIRE(o1 == o3);
REQUIRE(o3 == o3);
tl::expected<void, int> o6;
REQUIRE(o6 == o6);
2017-11-27 14:48:16 +00:00
}