From 5aaef1ff1a18b420b3409ec31b44c2435a4ac988 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Wed, 18 Nov 2015 14:11:08 -0800 Subject: simplify insertion methods for SkTLList Review URL: https://codereview.chromium.org/1459663002 --- tests/LListTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/LListTest.cpp') 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); -- cgit v1.2.3