Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Unified Diff: core/fxcrt/cfx_retain_ptr_unittest.cpp

Issue 2536973003: Add pdfium::MakeRetain<>() helper function. (Closed)
Patch Set: better test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« core/fxcrt/cfx_retain_ptr.h ('K') | « core/fxcrt/cfx_retain_ptr.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/cfx_retain_ptr_unittest.cpp
diff --git a/core/fxcrt/cfx_retain_ptr_unittest.cpp b/core/fxcrt/cfx_retain_ptr_unittest.cpp
index aa92e57f32fb87e2d7702af4e06c8637385052f5..b6ea831beeee6e12b6b0b758671e6d70d2033413 100644
--- a/core/fxcrt/cfx_retain_ptr_unittest.cpp
+++ b/core/fxcrt/cfx_retain_ptr_unittest.cpp
@@ -213,3 +213,8 @@ TEST(fxcrt, RetainPtrBool) {
EXPECT_FALSE(null_bool);
EXPECT_TRUE(obj1_bool);
}
+
+TEST(fxcrt, RetainPtrMakeRetained) {
+ auto ptr = pdfium::MakeRetain<CFX_Retainable>();
+ EXPECT_TRUE(ptr->HasOneRef());
npm 2016/11/29 22:25:30 Do we need more tests? For Retain() and Release()
Tom Sepez 2016/11/29 22:36:23 Done.
+}
« core/fxcrt/cfx_retain_ptr.h ('K') | « core/fxcrt/cfx_retain_ptr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698