-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_list.h
executable file
·100 lines (84 loc) · 4.44 KB
/
test_list.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*----------------------------------------------------------
* HTBLA-Leonding / Klasse: n/a
* ---------------------------------------------------------
* Title: Unit Tests for a List implementation
* Author: S. Schraml
* ----------------------------------------------------------
* Description:
* Tests functions of a list.
* ----------------------------------------------------------
*/
#ifndef ___TEST_LIST_H
#define ___TEST_LIST_H
#include "shortcut.h"
TEST(test_list_obtain__shall_allocate_a_list);
TEST(test_list_obtain__shall_allocate_a_fresh_list);
TEST(test_list_obtain__shall_allocate_a_different_list);
TEST(test_list_obtain_failed__shall_not_allocate_a_list);
TEST(test_list_release__shall_release_a_valid_empty_list);
TEST(test_list_release__shall_release_a_valid_filled_list);
TEST(test_list_release__shall_ignore_release_of_an_invalid_list);
TEST(test_list_is_valid__shall_be_true_for_valid_list);
TEST(test_list_is_valid__shall_be_false_for_invalid_list);
TEST(test_list_insert__shall_add_one_value_to_empty_list);
TEST(test_list_insert__shall_add_multiple_values);
TEST(test_list_insert__shall_add_many_values);
TEST(test_list_insert__shall_ignore_invalid_list);
TEST(test_list_remove__shall_not_remove_from_empty_list);
TEST(test_list_remove__shall_remove_only_value);
TEST(test_list_remove__shall_remove_one_value);
TEST(test_list_remove__shall_remove_first_value);
TEST(test_list_remove__shall_remove_value_in_the_middle);
TEST(test_list_remove__shall_remove_value_at_the_end);
TEST(test_list_remove__shall_not_remove_missing_value);
TEST(test_list_remove_all__shall_not_remove_from_empty_list);
TEST(test_list_remove_all__shall_remove_only_value);
TEST(test_list_remove_all__shall_remove_all_values);
TEST(test_list_remove_all__shall_remove_one_value);
TEST(test_list_remove_all__shall_remove_all_values_in_a_row);
TEST(test_list_remove_all__shall_remove_all_distributed_values);
TEST(test_list_remove_all__shall_not_remove_missing_value);
TEST(test_list_remove_all__shall_ignore_invalid_list);
TEST(test_list_insert_at__shall_insert_single_value_in_empty_list);
TEST(test_list_insert_at__shall_insert_value_at_the_beginning);
TEST(test_list_insert_at__shall_insert_value_in_the_middle);
TEST(test_list_insert_at__shall_insert_value_at_the_end);
TEST(test_list_insert_at__shall_insert_value_after_the_end);
TEST(test_list_insert_at__shall_ignore_invalid_list);
TEST(test_list_remove_at__shall_not_remove_from_empty_list);
TEST(test_list_remove_at__shall_remove_value_at_the_beginning);
TEST(test_list_remove_at__shall_remove_value_in_the_middle);
TEST(test_list_remove_at__shall_not_remove_from_empty_list);
TEST(test_list_remove_at__shall_remove_value_at_the_end);
TEST(test_list_remove_at__shall_not_remove_value_after_the_end);
TEST(test_list_remove_at__shall_ignore_invalid_list);
TEST(test_list_clear__shall_clear_empty_list);
TEST(test_list_clear__shall_clear_list_with_one_value);
TEST(test_list_clear__shall_clear_list_with_multiple_values);
TEST(test_list_clear__shall_ingore_invalid_list);
TEST(test_list_is_empty__shall_be_true__for_newly_obtained_list);
TEST(test_list_is_empty__shall_be_false__after_adding_values);
TEST(test_list_is_empty__shall_be_true_for_invalid_list);
TEST(test_list_get_size__shall_be_0_for_newly_obtained_list);
TEST(test_list_get_size__shall_reflect_number_of_values_after_adding_values);
TEST(test_list_get_size__shall_reflect_number_of_values_after_removing_values);
TEST(test_list_get_size__shall_be_0_after_clear);
TEST(test_list_get_size__shall_be_0_for_invalid_list);
TEST(test_list_contains__shall_be_false_for_empty_list);
TEST(test_list_contains__shall_be_true_for_one_value);
TEST(test_list_contains__shall_be_true_for_multiple_values);
TEST(test_list_contains__shall_be_false_form_missing_value);
TEST(test_list_contains__shall_be_false_for_invalid_list);
TEST(test_list_swap__shall_swap_same_value);
TEST(test_list_swap__shall_swap_two_neighbor_value);
TEST(test_list_swap__shall_swap_the_first_and_the_last_value);
TEST(test_list_swap__shall_ignore_swap_of_index_out_of_bounds_1);
TEST(test_list_swap__shall_ignore_swap_of_index_out_of_bounds_2);
TEST(test_list_swap__shall_ignore_swap_of_index_out_of_bounds_3);
TEST(test_list_swap__shall_ignore_invalid_lists);
TEST(test_list_get_at__shall_return_0_for_empty_list);
TEST(test_list_get_at__shall_return_single_value);
TEST(test_list_get_at__shall_return_first_value);
TEST(test_list_get_at__shall_return_values_in_added_order);
TEST(test_list_get_at__shall_return_0_for_invalid_list);
#endif