Skip to content

tests: Check error indicator before checking boolean result

Simon McVittie requested to merge wip/smcv/more-informative-assertions into master

If a GLib function that raises an error fails unexpectedly during testing, it's a lot more informative to see an assertion failure that includes details of the error, rather than just the boolean result.

For a conventional GLib function we should not look at the "out" parameters until we have checked that the function was successful.


I noticed this mistake while adding more tests, for !93 (merged).

/cc @jpwhiting @denittis

Merge request reports

Loading