mirror of
https://github.com/google/googletest.git
synced 2026-04-30 19:09:20 +08:00
Automated Code Change
PiperOrigin-RevId: 890778982 Change-Id: Idef51b737a250560d0b71130e6e87b6249d8c47a
This commit is contained in:
parent
015950a936
commit
2461743991
@ -1310,7 +1310,7 @@ TEST(AssignTest, Int) {
|
|||||||
|
|
||||||
TEST(AssignTest, String) {
|
TEST(AssignTest, String) {
|
||||||
::std::string x;
|
::std::string x;
|
||||||
Action<void(void)> a = Assign(&x, "Hello, world");
|
Action<void()> a = Assign(&x, "Hello, world");
|
||||||
a.Perform(std::make_tuple());
|
a.Perform(std::make_tuple());
|
||||||
EXPECT_EQ("Hello, world", x);
|
EXPECT_EQ("Hello, world", x);
|
||||||
}
|
}
|
||||||
@ -1662,14 +1662,14 @@ class SetErrnoAndReturnTest : public testing::Test {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(SetErrnoAndReturnTest, Int) {
|
TEST_F(SetErrnoAndReturnTest, Int) {
|
||||||
Action<int(void)> a = SetErrnoAndReturn(ENOTTY, -5);
|
Action<int()> a = SetErrnoAndReturn(ENOTTY, -5);
|
||||||
EXPECT_EQ(-5, a.Perform(std::make_tuple()));
|
EXPECT_EQ(-5, a.Perform(std::make_tuple()));
|
||||||
EXPECT_EQ(ENOTTY, errno);
|
EXPECT_EQ(ENOTTY, errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(SetErrnoAndReturnTest, Ptr) {
|
TEST_F(SetErrnoAndReturnTest, Ptr) {
|
||||||
int x;
|
int x;
|
||||||
Action<int*(void)> a = SetErrnoAndReturn(ENOTTY, &x);
|
Action<int*()> a = SetErrnoAndReturn(ENOTTY, &x);
|
||||||
EXPECT_EQ(&x, a.Perform(std::make_tuple()));
|
EXPECT_EQ(&x, a.Perform(std::make_tuple()));
|
||||||
EXPECT_EQ(ENOTTY, errno);
|
EXPECT_EQ(ENOTTY, errno);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user