diff options
author | bsalomon <bsalomon@google.com> | 2015-11-18 14:11:08 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-18 14:11:08 -0800 |
commit | 5aaef1ff1a18b420b3409ec31b44c2435a4ac988 (patch) | |
tree | 8ff9bcae8aff3b40e11b8081936d947ed26c727f /tests/LListTest.cpp | |
parent | f9b1577d763988ebc043ddabf80674f71571ecff (diff) |
simplify insertion methods for SkTLList
Review URL: https://codereview.chromium.org/1459663002
Diffstat (limited to 'tests/LListTest.cpp')
-rw-r--r-- | tests/LListTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/LListTest.cpp b/tests/LListTest.cpp index 5a0e1d89ba..e0e55d0419 100644 --- a/tests/LListTest.cpp +++ b/tests/LListTest.cpp @@ -152,11 +152,11 @@ static void TestTLList(skiatest::Reporter* reporter) { list2.reset(); // use both before/after in-place construction on an empty list - SkNEW_INSERT_IN_LLIST_BEFORE(&list2, list2.headIter(), ListElement, (1)); + list2.addBefore(list2.headIter(), 1); REPORTER_ASSERT(reporter, list2 == list1); list2.reset(); - SkNEW_INSERT_IN_LLIST_AFTER(&list2, list2.tailIter(), ListElement, (1)); + list2.addAfter(list2.tailIter(), 1); REPORTER_ASSERT(reporter, list2 == list1); // add an element to the second list, check that iters are still valid @@ -210,7 +210,7 @@ static void TestTLList(skiatest::Reporter* reporter) { // insert either before or after the iterator, then check that the // surrounding sequence is correct. if (2 == insertionMethod) { - SkNEW_INSERT_IN_LLIST_BEFORE(&list1, iter, ListElement, (id)); + list1.addBefore(iter, id); Iter newItem(iter); newItem.prev(); REPORTER_ASSERT(reporter, newItem.get()->fID == id); @@ -222,7 +222,7 @@ static void TestTLList(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, prev.next()->fID == id); } } else { - SkNEW_INSERT_IN_LLIST_AFTER(&list1, iter, ListElement, (id)); + list1.addAfter(iter, id); Iter newItem(iter); newItem.next(); REPORTER_ASSERT(reporter, newItem.get()->fID == id); |