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

Unified Diff: tests/RefCntTest.cpp

Issue 382523002: Revert "Remove ability for Release code to call getRefCnt() or getWeakRefCnt()." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months 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
« no previous file with comments | « tests/MetaDataTest.cpp ('k') | tests/RefDictTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RefCntTest.cpp
diff --git a/tests/RefCntTest.cpp b/tests/RefCntTest.cpp
index 5f2cbe466f043973ae5195caa68c0ff11dea8538..bd4f348fba8e84e20266e417c37f4955f547b280 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();
}
« no previous file with comments | « tests/MetaDataTest.cpp ('k') | tests/RefDictTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698