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

Unified Diff: tests/MetaDataTest.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/ImageFilterTest.cpp ('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 293e12a64d77863bc59408c6f9a1bdf2ea1a5d95..eb7eae9e0f5eb6dfe0a5e15b57f698c59aadb556 100644
--- a/tests/MetaDataTest.cpp
+++ b/tests/MetaDataTest.cpp
@@ -6,12 +6,11 @@
*/
#include "SkMetaData.h"
-#include "RefCntIs.h"
#include "Test.h"
static void test_ptrs(skiatest::Reporter* reporter) {
SkRefCnt ref;
- REPORTER_ASSERT(reporter, RefCntIs(ref, 1));
+ REPORTER_ASSERT(reporter, 1 == ref.getRefCnt());
{
SkMetaData md0, md1;
@@ -20,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, RefCntIs(ref, 2));
+ REPORTER_ASSERT(reporter, 2 == ref.getRefCnt());
md1 = md0;
REPORTER_ASSERT(reporter, md1.findRefCnt(name));
REPORTER_ASSERT(reporter, md1.hasRefCnt(name, &ref));
- REPORTER_ASSERT(reporter, RefCntIs(ref, 3));
+ REPORTER_ASSERT(reporter, 3 == ref.getRefCnt());
REPORTER_ASSERT(reporter, md0.removeRefCnt(name));
REPORTER_ASSERT(reporter, !md0.findRefCnt(name));
REPORTER_ASSERT(reporter, !md0.hasRefCnt(name, &ref));
- REPORTER_ASSERT(reporter, RefCntIs(ref, 2));
+ REPORTER_ASSERT(reporter, 2 == ref.getRefCnt());
}
- REPORTER_ASSERT(reporter, RefCntIs(ref, 1));
+ REPORTER_ASSERT(reporter, 1 == ref.getRefCnt());
}
DEF_TEST(MetaData, reporter) {
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | tests/RefCntTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698