Files
42_INT_11_ft_containers/tests/main.cpp
2022-06-24 02:23:53 +02:00

110 lines
2.5 KiB
C++

#include "main.hpp"
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();
// tests_vector_relational_operators();
// tests_vector_swap_non_member();
// tests_vector_reverse_iterators();
// MAP
// tests_map_simple();
// tests_map_constructor();
// tests_map_operator_assignation();
// tests_map_begin();
// tests_map_end();
// tests_map_rbegin();
// tests_map_rend();
// tests_map_empty();
// tests_map_size();
// tests_map_max_size();
// tests_map_operator_access();
// tests_map_insert();
// tests_map_erase();
// tests_map_swap();
// tests_map_clear();
// tests_map_key_comp();
// tests_map_value_comp();
// tests_map_find();
// tests_map_count();
// tests_map_lower_bound();
// tests_map_upper_bound();
// tests_map_equal_range();
// tests_map_get_allocator();
// tests_map_relational_operators();
// tests_map_swap_non_member();
// 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();
int sub_size;
for(int i = 0; i < size; i++)
{
std::cout << "\n" B_YELLOW "[" << i + 1 << "/" << size << "] "
<< test_list[i][0]->title << RESET << "\n";
sub_size = test_list[i].size();
for (int j = 0; j < sub_size; j++)
{
std::cout << "\n" << B_CYAN << "-- " << test_list[i][j]->type
<< " --" << RESET "\n";
test_list[i][j]->func();
delete test_list[i][j];
}
}
std::cout << "\n";
return 0;
}