Fix CI build
This commit is contained in:
parent
5fe3cada4c
commit
19e3433035
@ -49,7 +49,7 @@ references:
|
||||
sudo chmod o-w /etc/apt/sources.list.d/clang.list
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt-get update -qq
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y git ccache $APT_COMPILER_PACKAGE cmake make libcurl4-openssl-dev libcrypto++-dev libssl-dev libfuse-dev python
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y git ccache $APT_COMPILER_PACKAGE cmake make libcurl4-openssl-dev libcrypto++-dev libssl-dev libfuse-dev python clang-tidy
|
||||
# Use /dev/urandom when /dev/random is accessed to use less entropy
|
||||
sudo cp -a /dev/urandom /dev/random
|
||||
|
||||
|
@ -49,22 +49,22 @@ public:
|
||||
void EXPECT_LEFT_IS(const Expected &expected, either<Left, Right> &value) {
|
||||
EXPECT_IS_LEFT(value);
|
||||
EXPECT_EQ(expected, value.left());
|
||||
EXPECT_EQ(expected, value.left_opt().value());
|
||||
EXPECT_EQ(expected, value.left_opt().get());
|
||||
EXPECT_EQ(boost::none, value.right_opt());
|
||||
const either<Left, Right> &const_value = value;
|
||||
EXPECT_EQ(expected, const_value.left());
|
||||
EXPECT_EQ(expected, const_value.left_opt().value());
|
||||
EXPECT_EQ(expected, const_value.left_opt().get());
|
||||
EXPECT_EQ(boost::none, const_value.right_opt());
|
||||
}
|
||||
template<class Left, class Right, class Expected>
|
||||
void EXPECT_RIGHT_IS(const Expected &expected, either<Left, Right> &value) {
|
||||
EXPECT_IS_RIGHT(value);
|
||||
EXPECT_EQ(expected, value.right());
|
||||
EXPECT_EQ(expected, value.right_opt().value());
|
||||
EXPECT_EQ(expected, value.right_opt().get());
|
||||
EXPECT_EQ(boost::none, value.left_opt());
|
||||
const either<Left, Right> &const_value = value;
|
||||
EXPECT_EQ(expected, const_value.right());
|
||||
EXPECT_EQ(expected, const_value.right_opt().value());
|
||||
EXPECT_EQ(expected, const_value.right_opt().get());
|
||||
EXPECT_EQ(boost::none, const_value.left_opt());
|
||||
}
|
||||
};
|
||||
@ -244,7 +244,7 @@ TEST_F(EitherTest, ModifyRight) {
|
||||
|
||||
TEST_F(EitherTest, ModifyLeftOpt) {
|
||||
either<string, int> val = string("mystring1");
|
||||
val.left_opt().value() = "mystring2";
|
||||
val.left_opt().get() = "mystring2";
|
||||
EXPECT_LEFT_IS("mystring2", val);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user