Changes imported from Abseil "staging" branch:
- f2c4c517f14afa7a3fac6b35588381462f02dec3 Rollback release of algorithm benchmark. by Alex Strelnikov <strel@google.com> - ec8a9569ac36d58a4fff2f9fc851e5a9474d274a Change AllocInspector to ConstructorTracker by Jon Cohen <cohenjon@google.com> - 6f94f3d65a29b11c692948d23c0fc530f015cd53 Update WORKSPACE for C++ microbenchmarks and release algo... by Alex Strelnikov <strel@google.com> - 79187dd7cec821e47cdd751db71bb23be2b8cef7 Define copy assignment operator for ThrowingAllocator. by Xiaoyi Zhang <zhangxy@google.com> - 8bf5e1048dd7788f4bce60376f5c3992f8525d88 Fix incorrect format string used in str_cat_test.cc code,... by Jorg Brown <jorg@google.com> - 19c51194e6638f05cbb364c6684f14dc7ed1a323 Fix symbolize_test under sanitizers. by Derek Mauro <dmauro@google.com> - d68119cfb845a9d460fc3fd4aae1d2ea7d79ee21 Internal change. by Derek Mauro <dmauro@google.com> - 4ca54d336c7a18050c95c6c1a859f2a0530e1cde Internal change. by Shaindel Schwartz <shaindel@google.com> GitOrigin-RevId: f2c4c517f14afa7a3fac6b35588381462f02dec3 Change-Id: If61a65d65f03b26d6776710040780ddd1c52c4de
This commit is contained in:
		
							parent
							
								
									4e2e6c5c00
								
							
						
					
					
						commit
						70b5fa948d
					
				
					 7 changed files with 59 additions and 44 deletions
				
			
		|  | @ -44,7 +44,7 @@ class ThrowingValueTest : public ::testing::Test { | |||
|   void SetUp() override { UnsetCountdown(); } | ||||
| 
 | ||||
|  private: | ||||
|   AllocInspector clouseau_; | ||||
|   ConstructorTracker clouseau_; | ||||
| }; | ||||
| 
 | ||||
| TEST_F(ThrowingValueTest, Throws) { | ||||
|  | @ -279,7 +279,7 @@ class ThrowingAllocatorTest : public ::testing::Test { | |||
|   void SetUp() override { UnsetCountdown(); } | ||||
| 
 | ||||
|  private: | ||||
|   AllocInspector borlu_; | ||||
|   ConstructorTracker borlu_; | ||||
| }; | ||||
| 
 | ||||
| TEST_F(ThrowingAllocatorTest, MemoryManagement) { | ||||
|  | @ -652,22 +652,22 @@ struct Tracked : private exceptions_internal::TrackedObject { | |||
|   Tracked() : TrackedObject(ABSL_PRETTY_FUNCTION) {} | ||||
| }; | ||||
| 
 | ||||
| TEST(AllocInspectorTest, Pass) { | ||||
|   AllocInspector javert; | ||||
| TEST(ConstructorTrackerTest, Pass) { | ||||
|   ConstructorTracker javert; | ||||
|   Tracked t; | ||||
| } | ||||
| 
 | ||||
| TEST(AllocInspectorTest, NotDestroyed) { | ||||
| TEST(ConstructorTrackerTest, NotDestroyed) { | ||||
|   absl::aligned_storage_t<sizeof(Tracked), alignof(Tracked)> storage; | ||||
|   EXPECT_NONFATAL_FAILURE( | ||||
|       { | ||||
|         AllocInspector gadget; | ||||
|         ConstructorTracker gadget; | ||||
|         new (&storage) Tracked; | ||||
|       }, | ||||
|       "not destroyed"); | ||||
| } | ||||
| 
 | ||||
| TEST(AllocInspectorTest, DestroyedTwice) { | ||||
| TEST(ConstructorTrackerTest, DestroyedTwice) { | ||||
|   EXPECT_NONFATAL_FAILURE( | ||||
|       { | ||||
|         Tracked t; | ||||
|  | @ -676,7 +676,7 @@ TEST(AllocInspectorTest, DestroyedTwice) { | |||
|       "destroyed improperly"); | ||||
| } | ||||
| 
 | ||||
| TEST(AllocInspectorTest, ConstructedTwice) { | ||||
| TEST(ConstructorTrackerTest, ConstructedTwice) { | ||||
|   absl::aligned_storage_t<sizeof(Tracked), alignof(Tracked)> storage; | ||||
|   EXPECT_NONFATAL_FAILURE( | ||||
|       { | ||||
|  | @ -697,5 +697,12 @@ TEST(ThrowingValueTraitsTest, RelationalOperators) { | |||
|   EXPECT_TRUE((std::is_convertible<decltype(a >= b), bool>::value)); | ||||
| } | ||||
| 
 | ||||
| TEST(ThrowingAllocatorTraitsTest, Assignablility) { | ||||
|   EXPECT_TRUE(std::is_move_assignable<ThrowingAllocator<int>>::value); | ||||
|   EXPECT_TRUE(std::is_copy_assignable<ThrowingAllocator<int>>::value); | ||||
|   EXPECT_TRUE(std::is_nothrow_move_assignable<ThrowingAllocator<int>>::value); | ||||
|   EXPECT_TRUE(std::is_nothrow_copy_assignable<ThrowingAllocator<int>>::value); | ||||
| } | ||||
| 
 | ||||
| }  // namespace
 | ||||
| }  // namespace absl
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue