Simplifying M2M development
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
le_test.h
Go to the documentation of this file.
1
176
//--------------------------------------------------------------------------------------------------
184
#ifndef LEGATO_TEST_INCLUDE_GUARD
185
#define LEGATO_TEST_INCLUDE_GUARD
186
187
188
//--------------------------------------------------------------------------------------------------
192
//--------------------------------------------------------------------------------------------------
193
typedef
struct
le_test_Child*
le_test_ChildRef_t
;
194
195
196
//--------------------------------------------------------------------------------------------------
202
//--------------------------------------------------------------------------------------------------
203
void
_le_test_Init(
void
);
204
void
_le_test_Fail(
void
);
205
int
_le_test_GetNumFailures(
void
);
206
le_test_ChildRef_t
_le_test_Fork(
const
char
* exePath, ...);
207
void
_le_test_Join(
le_test_ChildRef_t
child);
208
// @}
209
210
211
//--------------------------------------------------------------------------------------------------
215
//--------------------------------------------------------------------------------------------------
216
#define LE_TEST_INIT _le_test_Init()
217
218
219
//--------------------------------------------------------------------------------------------------
226
//--------------------------------------------------------------------------------------------------
227
#define LE_TEST(testResult) if (testResult) \
228
{ \
229
LE_INFO("Unit Test Passed: '%s'", #testResult); \
230
} \
231
else \
232
{ \
233
LE_ERROR("Unit Test Failed: '%s'", #testResult); \
234
_le_test_Fail(); \
235
}
236
237
238
//--------------------------------------------------------------------------------------------------
242
//--------------------------------------------------------------------------------------------------
243
#define LE_TEST_EXIT exit(_le_test_GetNumFailures());
244
246
#define LE_TEST_SUMMARY LE_TEST_EXIT
247
248
249
//--------------------------------------------------------------------------------------------------
262
//--------------------------------------------------------------------------------------------------
263
#define LE_TEST_FORK(...) _le_test_Fork(__VA_ARGS__ ,NULL)
264
265
266
//--------------------------------------------------------------------------------------------------
272
//--------------------------------------------------------------------------------------------------
273
#define LE_TEST_JOIN(child) _le_test_Join(child)
274
275
276
#endif // LEGATO_TEST_INCLUDE_GUARD
le_test_ChildRef_t
struct le_test_Child * le_test_ChildRef_t
Definition:
le_test.h:193