From: Eric Anholt Date: Thu, 27 Jun 2019 22:46:28 +0000 (-0700) Subject: u_half_test: Turn it into an actual unit test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb5801ad98ec0958ff0d2f18df61842b3e1f0fd9;p=mesa.git 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 Reviewed-by: Kristian H. Kristensen --- diff --git a/src/gallium/tests/unit/u_half_test.c b/src/gallium/tests/unit/u_half_test.c index a53a043bfde..48a9a2d539c 100644 --- a/src/gallium/tests/unit/u_half_test.c +++ b/src/gallium/tests/unit/u_half_test.c @@ -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; + } }