From bb5801ad98ec0958ff0d2f18df61842b3e1f0fd9 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 27 Jun 2019 15:46:28 -0700 Subject: [PATCH] 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 --- src/gallium/tests/unit/u_half_test.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; + } } -- 2.30.2