Tests: cleanup extra whitespace

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Tests: check for < 0 rather than -1 specifically

Change test conditions for functions whose documentation
states that "a negative value" is returned on error.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>