summaryrefslogtreecommitdiff
path: root/src/bin/evil/evil_test_util.c
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2018-02-01 20:28:57 +0100
committerCedric BAIL <cedric@osg.samsung.com>2018-02-01 13:28:36 -0800
commitd4fcff7ed43bf5b4e6e44767c9f9a1acf5535137 (patch)
tree5e0ae30f03d6d3f5152d2975d27c30011f411b35 /src/bin/evil/evil_test_util.c
parenta89c9e037aeda8cddc132072675a5bbdea089ad7 (diff)
evil: final step : remove completely the binary, useless now that the unit test is theree
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/bin/evil/evil_test_util.c')
-rw-r--r--src/bin/evil/evil_test_util.c110
1 files changed, 0 insertions, 110 deletions
diff --git a/src/bin/evil/evil_test_util.c b/src/bin/evil/evil_test_util.c
deleted file mode 100644
index 3763f88b64..0000000000
--- a/src/bin/evil/evil_test_util.c
+++ /dev/null
@@ -1,110 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif /* HAVE_CONFIG_H */
4
5#include <string.h>
6
7#include <Evil.h>
8
9#include "evil_suite.h"
10#include "evil_test_util.h"
11
12
13static int test_path_absolute_test_1(void)
14{
15 char *path;
16 int result;
17
18 path = NULL;
19 result = evil_path_is_absolute(path);
20 if (result != 0)
21 return 0;
22
23 return 1;
24}
25
26static int test_path_absolute_test_2(void)
27{
28 char *path;
29 int result;
30
31 path = "1";
32 result = evil_path_is_absolute(path);
33 if (result != 0)
34 return 0;
35
36 return 1;
37}
38
39static int test_path_absolute_test_3(void)
40{
41 char *path;
42 int result;
43
44 path = "1:\\";
45 result = evil_path_is_absolute(path);
46 if (result != 0)
47 return 0;
48
49 return 1;
50}
51
52static int test_path_absolute_test_4(void)
53{
54 char *path;
55 int result;
56
57 path = "1/\\";
58 result = evil_path_is_absolute(path);
59 if (result != 0)
60 return 0;
61
62 return 1;
63}
64
65static int test_path_absolute_test_5(void)
66{
67 char *path;
68 int result;
69
70 path = "F:/foo";
71 result = evil_path_is_absolute(path);
72 if (result == 0)
73 return 0;
74
75 return 1;
76}
77
78static int test_path_absolute_test_6(void)
79{
80 char *path;
81 int result;
82
83 path = "C:\\foo";
84 result = evil_path_is_absolute(path);
85 if (result == 0)
86 return 0;
87
88 return 1;
89}
90
91static int
92test_path_absolute_run(suite *s)
93{
94 int res;
95
96 res = test_path_absolute_test_1();
97 res &= test_path_absolute_test_2();
98 res &= test_path_absolute_test_3();
99 res &= test_path_absolute_test_4();
100 res &= test_path_absolute_test_5();
101 res &= test_path_absolute_test_6();
102
103 return res;
104}
105
106int
107test_util(suite *s)
108{
109 return test_path_absolute_run(s);
110}