[test/api] Use g_assert_true instead of g_assert The latter terminates the program. The former marks the test as failing.