tests: add abstract layer for handling traps
commit919b293afb4d3f67ee48361aa6008a81e0153b22
authorNicola Fontana <ntd@entidi.it>
Mon, 2 Feb 2015 21:39:15 +0000 (2 22:39 +0100)
committerNicola Fontana <ntd@entidi.it>
Mon, 2 Feb 2015 21:39:15 +0000 (2 22:39 +0100)
treee44fbc357524eeacbab1e2bd79e908943f4db1c7
parent2a39eea190438b0c1f17358f12608eba957db379
tests: add abstract layer for handling traps

Provide a layer that works for GLib >= 2.16 that can apply the same
assertions on multiple fragments of code.

Depending if GLib version is above or below 2.38,
g_test_trap_subprocess() or the deprecated g_test_trap_fork() is used.
src/cpml/tests/test-primitive.c
src/cpml/tests/test-segment.c
src/tests/adg-test.c
src/tests/adg-test.h