[glib] Improve byte array test coverage



commit dd25bdeff14ebad9c0ffc5231032ede0c761c47e
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jul 31 00:55:57 2010 -0400

    Improve byte array test coverage

 glib/tests/array-test.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/array-test.c b/glib/tests/array-test.c
index bb7fe30..c570a8e 100644
--- a/glib/tests/array-test.c
+++ b/glib/tests/array-test.c
@@ -314,6 +314,7 @@ pointer_array_add (void)
   gpointer *segment;
 
   gparray = g_ptr_array_sized_new (1000);
+
   for (i = 0; i < 10000; i++)
     g_ptr_array_add (gparray, GINT_TO_POINTER (i));
 
@@ -552,6 +553,8 @@ byte_array_prepend (void)
   gint i;
 
   gbarray = g_byte_array_new ();
+  g_byte_array_set_size (gbarray, 1000);
+
   for (i = 0; i < 10000; i++)
     g_byte_array_prepend (gbarray, (guint8*) "abcd", 4);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]