[glib] GVariant tests: test with larger strings
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GVariant tests: test with larger strings
- Date: Sat, 29 Nov 2014 19:22:36 +0000 (UTC)
commit 296c710c64c3f145674a6c20357d4c0b0da1b393
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Nov 28 17:55:28 2014 -0500
GVariant tests: test with larger strings
Allocate some larger strings in the testcase to make sure we handle them
correctly as well.
glib/tests/gvariant.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/tests/gvariant.c b/glib/tests/gvariant.c
index 9152a43..e13aa82 100644
--- a/glib/tests/gvariant.c
+++ b/glib/tests/gvariant.c
@@ -1885,7 +1885,7 @@ struct _TreeInstance
union {
guint64 integer;
gdouble floating;
- gchar string[32];
+ gchar string[200];
} data;
gsize data_size;
};
@@ -2004,7 +2004,7 @@ tree_instance_new (const GVariantType *type,
break;
case 's': case 'o': case 'g':
- instance->data_size = g_test_rand_int_range (10, 20);
+ instance->data_size = g_test_rand_int_range (10, 200);
make_random_string (instance->data.string, instance->data_size, type);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]