forked from subailong/datalgo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
77 lines (66 loc) · 1.6 KB
/
main.cpp
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
//
// main.cpp
// datalgo
//
// Created by Iyed Bennour on 21/10/2014.
// Copyright (c) 2014 Iyed Bennour. All rights reserved.
//
#include <iostream>
#include <vector>
#include <assert.h>
#include <set>
#include <string>
#include <algorithm>
#include <list>
#include <unordered_map>
#include <map>
#include "miscellaneous.h"
#include "strings.h"
#include "tree_tests.h"
#include "expr_tests.h"
#include "sort.h"
#include "list.h"
#include "tree.h"
#include "list_tests.h"
#define RUN_TEST(function) do {\
printf("running test: *********** %s ************: ", #function);\
if (function())\
printf("OK\n");\
else \
printf("KO\n");\
}\
while(0);
int main(int argc, const char * argv[]) {
RUN_TEST(test_delete_list)
RUN_TEST(test_add_node)
RUN_TEST(test_remove_dups2)
RUN_TEST(test_reverser_list)
RUN_TEST(test_remove_node)
RUN_TEST(test_find_node)
RUN_TEST(test_tree)
test_sortbin();
RUN_TEST(test_reverser_list)
RUN_TEST(test_remove_dups_from_array)
RUN_TEST(test_string_in_string)
RUN_TEST(test_reverse_string)
RUN_TEST(test_find_first_non_repeating_char)
RUN_TEST(test_binary_search)
RUN_TEST(test_permut)
RUN_TEST(test_find_last_n)
RUN_TEST(test_french_flag)
RUN_TEST(test_sortbin2);
RUN_TEST(test_sortbin3);
RUN_TEST(test_find_min_plt);
RUN_TEST(test_check_paren);
RUN_TEST(test_tree_find_node)
RUN_TEST(test_tree_route_to_node)
RUN_TEST(test_expr)
//RUN_TEST(test_find_solution)
RUN_TEST(test_node_per_level)
//RUN_TEST(test_set_combinations)
RUN_TEST(test_is_bst)
RUN_TEST(test_tree_length)
RUN_TEST(test_tree_balanced)
RUN_TEST(test_free_list)
return 0;
}