Coverage Tests - Project 1B Array Deque 61B
Flags for add tests
add_first_from_empty: Check thataddFirstworks on an empty deque.add_last_from_empty: Check thataddLastworks on an empty deque.add_first_nonempty: Check thataddFirstworks on a non-empty deque.add_last_nonempty: Check thataddLastworks on a non-empty deque.add_first_trigger_resize: Check thataddFirstworks when called on a full underlying arrayadd_last_trigger_resize: Check thataddLastworks 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 thataddFirststill works.add_last_after_remove_to_empty: Add some elements to a deque and remove them all, then check thataddLaststill works.
Flags for remove Tests
remove_first: Check thatremoveFirstworks.remove_last: Check thatremoveLastworks.remove_first_to_empty: Add some elements to a deque and remove almost all of them. Check that removing the last element withremoveFirstworks.remove_last_to_empty: Add some elements to a deque and remove almost all of them. Check that removing the last element withremoveLastworks.remove_first_to_one: Add some elements to a deque and remove almost all of them. Check that removing the second to last element withremoveFirstworks.remove_last_to_one: Add some elements to a deque and remove almost all of them. Check that removing the second to last element withremoveLastworks.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 thattoListworks with emptyArrayDeque.to_list_nonempty: Check thattoListworks 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.