first commit
This commit is contained in:
commit
5893b00dd2
1669 changed files with 1982740 additions and 0 deletions
18
libraries/M5Utility/test/expected/relops.cpp
Normal file
18
libraries/M5Utility/test/expected/relops.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include <gtest/gtest.h>
|
||||
#include <m5_utility/stl/expected.hpp>
|
||||
|
||||
TEST(Expected, RelationalOperators)
|
||||
{
|
||||
m5::stl::expected<int, int> o1 = 42;
|
||||
m5::stl::expected<int, int> o2{m5::stl::unexpect, 0};
|
||||
const m5::stl::expected<int, int> o3 = 42;
|
||||
|
||||
EXPECT_TRUE(o1 == o1);
|
||||
EXPECT_TRUE(o1 != o2);
|
||||
EXPECT_TRUE(o1 == o3);
|
||||
EXPECT_TRUE(o3 == o3);
|
||||
|
||||
m5::stl::expected<void, int> o6;
|
||||
|
||||
EXPECT_TRUE(o6 == o6);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue