#include #include #include "colors.h" #include // std::setw() #include "tests.hpp" // global declaration std::ostream & operator<<(std::ostream & o, mystruct const & rhs) { o << rhs.get_data()[0]; return (o); } std::vector test_list; test_base *test; std::string test_title; int main() { // VECTOR // tests_vector_constructor(); tests_vector_operator_assignation(); tests_vector_begin(); tests_vector_end(); // tests_vector_rbegin(); // tests_vector_rend(); tests_vector_size(); tests_vector_max_size(); tests_vector_resize(); tests_vector_capacity(); tests_vector_empty(); tests_vector_reserve(); tests_vector_operator_access(); tests_vector_at(); tests_vector_front(); tests_vector_back(); tests_vector_assign(); tests_vector_push_back(); tests_vector_pop_back(); tests_vector_insert(); tests_vector_erase(); tests_vector_swap(); tests_vector_clear(); tests_vector_get_allocator(); // MAP // tests_map_constructor(); // tests_map_operator_assignation(); // tests_map_begin(); // tests_map_end(); // tests_map_rbegin(); // tests_map_rend(); // tests_map_size(); // tests_map_max_size(); // tests_map_resize(); // tests_map_capacity(); // tests_map_empty(); // tests_map_reserve(); // tests_map_operator_access(); // tests_map_at(); // tests_map_front(); // tests_map_back(); // tests_map_assign(); // tests_map_push_back(); // tests_map_pop_back(); // tests_map_insert(); // tests_map_erase(); // tests_map_swap(); // tests_map_clear(); // tests_map_get_allocator(); // STACK // tests_stack_constructor(); // tests_stack_operator_assignation(); // tests_stack_begin(); // tests_stack_end(); // tests_stack_rbegin(); // tests_stack_rend(); // tests_stack_size(); // tests_stack_max_size(); // tests_stack_resize(); // tests_stack_capacity(); // tests_stack_empty(); // tests_stack_reserve(); // tests_stack_operator_access(); // tests_stack_at(); // tests_stack_front(); // tests_stack_back(); // tests_stack_assign(); // tests_stack_push_back(); // tests_stack_pop_back(); // tests_stack_insert(); // tests_stack_erase(); // tests_stack_swap(); // tests_stack_clear(); // tests_stack_get_allocator(); // execute tests and print them : int size = test_list.size(); for(int i = 0; i < size; i++) { std::cout << "\n" B_YELLOW "[" << i + 1 << "/" << size << "] " << test_list[i]->title << RESET "\n"; test_list[i]->func(); } std::cout << "\n"; return 0; }