CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
test_unit_list.c File Reference

This file contains a unit test for the CdiList functionality. More...

#include "cdi_core_api.h"
#include "cdi_logger_api.h"
#include "list_api.h"
#include "utilities_api.h"
#include <stdbool.h>

Macros

#define CHECK(condition)
 

Functions

CdiReturnStatus TestUnitList (void)
 External declarations.
 

Variables

static const bool verbose = false
 Set to true to see passing test results.
 

Detailed Description

This file contains a unit test for the CdiList functionality.

Macro Definition Documentation

◆ CHECK

#define CHECK ( condition)
Value:
do { \
if (condition) { \
if (verbose) CDI_LOG_THREAD(kLogInfo, "%s OK", #condition); \
} else { \
CDI_LOG_THREAD(kLogError, "%s failed", #condition); \
return kCdiStatusFatal; \
} \
} while (false);
@ kCdiStatusFatal
An unspecified, unrecoverable error occurred.
Definition cdi_core_api.h:194
@ kLogError
Errors to the user.
Definition cdi_log_enums.h:53
@ kLogInfo
General information to the user.
Definition cdi_log_enums.h:55
#define CDI_LOG_THREAD(log_level,...)
Macro used to generate a formatted log line and send the message to the log associated with the calli...
Definition cdi_logger_api.h:76
static const bool verbose
Set to true to see passing test results.
Definition test_unit_list.c:20

This macro performs a test. Call it with a conditional expression that must be true in order for the unit test to pass.