mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
Add a unit test for the copy constructor.
I would not normally add tests like these, but the copy constructor is not used at all in our codebase with c++11, so having this tests might prevent breaking the c++03 build again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198886 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d92ff21d6f
commit
e279c777f7
@ -23,6 +23,9 @@ TEST(ErrorOr, SimpleValue) {
|
|||||||
EXPECT_TRUE(a);
|
EXPECT_TRUE(a);
|
||||||
EXPECT_EQ(1, *a);
|
EXPECT_EQ(1, *a);
|
||||||
|
|
||||||
|
ErrorOr<int> b = a;
|
||||||
|
EXPECT_EQ(1, *b);
|
||||||
|
|
||||||
a = t2();
|
a = t2();
|
||||||
EXPECT_FALSE(a);
|
EXPECT_FALSE(a);
|
||||||
EXPECT_EQ(errc::invalid_argument, a.getError());
|
EXPECT_EQ(errc::invalid_argument, a.getError());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user