diff options
author | Mike Klein <mtklein@google.com> | 2014-07-09 09:04:07 -0400 |
---|---|---|
committer | Mike Klein <mtklein@google.com> | 2014-07-09 09:04:07 -0400 |
commit | 874a62acef5ec2ecccdbb99ec4d86402a3341e6a (patch) | |
tree | 984dbc899480cb2dcaa578c08594266f2f9500cb /tests/RefCntTest.cpp | |
parent | 0b544ae222aab1c5d9122a8dfe2800451b31d979 (diff) |
Revert "Remove ability for Release code to call getRefCnt() or getWeakRefCnt()."
This reverts commit 4ae94ffce5ecf1b71cb5e295b68bf4ec9e697443.
BUG=skia:
Review URL: https://codereview.chromium.org/382523002
Diffstat (limited to 'tests/RefCntTest.cpp')
-rw-r--r-- | tests/RefCntTest.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/RefCntTest.cpp b/tests/RefCntTest.cpp index 5f2cbe466f..bd4f348fba 100644 --- a/tests/RefCntTest.cpp +++ b/tests/RefCntTest.cpp @@ -10,7 +10,6 @@ #include "SkThreadUtils.h" #include "SkTypes.h" #include "SkWeakRefCnt.h" -#include "RefCntIs.h" #include "Test.h" class InstCounterClass { @@ -34,7 +33,7 @@ static void test_refarray(skiatest::Reporter* reporter) { const int N = 10; SkTRefArray<InstCounterClass>* array = SkTRefArray<InstCounterClass>::Create(N); - REPORTER_ASSERT(reporter, RefCntIs(*array, 1)); + REPORTER_ASSERT(reporter, 1 == array->getRefCnt()); REPORTER_ASSERT(reporter, N == array->count()); REPORTER_ASSERT(reporter, N == InstCounterClass::gInstCounter); @@ -51,7 +50,7 @@ static void test_refarray(skiatest::Reporter* reporter) { } array = SkTRefArray<InstCounterClass>::Create(src, N); - REPORTER_ASSERT(reporter, RefCntIs(*array, 1)); + REPORTER_ASSERT(reporter, 1 == array->getRefCnt()); REPORTER_ASSERT(reporter, N == array->count()); REPORTER_ASSERT(reporter, 2*N == InstCounterClass::gInstCounter); @@ -92,7 +91,7 @@ static void test_refCnt(skiatest::Reporter* reporter) { thing1.join(); thing2.join(); - REPORTER_ASSERT(reporter, RefCntIs(*ref, 1)); + REPORTER_ASSERT(reporter, ref->getRefCnt() == 1); ref->unref(); } @@ -136,8 +135,8 @@ static void test_weakRefCnt(skiatest::Reporter* reporter) { thing3.join(); thing4.join(); - REPORTER_ASSERT(reporter, RefCntIs(*ref, 1)); - REPORTER_ASSERT(reporter, WeakRefCntIs(*ref, 1)); + REPORTER_ASSERT(reporter, ref->getRefCnt() == 1); + REPORTER_ASSERT(reporter, ref->getWeakCnt() == 1); ref->unref(); } |