After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657766 - tests: Add tests for flat GValue arrays
tests: Add tests for flat GValue arrays
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-08-30 22:01 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2015-02-07 16:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: Add tests for flat GValue arrays (1.69 KB, patch)
2011-08-30 22:01 UTC, Jasper St. Pierre (not reading bugmail)
rejected Details | Review
tests: Add tests for flat GValue arrays (1.67 KB, patch)
2011-09-01 19:09 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
tests: Add tests for flat GValue arrays (3.13 KB, patch)
2012-01-04 21:11 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-08-30 22:01:32 UTC
Just some tests for work in gjs to support flat arrays
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-08-30 22:01:34 UTC
Created attachment 195254 [details] [review]
tests: Add tests for flat GValue arrays
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-09-01 19:09:20 UTC
Created attachment 195434 [details] [review]
tests: Add tests for flat GValue arrays
Comment 3 Colin Walters 2012-01-04 00:01:00 UTC
Review of attachment 195434 [details] [review]:

You're only adding one test here - So "Add input test for flat GValue array"?

Do we want to support returning flat GValue arrays?  If so, we should add the test now.

::: tests/gimarshallingtests.c
@@ +2831,3 @@
+    g_assert (g_value_get_int (&values[0]) == 42);
+    g_assert (g_str_equal(g_value_get_string (&values[1]), "42"));
+    g_assert (g_value_get_boolean (&values[2]) == TRUE);

This is OK (I know the other tests use g_assert), but GTester has a nicer family of assertion functions, e.g.:

g_assert_cmpstr (g_value_get_string (&values[1]), ==, "42")

The value is it prints out the failing value when it's triggered so you don't have to hunt in gdb.
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-01-04 21:11:04 UTC
Created attachment 204636 [details] [review]
tests: Add tests for flat GValue arrays

OK.
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-01-06 21:02:02 UTC
Attachment 204636 [details] pushed as bc7b328 - tests: Add tests for flat GValue arrays
Comment 6 André Klapper 2015-02-07 16:50:53 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]