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

Unified Diff: tests/MetaDataTest.cpp

Issue 752263002: make SkRefCnt::getRefCnt() debug-only, remove it from SkNVRefCnt. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typos Created 6 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
« no previous file with comments | « include/core/SkRefCnt.h ('k') | tests/RefCntTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MetaDataTest.cpp
diff --git a/tests/MetaDataTest.cpp b/tests/MetaDataTest.cpp
index eb7eae9e0f5eb6dfe0a5e15b57f698c59aadb556..8ed1e493ec18ed3ba31e42c2964d85c837034e4f 100644
--- a/tests/MetaDataTest.cpp
+++ b/tests/MetaDataTest.cpp
@@ -10,7 +10,7 @@
static void test_ptrs(skiatest::Reporter* reporter) {
SkRefCnt ref;
- REPORTER_ASSERT(reporter, 1 == ref.getRefCnt());
+ REPORTER_ASSERT(reporter, ref.unique());
{
SkMetaData md0, md1;
@@ -19,19 +19,19 @@ static void test_ptrs(skiatest::Reporter* reporter) {
md0.setRefCnt(name, &ref);
REPORTER_ASSERT(reporter, md0.findRefCnt(name));
REPORTER_ASSERT(reporter, md0.hasRefCnt(name, &ref));
- REPORTER_ASSERT(reporter, 2 == ref.getRefCnt());
+ REPORTER_ASSERT(reporter, !ref.unique());
md1 = md0;
REPORTER_ASSERT(reporter, md1.findRefCnt(name));
REPORTER_ASSERT(reporter, md1.hasRefCnt(name, &ref));
- REPORTER_ASSERT(reporter, 3 == ref.getRefCnt());
+ REPORTER_ASSERT(reporter, !ref.unique());
REPORTER_ASSERT(reporter, md0.removeRefCnt(name));
REPORTER_ASSERT(reporter, !md0.findRefCnt(name));
REPORTER_ASSERT(reporter, !md0.hasRefCnt(name, &ref));
- REPORTER_ASSERT(reporter, 2 == ref.getRefCnt());
+ REPORTER_ASSERT(reporter, !ref.unique());
}
- REPORTER_ASSERT(reporter, 1 == ref.getRefCnt());
+ REPORTER_ASSERT(reporter, ref.unique());
}
DEF_TEST(MetaData, reporter) {
« no previous file with comments | « include/core/SkRefCnt.h ('k') | tests/RefCntTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698