-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTest.h
193 lines (161 loc) · 5.85 KB
/
Test.h
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
// Copyright Kabuki Starship™ <kabukistarship.com>.
#pragma once
#include <_Config.h>
#ifndef SCRIPT2_TEST_DECL
#define SCRIPT2_TEST_DECL
/* Function pointer prototype for a test case with command line argument
.
@return Pointer to a to utf to the stdout.
@param seam_log Beginning of the seam log socket.
@param seam_end End of the seam log socket.
@param args Command line argument . */
typedef const CHA* (*TestCase)(const CHA* args);
namespace _ {
/* Handles an D_ASSERT.
@return True upon failure.
@param line The line the program failed at.
@param file The file the error occurred at.
@param message An optional message to utf. */
LIB_MEMBER void TestFunctionLine(ISN line, const CHA* funciton,
const CHA* file);
/* Handles an D_ASSERT.
@return True upon failure.
@param line The line the program failed at.
@param file The file the error occurred at.
@param message An optional message to utf. */
LIB_MEMBER BOL TestWarn(ISN line, const CHA* funciton, const CHA* file);
/* Handles an D_ASSERT.
@return True upon failure.
@param line The line the program failed at.
@param file The file the error occurred at.
@param message An optional message to utf. */
LIB_MEMBER BOL TestFail(ISN line, const CHA* funciton, const CHA* file);
/* Converts ISC main(ISC,CHA**) arguments back into a string.
@return nil if there are no arguments or the args string upon success.
@param arg_count The number_ of arguments.
@param args The arguments. */
LIB_MEMBER const CHA* ArgsToString(ISN arg_count, CHA** args);
/* Converts the result not being null into the proper OS return value for int
main (). */
LIB_MEMBER ISN SeamResult(const CHA* result);
/* Tests an array of TestCase(s).
@return 0 upon success or an app exit code upon failure. */
LIB_MEMBER ISN SeamTreeTest(ISN arg_count, CHA** args, TestCase* tests,
ISN test_count);
/* Tests an array of TestCase(s).
@return Nil upon success or an error upon failure. */
LIB_MEMBER const CHA* TestTree(const CHA* args, TestCase* seams,
ISN node_count);
/* Test function to assist in casting boolean types.
@return false if the condition is false.
@param condition The condition to check. */
LIB_MEMBER BOL Test(BOL condition);
/* Test function to assist in casting boolean types.
@return false if the condition is false.
@param value The value to test. */
LIB_MEMBER BOL Test(ISA value);
LIB_MEMBER BOL Test(IUA value);
LIB_MEMBER BOL Test(ISB value);
LIB_MEMBER BOL Test(IUB value);
LIB_MEMBER BOL Test(ISC value);
LIB_MEMBER BOL Test(IUC value);
LIB_MEMBER BOL Test(ISD value);
LIB_MEMBER BOL Test(IUD value);
LIB_MEMBER BOL Test(FPC value);
LIB_MEMBER BOL Test(FPD value);
/* Tests if the pointer is nil.
@return false if the condition is false.
@param value The value to test. */
LIB_MEMBER BOL Test(const void* value);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(const CHA* a, const CHA* b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(CHA a, CHA b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(CHB a, CHB b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(CHC a, CHC b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(const CHB* a, const CHB* b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(const CHC* a, const CHC* b);
/* Tests if the two pointers are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(const void* a, const void* b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(IUA a, IUA b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(ISA a, ISA b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(IUA a, IUA b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(ISB a, ISB b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(IUB a, IUB b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(ISC a, ISC b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(IUC a, IUC b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(ISD a, ISD b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(IUD a, IUD b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(FPC a, FPC b);
/* Tests if the given arguments are equal.
@return false if the condition is false.
@param a Parameter a.
@param b Parameter b. */
LIB_MEMBER BOL Test(FPD a, FPD b);
} //< namespace _
#endif