GNOME Bugzilla – Bug 730447
Add testsuite
Last modified: 2014-05-30 12:18:41 UTC
hadess pointed out on IRC that we'll need a test suite for bugs such as https://bugzilla.gnome.org/show_bug.cgi?id=730402 . This is the first cut at adding one.
Created attachment 276863 [details] [review] Add testsuite skeleton
Created attachment 276897 [details] [review] tests: Add a wall clock test for colon vs ratio character use
Created attachment 276898 [details] [review] tests: Add a wall clock test for 12/24h gsettings switch
Created attachment 276900 [details] [review] tests: Add a wall clock test for the notify::clock callback
Created attachment 276904 [details] [review] tests: Add a wall clock test for the notify::clock callback
Review of attachment 276904 [details] [review]: ::: tests/wall-clock.c @@ +133,3 @@ + + /* Show seconds so we don't have to wait too long for the callback */ + g_settings_set_boolean (settings, "clock-show-seconds", TRUE); Won't that modify the settings of the user that the test suite is running under?
Review of attachment 276897 [details] [review]: Looks good
Review of attachment 276898 [details] [review]: ::: tests/wall-clock.c @@ +108,3 @@ g_test_init (&argc, &argv, NULL); + g_setenv ("GSETTINGS_BACKEND", "memory", TRUE); Shouldn't that be before g_test_init() to ensure that GIO isn't loaded before we set the GSettings backend?
Review of attachment 276904 [details] [review]: I missed the change of backend in the earlier patch.
Review of attachment 276863 [details] [review]: Looks fine.
You'll need a GTK+ test in your test suite, to check for ordering (RTL vs. LTR) correctly, for all the languages translated in po/*.po
(In reply to comment #8) > Review of attachment 276898 [details] [review]: > > ::: tests/wall-clock.c > @@ +108,3 @@ > g_test_init (&argc, &argv, NULL); > > + g_setenv ("GSETTINGS_BACKEND", "memory", TRUE); > > Shouldn't that be before g_test_init() to ensure that GIO isn't loaded before > we set the GSettings backend? Ah yes, good idea. Fixed.
Created attachment 276925 [details] [review] tests: Add a wall clock test for 12/24h gsettings switch
Review of attachment 276925 [details] [review]: Looks good
I also added a test case for GTK+' rendering of those results Attachment 276863 [details] pushed as 08406dc - Add testsuite skeleton Attachment 276897 [details] pushed as 4faf1d2 - tests: Add a wall clock test for colon vs ratio character use Attachment 276904 [details] pushed as cb9597a - tests: Add a wall clock test for the notify::clock callback Attachment 276925 [details] pushed as 2616fe3 - tests: Add a wall clock test for 12/24h gsettings switch