u_half_test: Turn it into an actual unit test.

You could break the test and meson test wouldn't complain, since we
returned success either way.

Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
Eric Anholt 2019-06-27 15:46:28 -07:00
parent 3630988b1d
commit bb5801ad98

View file

@ -26,10 +26,11 @@ main(int argc, char **argv)
}
}
if(roundtrip_fails)
if(roundtrip_fails) {
printf("Failure! %u/65536 half floats failed a conversion to float and back.\n", roundtrip_fails);
else
return 1;
} else {
printf("Success!\n");
return 0;
return 0;
}
}