Coverage Tests - Project 1B Array Deque 61B
Flags for add tests
add_first_from_empty
: Check thataddFirst
works on an empty deque.add_last_from_empty
: Check thataddLast
works on an empty deque.add_first_nonempty
: Check thataddFirst
works on a non-empty deque.add_last_nonempty
: Check thataddLast
works on a non-empty deque.add_first_trigger_resize
: Check thataddFirst
works when called on a full underlying arrayadd_last_trigger_resize
: Check thataddLast
works when called on a full underlying array
Flags for add after remove tests
add_first_after_remove_to_empty
: Add some elements to a deque and remove them all, then check thataddFirst
still works.add_last_after_remove_to_empty
: Add some elements to a deque and remove them all, then check thataddLast
still works.
Flags for remove Tests
remove_first
: Check thatremoveFirst
works.remove_last
: Check thatremoveLast
works.remove_first_to_empty
: Add some elements to a deque and remove almost all of them. Check that removing the last element withremoveFirst
works.remove_last_to_empty
: Add some elements to a deque and remove almost all of them. Check that removing the last element withremoveLast
works.remove_first_to_one
: Add some elements to a deque and remove almost all of them. Check that removing the second to last element withremoveFirst
works.remove_last_to_one
: Add some elements to a deque and remove almost all of them. Check that removing the second to last element withremoveLast
works.remove_first_trigger_resize
: Called when usage factor is <= 25% and array size > 8. Checks that the array resizes appropriately.remove_last_trigger_resize
: Called when usage factor is <= 25% and array size > 8. Checks that the array resizes appropriately.
Flags for get Tests
get_valid
: Check that get works on a valid index.get_oob_large
: Check that get works on a large, out of bounds index.get_oob_neg
: Check that get works on a negative index.
Flags for size tests
size
: Check that size works.size_after_remove_to_empty
: Add some elements to a deque and remove them all, then check that size still works.size_after_remove_from_empty
: Remove from an empty deque, then check that size still works.
Flags for isEmpty Tests
is_empty_true
: Check that size works on an empty deque.is_empty_false
: Check that size works on a non- empty deque.
Flags for toList tests
to_list_empty
: Check thattoList
works with emptyArrayDeque
.to_list_nonempty
: Check thattoList
works with non-emptyArrayDeque
.
Flags for advanced resize tests
resize_up_and_resize_down
: Trigger a resize up and then a resize down in the same test.