Exemplo n.º 1
0
int
main (int argc, char *argv[])
{
  gint i;

  DEBUG_MSG (("debugging messages turned on"));

  DEBUG_MSG (("creating %d random numbers", SIZE));

  /* Create an array of random numbers. */
  for (i = 0; i < SIZE; i++) {
    array[i] = g_random_int_range (NUMBER_MIN, NUMBER_MAX);
    DEBUG_MSG (("number #%3.3d ---> %d", i, array[i]));
  }

  /* Start tests. */
  test_slist_sort ();
  test_slist_sort_with_data ();

  test_slist_insert_sorted ();
  test_slist_insert_sorted_with_data ();

  test_slist_reverse ();
  test_slist_nth ();

  PRINT_MSG (("testing finished"));

  return 0;
}
Exemplo n.º 2
0
int
main (int argc, char *argv[])
{
    gint i;

#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*/




    DEBUG_MSG (("debugging messages turned on"));

    DEBUG_MSG (("creating %d random numbers", SIZE));

    /* Create an array of random numbers. */
    for (i = 0; i < SIZE; i++) {
        array[i] = g_random_int_range (NUMBER_MIN, NUMBER_MAX);
        DEBUG_MSG (("number #%3.3d ---> %d", i, array[i]));
    }

    /* Start tests. */
    test_slist_sort ();
    test_slist_sort_with_data ();

    test_slist_insert_sorted ();
    test_slist_insert_sorted_with_data ();

    test_slist_reverse ();
    test_slist_nth ();

    PRINT_MSG (("testing finished"));

#ifdef SYMBIAN
    testResultXml("slist-test");
#endif /* EMULATOR */
    return 0;
}