From ebce0301082cda9dc3e3298f6db91d46fe66298b Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Tue, 4 Dec 2012 14:48:57 +0000 Subject: [PATCH] Fix stale iterators in LList test. Add newline to end of SkTLList.h git-svn-id: http://skia.googlecode.com/svn/trunk@6663 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkTLList.h | 3 ++- tests/LListTest.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h index 30d440f..01d6339 100644 --- a/src/core/SkTLList.h +++ b/src/core/SkTLList.h @@ -359,4 +359,5 @@ void *operator new(size_t, SkTLList* list, SkNEW_INSERT_IN_LLIST_BEFORE((list), (list)->headIter(), type_name, args) #define SkNEW_INSERT_AT_LLIST_TAIL(list, type_name, args) \ - SkNEW_INSERT_IN_LLIST_AFTER((list), (list)->tailIter(), type_name, args) \ No newline at end of file + SkNEW_INSERT_IN_LLIST_AFTER((list), (list)->tailIter(), type_name, args) + diff --git a/tests/LListTest.cpp b/tests/LListTest.cpp index d574e09..89c4971 100644 --- a/tests/LListTest.cpp +++ b/tests/LListTest.cpp @@ -174,7 +174,10 @@ static void TestTLList(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, list2 == list1); // add an element to the second list, check that iters are still valid + iter3.init(list2, Iter::kHead_IterStart); + iter4.init(list2, Iter::kTail_IterStart); list2.addToHead(ListElement(2)); + #ifdef SK_ENABLE_INST_COUNT SkASSERT(3 == ListElement::InstanceCount()); #endif -- 2.7.4