diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-03 14:54:59 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-03 14:54:59 +0000 |
commit | 42619d8df206b0bcd36d952909d972b8961e75de (patch) | |
tree | 2159fe1ee6ff0af5a35b0d0e4ee392735b5ad293 /tests | |
parent | 1d3c411f5e4d2ad31bc92b3a85957004329ac00d (diff) |
Rename SkTDLinkedList to SkTInternalLinked list, add some methods useful for forthcoming SkTLList.
Review URL: https://codereview.appspot.com/6858101
git-svn-id: http://skia.googlecode.com/svn/trunk@6643 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TDLinkedListTest.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/TDLinkedListTest.cpp b/tests/TDLinkedListTest.cpp index 8df39b8927..b4ea0b7100 100644 --- a/tests/TDLinkedListTest.cpp +++ b/tests/TDLinkedListTest.cpp @@ -6,7 +6,7 @@ */ #include "Test.h" -#include "SkTDLinkedList.h" +#include "SkTInternalLList.h" class ListElement { public: @@ -16,10 +16,10 @@ public: int fID; private: - SK_DEFINE_DLINKEDLIST_INTERFACE(ListElement); + SK_DECLARE_INTERNAL_LLIST_INTERFACE(ListElement); }; -static void CheckList(const SkTDLinkedList<ListElement>& list, +static void CheckList(const SkTInternalLList<ListElement>& list, skiatest::Reporter* reporter, bool empty, int numElements, @@ -37,7 +37,7 @@ static void CheckList(const SkTDLinkedList<ListElement>& list, } static void TestTDLinkedList(skiatest::Reporter* reporter) { - SkTDLinkedList<ListElement> list; + SkTInternalLList<ListElement> list; ListElement elements[4] = { ListElement(0), ListElement(1), @@ -59,14 +59,15 @@ static void TestTDLinkedList(skiatest::Reporter* reporter) { CheckList(list, reporter, false, 4, true, true, true, true, elements); // test out iterators - SkTDLinkedList<ListElement>::Iter iter; + typedef SkTInternalLList<ListElement>::Iter Iter; + Iter iter; - ListElement* cur = iter.init(list, SkTDLinkedList<ListElement>::Iter::kHead_IterStart); + ListElement* cur = iter.init(list, Iter::kHead_IterStart); for (int i = 0; NULL != cur; ++i, cur = iter.next()) { REPORTER_ASSERT(reporter, cur->fID == 3-i); } - cur = iter.init(list, SkTDLinkedList<ListElement>::Iter::kTail_IterStart); + cur = iter.init(list, Iter::kTail_IterStart); for (int i = 0; NULL != cur; ++i, cur = iter.prev()) { REPORTER_ASSERT(reporter, cur->fID == i); } |