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) { |