Mesa (main): pan/bi: Drop unused test helpers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 8 19:16:06 UTC 2021


Module: Mesa
Branch: main
Commit: 55e1dc8b6482c1c0d6a807abc684506488c4c6e7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=55e1dc8b6482c1c0d6a807abc684506488c4c6e7

Author: Caio Oliveira <caio.oliveira at intel.com>
Date:   Thu Nov  4 17:41:33 2021 -0700

pan/bi: Drop unused test helpers

With the tests moved to use gtest, some helpers are not needed
anymore.

Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13684>

---

 src/panfrost/bifrost/bi_test.h | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/src/panfrost/bifrost/bi_test.h b/src/panfrost/bifrost/bi_test.h
index 4fbaafdb265..3e504cbf97e 100644
--- a/src/panfrost/bifrost/bi_test.h
+++ b/src/panfrost/bifrost/bi_test.h
@@ -31,11 +31,6 @@
 #include <inttypes.h>
 #include "compiler.h"
 
-/* Helpers for unit testing */
-#define TEST_END(nr_pass, nr_fail) \
-   printf("Passed %u/%u tests.\n", nr_pass, nr_pass + nr_fail); \
-   return nr_fail ? 1 : 0;
-
 /* Helper to generate a bi_builder suitable for creating test instructions */
 static inline bi_builder *
 bit_builder(void *memctx)
@@ -98,29 +93,4 @@ bit_shader_equal(bi_context *A, bi_context *B)
    return true;
 }
 
-#define INSTRUCTION_CASE(instr, expected, CB) do { \
-   bi_instr *left = instr; \
-   bi_instr *right = expected; \
-   CB(b, left); \
-   if (bit_instr_equal(left, right)) { \
-      nr_pass++; \
-   } else { \
-      fprintf(stderr, "Incorrect optimization\n"); \
-      bi_print_instr(instr, stderr); \
-      bi_print_instr(left, stderr); \
-      bi_print_instr(right, stderr); \
-      fprintf(stderr, "\n"); \
-      nr_fail++; \
-   } \
-} while(0)
-
-#define BIT_ASSERT(condition) do { \
-   if (condition) { \
-      nr_pass++; \
-   } else { \
-      fprintf(stderr, "Assertion failed: %s\n", #condition); \
-      nr_fail++; \
-   } \
-} while(0)
-
 #endif



More information about the mesa-commit mailing list