[glib] GKeyFile: improve test coverage
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GKeyFile: improve test coverage
- Date: Mon, 6 Jun 2011 05:15:10 +0000 (UTC)
commit 698bb5d962d8eebfe5315ca550870727b5c93117
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 6 01:14:00 2011 -0400
GKeyFile: improve test coverage
glib/tests/keyfile.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/keyfile.c b/glib/tests/keyfile.c
index f5b0528..c30921d 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]