Home | History | Annotate | Download | only in tests

Lines Matching refs:iter

119 get_item (GSequenceIter *iter)
121 return fix_pointer (g_sequence_get (iter));
128 GSequenceIter *iter;
139 iter = g_sequence_get_begin_iter (info->sequence);
142 while (iter != g_sequence_get_end_iter (info->sequence))
145 g_assert (list->data == iter);
149 iter = g_sequence_iter_next (iter);
187 GSequenceIter *iter;
191 iter = (*link)->data;
193 g_assert (get_item (iter) == item);
246 GSequenceIter *iter = list->data;
247 Item *item = get_item (iter);
254 g_assert (iter == g_sequence_iter_next (last_iter));
257 last_iter = iter;
343 GSequenceIter *iter;
347 iter = g_sequence_get_iter_at_pos (seq->sequence, pos);
349 g_assert (queue_link_index (seq, *link) == g_sequence_iter_get_position (iter));
350 return iter;
357 GSequenceIter *iter;
360 iter = g_sequence_get_begin_iter (seq->sequence);
363 while (iter != g_sequence_get_end_iter (seq->sequence))
365 Item *item = get_item (iter);
366 g_print ("%p %p %d\n", list->data, iter, item->number);
368 iter = g_sequence_iter_next (iter);
527 GSequenceIter *iter = g_sequence_get_iter_at_pos (seq->sequence, pos);
532 g_assert (iter == g_sequence_get_end_iter (seq->sequence));
538 g_assert (link->data == iter);
547 GSequenceIter *iter = g_sequence_append (seq->sequence, new_item (seq));
548 g_queue_push_tail (seq->queue, iter);
556 GSequenceIter *iter = g_sequence_prepend (seq->sequence, new_item (seq));
557 g_queue_push_head (seq->queue, iter);
566 GSequenceIter *iter = get_random_iter (seq, &link);
570 new_iter = g_sequence_insert_before (iter, new_item (seq));
605 /* Moving an iter to itself should have no effect */
646 GSequenceIter *iter =
649 g_queue_insert_sorted (seq->queue, iter, compare_iters, NULL);
669 GSequenceIter *iter;
671 iter = g_sequence_insert_sorted_iter (seq->sequence,
676 g_queue_insert_sorted (seq->queue, iter, compare_iters, NULL);
696 GSequenceIter *iter = get_random_iter (seq, &link);
698 if (!g_sequence_iter_is_end (iter))
700 g_sequence_set (iter, new_item (seq));
701 g_sequence_sort_changed (iter, compare_items, NULL);
704 iter, compare_iters, NULL);
723 GSequenceIter *iter = get_random_iter (seq, &link);
725 if (!g_sequence_iter_is_end (iter))
727 g_sequence_set (iter, new_item (seq));
728 g_sequence_sort_changed_iter (iter,
732 g_queue_insert_sorted (seq->queue, iter, compare_iters, NULL);
746 GSequenceIter *iter = get_random_iter (seq, &link);
748 if (!g_sequence_iter_is_end (iter))
750 g_sequence_remove (iter);
887 GSequenceIter *iter;
890 iter = get_random_iter (seq, &link);
892 if (!g_sequence_iter_is_end (iter))
901 g_sequence_set (iter, item);
902 g_assert (g_sequence_get (iter) == item);
906 g_sequence_set (iter, new_item (seq));
910 g_sequence_set (iter, new_item (seq));
918 GSequenceIter *iter;
920 iter = g_sequence_get_iter_at_pos (seq->sequence, 0);
922 g_assert (g_sequence_iter_is_begin (iter));
940 GSequenceIter *iter;
943 iter = g_sequence_get_iter_at_pos (seq->sequence, len);
945 g_assert (g_sequence_iter_is_end (iter));
1003 GSequenceIter *iter = get_random_iter (seq, &link);
1005 g_assert (g_sequence_iter_get_position (iter) ==
1012 GSequenceIter *iter;
1015 iter = get_random_iter (seq, NULL);
1016 pos = g_sequence_iter_get_position (iter);
1017 iter = g_sequence_iter_move (iter, len - pos);
1018 g_assert (g_sequence_iter_is_end (iter));
1021 iter = get_random_iter (seq, NULL);
1022 pos = g_sequence_iter_get_position (iter);
1025 g_assert (!g_sequence_iter_is_end (iter));
1027 iter = g_sequence_iter_move (iter, 1);
1029 g_assert (g_sequence_iter_is_end (iter));
1034 GSequenceIter *iter = get_random_iter (seq, NULL);
1036 g_assert (g_sequence_iter_get_sequence (iter) == seq->sequence);
1170 GSequenceIter *iter = g_sequence_get_begin_iter (seq);
1172 g_sequence_iter_move (iter, 5);
1174 g_assert (g_sequence_iter_is_begin (iter));
1175 g_assert (g_sequence_iter_is_end (iter));
1238 GSequenceIter *iter;
1248 iter = g_sequence_get_begin_iter (seq);
1249 g_assert (g_sequence_iter_get_sequence (iter) == seq);
1251 while (!g_sequence_iter_is_end (iter))
1254 g_assert (iters[i++] == iter);
1256 iter = g_sequence_iter_next (iter);
1263 iter = g_sequence_get_begin_iter (seq);
1264 while (!g_sequence_iter_is_end (iter))
1267 g_assert (iters[i] == iter);
1269 iter = g_sequence_iter_next (iter);
1284 iter = g_sequence_get_begin_iter (seq);
1285 while (!g_sequence_iter_is_end (iter))
1287 g_assert (iters[i++] == iter);
1289 iter = g_sequence_iter_next (iter);