VID-1953 Make the unit tests fail with a better message

Also fix a warning about matching function prototypes
Could use a space after fail(