Lines Matching refs:nester

16 static void test_push(skiatest::Reporter* reporter, SkTDStackNester<int>* nester) {  in test_push()  argument
17 SkASSERT(nester); in test_push()
18 const int count = nester->count(); in test_push()
20 nester->push(count); in test_push()
21 REPORTER_ASSERT(reporter, nester->count() == count + 1); in test_push()
29 static void test_pop(skiatest::Reporter* reporter, SkTDStackNester<int>* nester) { in test_pop() argument
30 SkASSERT(nester); in test_pop()
31 const int count = nester->count(); in test_pop()
34 const int top = nester->top(); in test_pop()
36 nester->pop(&value); in test_pop()
38 const int newCount = nester->count(); in test_pop()
51 static void test_nest(skiatest::Reporter* reporter, SkTDStackNester<int>* nester, int inc) { in test_nest() argument
52 SkASSERT(nester); in test_nest()
54 const int initialCount = nester->count(); in test_nest()
55 const int initialNesting = nester->nestingLevel(); in test_nest()
57 nester->nest(); in test_nest()
58 REPORTER_ASSERT(reporter, nester->count() == 0); in test_nest()
59 REPORTER_ASSERT(reporter, nester->nestingLevel() == initialNesting + 1); in test_nest()
62 test_push(reporter, nester); in test_nest()
65 nester->unnest(); in test_nest()
66 REPORTER_ASSERT(reporter, nester->count() == initialCount); in test_nest()
67 REPORTER_ASSERT(reporter, nester->nestingLevel() == initialNesting); in test_nest()
78 SkTDStackNester<int> nester; in test_stack_nester() local
79 int count = nester.count(); in test_stack_nester()
81 REPORTER_ASSERT(reporter, nester.nestingLevel() == 0); in test_stack_nester()
82 REPORTER_ASSERT(reporter, nester.empty()); in test_stack_nester()
85 test_nest(reporter, &nester, 3); in test_stack_nester()
93 test_nest(reporter, &nester, 7); in test_stack_nester()
96 test_nest(reporter, &nester, 6); in test_stack_nester()
98 test_push(reporter, &nester); in test_stack_nester()
103 while (nester.count() > 1) { in test_stack_nester()
104 test_pop(reporter, &nester); in test_stack_nester()