/* HELPER FUNCTIONS */
-void ut_eom_cb(eom_output_id output_id, void *user_data) {}
+void ut_eom_cb(eom_output_id __attribute__ ((unused)) output_id,
+ void __attribute__ ((unused)) *user_data) {}
-void ut_eom_cb1(eom_output_id output_id, void *user_data) {}
+void ut_eom_cb1(eom_output_id __attribute__ ((unused)) output_id,
+ void __attribute__ ((unused)) *user_data) {}
static void _init_test()
{
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_set_output_window(output_id, win);
+ error = (eom_error_e)eom_set_output_window(output_id, win);
ASSERT_EQ(error, expected_error);
}
output_info_list = &list;
EOM_WAYLEND_RET_ERROR = 1;
- error = eom_set_output_window(output_id, win);
+ error = (eom_error_e)eom_set_output_window(output_id, win);
ASSERT_EQ(error, expected_error);
}
output_info_list = &list;
EOM_WAYLEND_ERROR = 1;
- error = eom_set_output_window(output_id, win);
+ error = (eom_error_e)eom_set_output_window(output_id, win);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_output_window(output_id, win);
+ error = (eom_error_e)eom_set_output_window(output_id, win);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_output_window(0, win);
+ error = (eom_error_e)eom_set_output_window(0, win);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_output_window(output_id, NULL);
+ error = (eom_error_e)eom_set_output_window(output_id, NULL);
ASSERT_EQ(error, expected_error);
}
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_physical_size(output_id, &phy_width, &phy_height);
+ error = (eom_error_e)eom_get_output_physical_size(output_id, &phy_width,
+ &phy_height);
last_result = get_last_result();
_init_test();
- error = eom_get_output_physical_size(output_id, NULL, NULL);
+ error = (eom_error_e)eom_get_output_physical_size(output_id, NULL, NULL);
last_result = get_last_result();
_init_test();
- error = eom_get_output_physical_size(0, NULL, NULL);
+ error = (eom_error_e)eom_get_output_physical_size(0, NULL, NULL);
ASSERT_EQ(error, expected_error);
}
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_resolution(output_id, &width, &height);
+ error = (eom_error_e)eom_get_output_resolution(output_id, &width, &height);
last_result = get_last_result();
_init_test();
- error = eom_get_output_resolution(output_id, NULL, NULL);
+ error = (eom_error_e)eom_get_output_resolution(output_id, NULL, NULL);
last_result = get_last_result();
_init_test();
- error = eom_get_output_resolution(0, NULL, NULL);
+ error = (eom_error_e)eom_get_output_resolution(0, NULL, NULL);
ASSERT_EQ(error, expected_error);
}
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_attribute_state(output_id, &state);
+ error = (eom_error_e)eom_get_output_attribute_state(output_id, &state);
last_result = get_last_result();
_init_test();
- error = eom_get_output_attribute_state(output_id, &state);
+ error = (eom_error_e)eom_get_output_attribute_state(output_id, &state);
last_result = get_last_result();
_init_test();
- error = eom_get_output_attribute_state(0, &state);
+ error = (eom_error_e)eom_get_output_attribute_state(0, &state);
ASSERT_EQ(error, expected_error);
}
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_attribute(output_id, &attribute);
+ error = (eom_error_e)eom_get_output_attribute(output_id, &attribute);
last_result = get_last_result();
_init_test();
- error = eom_get_output_attribute(output_id, &attribute);
+ error = (eom_error_e)eom_get_output_attribute(output_id, &attribute);
last_result = get_last_result();
_init_test();
- error = eom_get_output_attribute(0, &attribute);
+ error = (eom_error_e)eom_get_output_attribute(0, &attribute);
ASSERT_EQ(error, expected_error);
}
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_mode(output_id, &mode);
+ error = (eom_error_e)eom_get_output_mode(output_id, &mode);
last_result = get_last_result();
_init_test();
- error = eom_get_output_mode(output_id, &mode);
+ error = (eom_error_e)eom_get_output_mode(output_id, &mode);
last_result = get_last_result();
_init_test();
- error = eom_get_output_mode(0, &mode);
+ error = (eom_error_e)eom_get_output_mode(0, &mode);
ASSERT_EQ(error, expected_error);
}
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_type(output_id, &type);
+ error = (eom_error_e)eom_get_output_type(output_id, &type);
last_result = get_last_result();
_init_test();
- error = eom_get_output_type(output_id, &type);
+ error = (eom_error_e)eom_get_output_type(output_id, &type);
last_result = get_last_result();
_init_test();
- error = eom_get_output_type(0, &type);
+ error = (eom_error_e)eom_get_output_type(0, &type);
ASSERT_EQ(error, expected_error);
}
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_set_output_attribute(output_id, attr);
+ error = (eom_error_e)eom_set_output_attribute(output_id, attr);
ASSERT_EQ(error, expected_error);
ASSERT_EQ(output_info.attribute, attr);
output_info_list = &list;
EOM_WAYLEND_RET_ERROR = 1;
- error = eom_set_output_attribute(output_id, attr);
+ error = (eom_error_e)eom_set_output_attribute(output_id, attr);
ASSERT_EQ(error, expected_error);
}
output_info_list = &list;
EOM_WAYLEND_ERROR = 1;
- error = eom_set_output_attribute(output_id, attr);
+ error = (eom_error_e)eom_set_output_attribute(output_id, attr);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_output_attribute(output_id, attr);
+ error = (eom_error_e)eom_set_output_attribute(output_id, attr);
last_result = get_last_result();
_init_test();
- error = eom_set_output_attribute(output_id, attr);
+ error = (eom_error_e)eom_set_output_attribute(output_id, attr);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_output_attribute(1, attr);
+ error = (eom_error_e)eom_set_output_attribute(1, attr);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_output_attribute(0, attr);
+ error = (eom_error_e)eom_set_output_attribute(0, attr);
ASSERT_EQ(error, expected_error);
}
_init_test();
cb_info1.attribute_change_func = ut_eom_cb1;
- cb_info2 = calloc(1, sizeof(eom_output_notify_cb_info));
+ cb_info2 = (eom_output_notify_cb_info *)
+ calloc(1, sizeof(eom_output_notify_cb_info));
cb_info2->attribute_change_func = ut_eom_cb;
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, cb_info2);
FREE_TESTED_PTR = cb_info2;
- error = eom_unset_attribute_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_attribute_changed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, cb_info2);
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, &cb_info2);
- error = eom_unset_attribute_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_attribute_changed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, &cb_info2);
_init_test();
- error = eom_unset_attribute_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_attribute_changed_cb(ut_eom_cb);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_unset_attribute_changed_cb(NULL);
+ error = (eom_error_e)eom_unset_attribute_changed_cb(NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_attribute_changed_cb(ut_eom_cb, &user_data);
+ error = (eom_error_e)eom_set_attribute_changed_cb(ut_eom_cb, &user_data);
ASSERT_EQ(error, expected_error);
ASSERT_TRUE(cb_info_list != NULL);
CALLOC_ERROR = 1;
- error = eom_set_attribute_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_attribute_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
list1.next = &list;
list.prev = &list1;
- error = eom_set_attribute_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_attribute_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
cb_info_list = &list;
list.next = list.prev = NULL;
- error = eom_set_attribute_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_attribute_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_attribute_changed_cb(NULL, NULL);
+ error = (eom_error_e)eom_set_attribute_changed_cb(NULL, NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
cb_info1.mode_change_func = ut_eom_cb1;
- cb_info2 = calloc(1, sizeof(eom_output_notify_cb_info));
+ cb_info2 = (eom_output_notify_cb_info *)
+ calloc(1, sizeof(eom_output_notify_cb_info));
cb_info2->mode_change_func = ut_eom_cb;
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, cb_info2);
FREE_TESTED_PTR = cb_info2;
- error = eom_unset_mode_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_mode_changed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, cb_info2);
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, &cb_info2);
- error = eom_unset_mode_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_mode_changed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, &cb_info2);
_init_test();
- error = eom_unset_mode_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_mode_changed_cb(ut_eom_cb);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_unset_mode_changed_cb(NULL);
+ error = (eom_error_e)eom_unset_mode_changed_cb(NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_mode_changed_cb(ut_eom_cb, &user_data);
+ error = (eom_error_e)eom_set_mode_changed_cb(ut_eom_cb, &user_data);
ASSERT_EQ(error, expected_error);
ASSERT_TRUE(cb_info_list != NULL);
cb_info_list = NULL;
CALLOC_ERROR = 1;
- error = eom_set_mode_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_mode_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
list1.next = &list;
list.prev = &list1;
- error = eom_set_mode_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_mode_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
cb_info_list = &list;
list.next = list.prev = NULL;
- error = eom_set_mode_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_mode_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_mode_changed_cb(NULL, NULL);
+ error = (eom_error_e)eom_set_mode_changed_cb(NULL, NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
cb_info1.remove_func = ut_eom_cb1;
- cb_info2 = calloc(1, sizeof(eom_output_notify_cb_info));
+ cb_info2 = (eom_output_notify_cb_info *)
+ calloc(1, sizeof(eom_output_notify_cb_info));
cb_info2->remove_func = ut_eom_cb;
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, cb_info2);
FREE_TESTED_PTR = cb_info2;
- error = eom_unset_output_removed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_removed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, cb_info2);
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, &cb_info2);
- error = eom_unset_output_removed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_removed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, &cb_info2);
_init_test();
- error = eom_unset_output_removed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_removed_cb(ut_eom_cb);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_unset_output_removed_cb(NULL);
+ error = (eom_error_e)eom_unset_output_removed_cb(NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_output_removed_cb(ut_eom_cb, &user_data);
+ error = (eom_error_e)eom_set_output_removed_cb(ut_eom_cb, &user_data);
ASSERT_EQ(error, expected_error);
ASSERT_TRUE(cb_info_list != NULL);
CALLOC_ERROR = 1;
- error = eom_set_output_removed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_removed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
list1.next = &list;
list.prev = &list1;
- error = eom_set_output_removed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_removed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
cb_info_list = &list;
list.next = list.prev = NULL;
- error = eom_set_output_removed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_removed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_output_removed_cb(NULL, NULL);
+ error = (eom_error_e)eom_set_output_removed_cb(NULL, NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
cb_info1.add_func = ut_eom_cb1;
- cb_info2 = calloc(1, sizeof(eom_output_notify_cb_info));
+ cb_info2 = (eom_output_notify_cb_info *)
+ calloc(1, sizeof(eom_output_notify_cb_info));
cb_info2->add_func = ut_eom_cb;
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, cb_info2);
FREE_TESTED_PTR = cb_info2;
- error = eom_unset_output_added_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_added_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, cb_info2);
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, &cb_info2);
- error = eom_unset_output_added_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_added_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, &cb_info2);
_init_test();
- error = eom_unset_output_added_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_added_cb(ut_eom_cb);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_unset_output_added_cb(NULL);
+ error = (eom_error_e)eom_unset_output_added_cb(NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_output_added_cb(ut_eom_cb, &user_data);
+ error = (eom_error_e)eom_set_output_added_cb(ut_eom_cb, &user_data);
ASSERT_EQ(error, expected_error);
ASSERT_TRUE(cb_info_list != NULL);
CALLOC_ERROR = 1;
- error = eom_set_output_added_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_added_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
list1.next = &list;
list.prev = &list1;
- error = eom_set_output_added_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_added_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
cb_info_list = &list;
list.next = list.prev = NULL;
- error = eom_set_output_added_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_added_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
- error = eom_set_output_added_cb(NULL, NULL);
+ error = (eom_error_e)eom_set_output_added_cb(NULL, NULL);
ASSERT_EQ(error, expected_error);
}
_init_test();
- list.next = list.prev = list.data = NULL;
+ list.next = list.prev = NULL;
+ list.data = NULL;
output_info_list = &list;
- eom_output_info *data1 = calloc(1, sizeof(eom_output_info));
+ eom_output_info *data1 = (eom_output_info *)calloc(1, sizeof(eom_output_info));
data1->width = 1;
- eom_output_info *data2 = calloc(1, sizeof(eom_output_info));
+ eom_output_info *data2 = (eom_output_info *)calloc(1, sizeof(eom_output_info));
data2->width = 2;
- eom_output_info *data3 = calloc(1, sizeof(eom_output_info));
+ eom_output_info *data3 = (eom_output_info *)calloc(1, sizeof(eom_output_info));
data3->width = 3;
output_info_list = g_list_append(output_info_list, data1);
output_info_list = g_list_append(output_info_list, data2);
_init_test();
- error = eom_init();
+ error = (eom_error_e)eom_init();
ASSERT_EQ(error, expected_error);
}
EOM_WAYLAND_CLIENT_INIT_ERROR = 1;
- error = eom_init();
+ error = (eom_error_e)eom_init();
ASSERT_EQ(error, expected_error);
}