diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
commit | 5a5ac124e1efaf208671f01c46edb15f29ed2a0b (patch) | |
tree | a6140557876943cdd800ee997c9317283394b22c /unittests/Support/ErrorOrTest.cpp | |
parent | f03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (diff) |
Diffstat (limited to 'unittests/Support/ErrorOrTest.cpp')
-rw-r--r-- | unittests/Support/ErrorOrTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/unittests/Support/ErrorOrTest.cpp b/unittests/Support/ErrorOrTest.cpp index 82bbe090960ac..5e8d442a70394 100644 --- a/unittests/Support/ErrorOrTest.cpp +++ b/unittests/Support/ErrorOrTest.cpp @@ -66,6 +66,11 @@ TEST(ErrorOr, Covariant) { ErrorOr<std::unique_ptr<int>> b4(b3); } +TEST(ErrorOr, Comparison) { + ErrorOr<int> x(std::errc::no_such_file_or_directory); + EXPECT_EQ(x, std::errc::no_such_file_or_directory); +} + // ErrorOr<int*> x(nullptr); // ErrorOr<std::unique_ptr<int>> y = x; // invalid conversion static_assert( |