Introduce std::make_unique and bool literals where possible

PiperOrigin-RevId: 517910526
Change-Id: I398704f4b2ca0a55c86a06ca8b47d34c8670ddd7
This commit is contained in:
Abseil Team
2023-03-20 02:43:07 -07:00
committed by Copybara-Service
parent 9fd3fb00ff
commit 471087fbfc
3 changed files with 9 additions and 12 deletions

View File

@@ -31,6 +31,7 @@
//
// This file tests some commonly used argument matchers.
#include <memory>
#include <vector>
#include "test/gmock-matchers_test.h"
@@ -1542,7 +1543,7 @@ TEST(PairTest, MatchesCorrectly) {
TEST(PairTest, WorksWithMoveOnly) {
pair<std::unique_ptr<int>, std::unique_ptr<int>> p;
p.second.reset(new int(7));
p.second = std::make_unique<int>(7);
EXPECT_THAT(p, Pair(Eq(nullptr), Ne(nullptr)));
}