51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
#include "execute_tests.h"
#include "test_cases_channel_open.h"
#include "../common/containers.h"
meshlink_channel_open should open a channel by returning a channel handler
*/
static bool test_steps_mesh_channel_open_01(void) {
- meshlink_destroy("channels_conf.1");
- meshlink_destroy("channels_conf.2");
+ assert(meshlink_destroy("channels_conf.1"));
+ assert(meshlink_destroy("channels_conf.2"));
// Open two new meshlink instance.
meshlink_handle_t *mesh1 = meshlink_open("channels_conf.1", "foo", "channels", DEV_CLASS_BACKBONE);
// Clean up.
meshlink_close(mesh2);
meshlink_close(mesh1);
- meshlink_destroy("channels_conf.1");
- meshlink_destroy("channels_conf.2");
+ assert(meshlink_destroy("channels_conf.1"));
+ assert(meshlink_destroy("channels_conf.2"));
return true;
}
/* Test Steps for meshlink_channel_open Test Case # 2*/
static bool test_steps_mesh_channel_open_02(void) {
- meshlink_destroy("channels_conf.3");
- meshlink_destroy("channels_conf.4");
+ assert(meshlink_destroy("channels_conf.3"));
+ assert(meshlink_destroy("channels_conf.4"));
// Open two new meshlink instance.
meshlink_handle_t *mesh1 = meshlink_open("channels_conf.3", "foo", "channels", DEV_CLASS_BACKBONE);
// Clean up.
meshlink_close(mesh2);
meshlink_close(mesh1);
- meshlink_destroy("channels_conf.3");
- meshlink_destroy("channels_conf.4");
+ assert(meshlink_destroy("channels_conf.3"));
+ assert(meshlink_destroy("channels_conf.4"));
return true;
}
when called by giving proper error number.
*/
static bool test_steps_mesh_channel_open_03(void) {
- meshlink_destroy("channels_conf.5");
+ assert(meshlink_destroy("channels_conf.5"));
// Open two new meshlink instance.
meshlink_handle_t *mesh = meshlink_open("channels_conf.5", "foo", "channels", DEV_CLASS_BACKBONE);
// Clean up.
meshlink_close(mesh);
- meshlink_destroy("channels_conf.5");
+ assert(meshlink_destroy("channels_conf.5"));
return true;
}
when called by giving proper error number.
*/
static bool test_steps_mesh_channel_open_04(void) {
- meshlink_destroy("channels_conf.7");
+ assert(meshlink_destroy("channels_conf.7"));
// Open two new meshlink instance.
meshlink_handle_t *mesh = meshlink_open("channels_conf.7", "foo", "channels", DEV_CLASS_BACKBONE);
// Clean up.
meshlink_close(mesh);
- meshlink_destroy("channels_conf.7");
+ assert(meshlink_destroy("channels_conf.7"));
return true;
}