From d4e7ca034cbbe29911b08eb5c252aa0d05b6a429 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 30 Aug 2018 22:40:07 +0000 Subject: Add unit test for AutoRestorer<> on smart pointer types. Test UnownedPtr<> and RetainPtr<>. We cannot operate against std::unique_ptr<> because we need a copyable type. Add test for self-reassignment on going out of scope. Move one test helper class to testing/ so it can be shared among unit tests. Allow it to recognize if it ever gets "destroyed", otherwise we can't be sure Retain/Release applied in the correct order. Change-Id: I13056094c70079f7283cbc7600948f81a64874b4 Reviewed-on: https://pdfium-review.googlesource.com/41690 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- BUILD.gn | 1 + 1 file changed, 1 insertion(+) (limited to 'BUILD.gn') diff --git a/BUILD.gn b/BUILD.gn index 27e4b2615a..1d4573a8f2 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -3047,6 +3047,7 @@ test("pdfium_embeddertests") { "testing/embedder_test_timer_handling_delegate.h", "testing/fake_file_access.cpp", "testing/fake_file_access.h", + "testing/pseudo_retainable.h", "testing/range_set.cpp", "testing/range_set.h", ] -- cgit v1.2.3