int main (int argc, char **argv) { gint i; gint handle_id = 0; GTest *test; #ifdef SYMBIAN g_log_set_handler (NULL, G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG, &mrtLogHandler, NULL); g_set_print_handler(mrtPrintHandler); #endif /*SYMBIAN*/ g_type_init (); test = g_object_new (G_TYPE_TEST, NULL); if(!test) { g_print("object_get_property.c : g_object_new is failed @ line : %d",__LINE__); g_assert(FALSE && "properties"); } g_test_do_property (test); test_float_sink(); //g_assert (count == test->dummy); #ifdef SYMBIAN testResultXml("object_extra_tests"); #endif /* EMULATOR */ return 0; }
int main (int argc, char **argv) { gint i; GTest *test; g_thread_init (NULL); g_print ("START: %s\n", argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK)); g_type_init (); test = g_object_new (G_TYPE_TEST, NULL); g_signal_connect (test, "notify::dummy", G_CALLBACK (dummy_notify), NULL); g_assert (count == test->dummy); for (i=0; i<1000000; i++) { g_test_do_property (test); } g_assert (count == test->dummy); return 0; }
static gpointer run_thread (GTest * test) { gint i = 1; while (!stopping) { g_test_do_property (test); if ((i++ % 10000) == 0) { g_print (".%c", 'a' + test->id); g_thread_yield(); /* force context switch */ } } return NULL; }