-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstd_main.cpp
More file actions
77 lines (62 loc) · 1.89 KB
/
Copy pathstd_main.cpp
File metadata and controls
77 lines (62 loc) · 1.89 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* std_main.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jferrer- <jferrer-@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/12 19:02:08 by jferrer- #+# #+# */
/* Updated: 2023/03/13 01:47:53 by jferrer- ### ########.fr */
/* */
/* ************************************************************************** */
#include <iostream>
#include <vector>
#include <map>
#include <stack>
#include <algorithm>
#include <string>
#include <unistd.h>
#include "tests/tests.hpp"
void execute_all_tests();
// void execute_vector_tests();
// void execute_map_tests();
// void execute_stack_tests();
// void execute_utils_tests();
// void print_test_name(std::string name);
int main(int argc, char **argv)
{
// std::cout << STDVA << std::endl;
if (argc != 1)
{
std::string arg(argv[1]);
if (arg == std::string("-v"))
{
execute_vector_tests();
}
else if (arg == std::string("-m"))
{
execute_map_tests();
}
else if (arg == std::string("-s"))
{
execute_stack_tests();
}
else if (arg == std::string("-u"))
execute_utils_tests();
}
else
execute_all_tests();
// {
// std::string a = "leaks ";
// a += std::to_string(static_cast<int>(getpid()));
// system(a.c_str());
// }
return 0;
}
void execute_all_tests()
{
execute_vector_tests();
execute_map_tests();
execute_stack_tests();
execute_utils_tests();
}