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

Unified Diff: tests/LListTest.cpp

Issue 1459663002: simplify insertion methods for SkTLList (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix gcc? Created 5 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 | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/LListTest.cpp
diff --git a/tests/LListTest.cpp b/tests/LListTest.cpp
index 5a0e1d89ba54859bba7ca16ac55703605dd2afbc..e0e55d0419d81555fade501092197e621ebbdb7c 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);
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698