[glib] GMappedFile: improve test coverage
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GMappedFile: improve test coverage
- Date: Mon, 6 Jun 2011 05:15:15 +0000 (UTC)
commit 782cf86f12a54065fedd6c232cb52c76dce32538
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 6 01:14:23 2011 -0400
GMappedFile: improve test coverage
glib/tests/mappedfile.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c
index b9f2aa1..3febfc6 100644
--- a/glib/tests/mappedfile.c
+++ b/glib/tests/mappedfile.c
@@ -6,6 +6,22 @@
#endif
static void
+test_basic (void)
+{
+ GMappedFile *file;
+ GError *error;
+
+ error = NULL;
+ file = g_mapped_file_new (SRCDIR "/empty", FALSE, &error);
+ g_assert_no_error (error);
+
+ g_mapped_file_ref (file);
+ g_mapped_file_unref (file);
+
+ g_mapped_file_unref (file);
+}
+
+static void
test_empty (void)
{
GMappedFile *file;
@@ -75,6 +91,7 @@ main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
+ g_test_add_func ("/mappedfile/basic", test_basic);
g_test_add_func ("/mappedfile/empty", test_empty);
g_test_add_func ("/mappedfile/nonexisting", test_nonexisting);
g_test_add_func ("/mappedfile/writable", test_writable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]