summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_count_ref_unittest.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-30 10:32:36 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-30 10:32:36 -0700
commitfbda17d61de1e02799f5d77dceb23df3688b764e (patch)
treead15940f6c9bf31ca390a711636981ecd0e52ff6 /core/fxcrt/cfx_count_ref_unittest.cpp
parentf7252a074ed013e2ad3cc11e08eba90502262ce0 (diff)
downloadpdfium-fbda17d61de1e02799f5d77dceb23df3688b764e.tar.xz
Make CPDF_TextState have a CPDF_TextStateData rather than inheriting one.
Review-Url: https://codereview.chromium.org/2287313004
Diffstat (limited to 'core/fxcrt/cfx_count_ref_unittest.cpp')
-rw-r--r--core/fxcrt/cfx_count_ref_unittest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fxcrt/cfx_count_ref_unittest.cpp b/core/fxcrt/cfx_count_ref_unittest.cpp
index 7651c93f25..6cb9f4a2fe 100644
--- a/core/fxcrt/cfx_count_ref_unittest.cpp
+++ b/core/fxcrt/cfx_count_ref_unittest.cpp
@@ -58,7 +58,7 @@ TEST(fxcrt, CountRefCopy) {
Observer observer;
{
CFX_CountRef<Object> ptr1;
- ptr1.New(&observer, std::string("one"));
+ ptr1.Emplace(&observer, std::string("one"));
{
CFX_CountRef<Object> ptr2 = ptr1;
EXPECT_EQ(1, observer.GetConstructionCount("one"));
@@ -79,8 +79,8 @@ TEST(fxcrt, CountRefAssignOverOld) {
Observer observer;
{
CFX_CountRef<Object> ptr1;
- ptr1.New(&observer, std::string("one"));
- ptr1.New(&observer, std::string("two"));
+ ptr1.Emplace(&observer, std::string("one"));
+ ptr1.Emplace(&observer, std::string("two"));
EXPECT_EQ(1, observer.GetConstructionCount("one"));
EXPECT_EQ(1, observer.GetConstructionCount("two"));
EXPECT_EQ(1, observer.GetDestructionCount("one"));
@@ -93,9 +93,9 @@ TEST(fxcrt, CountRefAssignOverRetained) {
Observer observer;
{
CFX_CountRef<Object> ptr1;
- ptr1.New(&observer, std::string("one"));
+ ptr1.Emplace(&observer, std::string("one"));
CFX_CountRef<Object> ptr2(ptr1);
- ptr1.New(&observer, std::string("two"));
+ ptr1.Emplace(&observer, std::string("two"));
EXPECT_EQ(1, observer.GetConstructionCount("one"));
EXPECT_EQ(1, observer.GetConstructionCount("two"));
EXPECT_EQ(0, observer.GetDestructionCount("one"));