Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
18 lines
364 B
C++
18 lines
364 B
C++
#include <catch2/catch.hpp>
|
|
#include <tl/expected.hpp>
|
|
|
|
TEST_CASE("Relational operators", "[relops]") {
|
|
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);
|
|
}
|