[gnome-keyring] egg: Move away from deprecated g_test_trap_fork()
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] egg: Move away from deprecated g_test_trap_fork()
- Date: Mon, 2 Dec 2013 15:12:56 +0000 (UTC)
commit 9bda57a2b02e8cd8c55cea4dc88a9849ae86f859
Author: Stef Walter <stefw gnome org>
Date: Mon Dec 2 15:52:49 2013 +0100
egg: Move away from deprecated g_test_trap_fork()
Bump glib dependency to 2.38.x
configure.ac | 4 ++--
egg/tests/test-asn1.c | 20 ++++++++++++--------
2 files changed, 14 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 307be08..2b7bf26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,8 +4,8 @@ AM_INIT_AUTOMAKE(gnome-keyring, 3.10.1)
dnl ****************************************************************************
dnl Dependency versions
-GLIB_REQ=2.32.0
-GLIB_MIN=GLIB_VERSION_2_32
+GLIB_REQ=2.38.0
+GLIB_MIN=GLIB_VERSION_2_38
GLIB_MAX=GLIB_VERSION_2_38
GCK_REQ=3.3.4
diff --git a/egg/tests/test-asn1.c b/egg/tests/test-asn1.c
index c6f2dd9..3036fa5 100644
--- a/egg/tests/test-asn1.c
+++ b/egg/tests/test-asn1.c
@@ -384,6 +384,16 @@ test_integer_raw (void)
static void
test_integer_raw_not_twos_complement (void)
{
+ /* Ugh ... g_test_trap_subprocess */
+ g_test_trap_subprocess ("/asn1/integer/raw-not-twos-complement/subprocess", 0,
+ G_TEST_SUBPROCESS_INHERIT_STDOUT);
+ g_test_trap_assert_failed ();
+ g_test_trap_assert_stderr ("*not two's complement*");
+}
+
+static void
+test_integer_raw_not_twos_complement_subprocess (void)
+{
GNode *asn;
GBytes *bytes;
@@ -392,14 +402,7 @@ test_integer_raw_not_twos_complement (void)
bytes = g_bytes_new_static ("\x81\x02\x03", 3);
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR)) {
- egg_asn1x_set_integer_as_raw (asn, bytes); /* UNREACHABLE: */
- exit(0); /* UNREACHABLE: for code coverage */
- }
-
- g_test_trap_assert_failed ();
- g_test_trap_assert_stderr ("*not two's complement*");
-
+ egg_asn1x_set_integer_as_raw (asn, bytes); /* UNREACHABLE: */
g_bytes_unref (bytes);
egg_asn1x_destroy (asn);
}
@@ -2468,6 +2471,7 @@ main (int argc, char **argv)
g_test_add_func ("/asn1/integer-zero-length", test_integer_zero_length);
g_test_add_func ("/asn1/integer/raw", test_integer_raw);
g_test_add_func ("/asn1/integer/raw-not-twos-complement", test_integer_raw_not_twos_complement);
+ g_test_add_func ("/asn1/integer/raw-not-twos-complement/subprocess",
test_integer_raw_not_twos_complement_subprocess);
g_test_add_func ("/asn1/unsigned", test_unsigned);
g_test_add_func ("/asn1/unsigned/not-set", test_unsigned_not_set);
g_test_add_func ("/asn1/unsigned/default", test_unsigned_default);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]