/* * Send the given method call and wait for a reply, spinning the main * context as necessary. */ DBusMessage * test_main_context_call_and_wait (TestMainContext *ctx, DBusConnection *connection, DBusMessage *call, int timeout) { DBusPendingCall *pc = NULL; DBusMessage *reply = NULL; if (!dbus_connection_send_with_reply (connection, call, &pc, timeout) || pc == NULL) test_oom (); if (dbus_pending_call_get_completed (pc)) test_pending_call_store_reply (pc, &reply); else if (!dbus_pending_call_set_notify (pc, test_pending_call_store_reply, &reply, NULL)) test_oom (); while (reply == NULL) test_main_context_iterate (ctx, TRUE); dbus_clear_pending_call (&pc); return g_steal_pointer (&reply); }
int main(void) { test_empty_constructor(); test_raise_if_bev_is_null(); test_real_constructor(); test_oom(); test_access_underlying_bev_ok(); test_move_constructor(); test_move_assignment(); }
int main() { puts("Testing mathematics..."); test_math(); puts("OK!"); puts("Testing comparisons..."); test_comp(); puts("OK!"); puts("Testing comparisons..."); test_array_struct(); puts("OK!"); puts("Testing string library..."); test_lib_string(); puts("OK!"); puts("Testing alu errors..."); test_alu_errors(); puts("OK!"); puts("Testing assert, standard & setjmp library..."); test_lib_std_setjmp(); puts("OK!"); puts("Testing I/O library"); test_lib_io(); puts("OK!"); puts("Testing trap instruction..."); test_trap(); puts("OK!"); puts("Testing out of memory protection..."); test_oom(); puts("OK!"); puts("No errors found"); return 0; }