Introduce std::make_unique and bool literals where possible
PiperOrigin-RevId: 517910526 Change-Id: I398704f4b2ca0a55c86a06ca8b47d34c8670ddd7
This commit is contained in:
		
				
					committed by
					
						
						Copybara-Service
					
				
			
			
				
	
			
			
			
						parent
						
							9fd3fb00ff
						
					
				
				
					commit
					471087fbfc
				
			@@ -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)));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user