tests multi types

This commit is contained in:
hugogogo
2022-06-15 19:33:39 +02:00
parent 005382a3ac
commit bb4ac9963d
6 changed files with 200 additions and 136 deletions

View File

@@ -2,49 +2,40 @@
#include <string>
#include "colors.h"
#include <iomanip> // 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_base *> test_list;
test_base *test;
std::string test_title;
#include "tests_proto.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();
test_simple();
// 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_constructor();
@@ -104,7 +95,8 @@ int main() {
{
std::cout
<< "\n" B_YELLOW "[" << i + 1 << "/" << size << "] "
<< test_list[i]->title << RESET "\n";
// << test_list[i]->title << RESET "\n";
<< RESET "\n";
test_list[i]->func();
}
std::cout << "\n";