Update contrib.
1 /* Portion Copyright © 2008-09 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.*/
2 #undef G_DISABLE_ASSERT
5 #ifdef GLIB_COMPILATION
6 #undef GLIB_COMPILATION
16 #include "mrt2_glib2_test.h"
20 void g_date_debug_print(GDate* d)
22 if (!d) g_print("NULL!\n");
24 g_print("julian: %u (%s) DMY: %u %u %u (%s)\n",
26 d->julian ? "valid" : "invalid",
30 d->dmy ? "valid" : "invalid");
35 /* These only work in the POSIX locale, maybe C too -
36 * type POSIX into the program to check them
38 char* posix_tests [] = {
51 int main(int argc, char** argv)
55 char** s = posix_tests;
58 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);
59 g_set_print_handler(mrtPrintHandler);
63 loc = setlocale(LC_ALL,"");
69 g_date_set_parse(d, *s);
73 g_print(" failed.\n");
74 g_assert(FALSE && "testgdateparser");
80 g_date_strftime(buf,100," parsed `%x' (%B %d %Y)\n",
88 testResultXml("testgdateparser");