51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
#include "execute_tests.h"
#include "test_cases_get_all_nodes_by_dev_class.h"
#include "../common/containers.h"
static bool test_steps_mesh_get_node_by_dev_class_02(void) {
meshlink_node_t **nodes;
size_t nnodes = 0;
- int i;
- meshlink_destroy("getnodeconf.1");
+
+ assert(meshlink_destroy("getnodeconf.1"));
/* Create meshlink instance for NUT */
meshlink_handle_t *mesh_nut = meshlink_open("getnodeconf.1", "nut", "node_sim", DEV_CLASS_STATIONARY);
assert(mesh_nut);
meshlink_set_log_cb(mesh_nut, TEST_MESHLINK_LOG_LEVEL, log_message);
- nodes = meshlink_get_all_nodes_by_dev_class(mesh_nut, _DEV_CLASS_MAX + 10, NULL, &nnodes);
+ nodes = meshlink_get_all_nodes_by_dev_class(mesh_nut, DEV_CLASS_COUNT + 10, NULL, &nnodes);
assert_int_equal(nodes, NULL);
assert_int_not_equal(meshlink_errno, 0);
assert_int_not_equal(meshlink_errno, 0);
meshlink_close(mesh_nut);
- meshlink_destroy("getnodeconf.1");
+ assert(meshlink_destroy("getnodeconf.1"));
return true;
}
meshlink_get_node_dev_class API should return DEV_CLASS_STATIONARY device class
*/
static bool test_steps_mesh_get_node_dev_class_01(void) {
- meshlink_destroy("getnodeconf.1");
+ assert(meshlink_destroy("getnodeconf.1"));
/* Create meshlink instance for NUT */
meshlink_handle_t *mesh_nut = meshlink_open("getnodeconf.1", "nut", "node_sim", DEV_CLASS_STATIONARY);
assert_int_equal(dev_class, DEV_CLASS_STATIONARY);
meshlink_close(mesh_nut);
- meshlink_destroy("getnodeconf.1");
+ assert(meshlink_destroy("getnodeconf.1"));
return true;
}
meshlink_errno.
*/
static bool test_steps_mesh_get_node_dev_class_02(void) {
- meshlink_destroy("getnodeconf.1");
+ assert(meshlink_destroy("getnodeconf.1"));
/* Create meshlink instance for NUT */
meshlink_handle_t *mesh_nut = meshlink_open("getnodeconf.1", "nut", "node_sim", DEV_CLASS_STATIONARY);
assert_int_not_equal(meshlink_errno, 0);
meshlink_close(mesh_nut);
- meshlink_destroy("getnodeconf.1");
+ assert(meshlink_destroy("getnodeconf.1"));
return true;
}
static int black_box_setup_test_case(void **state) {
+ (void)state;
+
fprintf(stderr, "Destroying confbases\n");
- meshlink_destroy("getnodeconf.1");
- meshlink_destroy("getnodeconf.2");
- meshlink_destroy("getnodeconf.3");
- meshlink_destroy("getnodeconf.4");
- meshlink_destroy("getnodeconf.5");
+ assert(meshlink_destroy("getnodeconf.1"));
+ assert(meshlink_destroy("getnodeconf.2"));
+ assert(meshlink_destroy("getnodeconf.3"));
+ assert(meshlink_destroy("getnodeconf.4"));
+ assert(meshlink_destroy("getnodeconf.5"));
meshlink_set_log_cb(NULL, TEST_MESHLINK_LOG_LEVEL, meshlink_callback_logger);
meshlink_errno = MESHLINK_OK;