From 53cc7cd1ecc72a60745edd96a1c79042d9a1b380 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 22 Mar 2021 19:35:21 -0700 Subject: [PATCH] Googletest export Code style cleanups in cheat sheet PiperOrigin-RevId: 364465553 --- docs/gmock_cheat_sheet.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/gmock_cheat_sheet.md b/docs/gmock_cheat_sheet.md index 723cb7e1..1e6b44ef 100644 --- a/docs/gmock_cheat_sheet.md +++ b/docs/gmock_cheat_sheet.md @@ -123,7 +123,7 @@ TEST(BarTest, DoesThis) { .WillRepeatedly(Return("Category 5")); // ... other expectations ... - EXPECT_EQ("good", MyProductionFunction(&foo)); // #5 + EXPECT_EQ(MyProductionFunction(&foo), "good"); // #5 } // #6 ``` @@ -162,8 +162,8 @@ Example usage: auto buzz1 = mock_buzzer_.MakeBuzz("hello"); auto buzz2 = mock_buzzer_.MakeBuzz("hello"); - EXPECT_NE(nullptr, buzz1); - EXPECT_NE(nullptr, buzz2); + EXPECT_NE(buzz1, nullptr); + EXPECT_NE(buzz2, nullptr); EXPECT_NE(buzz1, buzz2); // Resets the default action for return type std::unique_ptr,