Module: Mesa
Branch: master
Commit: bb5801ad98ec0958ff0d2f18df61842b3e1f0fd9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb5801ad98ec0958ff0d2f18df61842b3e1f0fd9

Author: Eric Anholt <[email protected]>
Date:   Thu Jun 27 15:46:28 2019 -0700

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 <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>

---

 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;
+   }
 }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to