diff options
author | Stef Walter <stefw@gnome.org> | 2013-12-02 15:52:49 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-12-02 16:11:50 +0100 |
commit | 9bda57a2b02e8cd8c55cea4dc88a9849ae86f859 (patch) | |
tree | 346e1bf142b919f8092f493f5ea6220dde7c9d92 | |
parent | 111cbac349a159126719f6a25597375ccbb9a086 (diff) |
egg: Move away from deprecated g_test_trap_fork()
Bump glib dependency to 2.38.x
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | egg/tests/test-asn1.c | 20 |
2 files changed, 14 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index 307be08c..2b7bf262 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 c6f2dd9b..3036fa5c 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); |