From 698bb5d962d8eebfe5315ca550870727b5c93117 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 6 Jun 2011 01:14:00 -0400 Subject: [PATCH] GKeyFile: improve test coverage --- glib/tests/keyfile.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/glib/tests/keyfile.c b/glib/tests/keyfile.c index f5b0528cb..c30921da3 100644 --- a/glib/tests/keyfile.c +++ b/glib/tests/keyfile.c @@ -589,6 +589,9 @@ test_boolean (void) g_key_file_get_boolean (keyfile, "invalid", "key4", &error); check_error (&error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_INVALID_VALUE); + g_key_file_set_boolean (keyfile, "valid", "key1", FALSE); + check_boolean_value (keyfile, "valid", "key1", FALSE); + g_key_file_free (keyfile); } @@ -1324,6 +1327,13 @@ test_load (void) g_key_file_set_comment (file, NULL, NULL, "top comment", NULL); g_key_file_free (file); + + file = g_key_file_new (); + error = NULL; + g_assert (!g_key_file_load_from_data_dirs (file, "keyfile-test.ini", NULL, 0, &error)); + g_assert_error (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_NOT_FOUND); + g_error_free (error); + g_key_file_free (file); } static void