mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-11 16:32:58 +00:00
igt.cocci: Replace igt_assert() with igt_assert_CMP() where possible
The integer comparison macros give us better error output by including the actual values that failed the comparison. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
committed by
Daniel Vetter
parent
14a3d88a09
commit
07be8fec15
@@ -141,3 +141,35 @@ a = drm_open_any();
|
||||
- return ...;
|
||||
- }
|
||||
)
|
||||
|
||||
// Use comparison macros instead of raw igt_assert when possible
|
||||
@@
|
||||
typedef uint32_t;
|
||||
uint32_t E1, E2;
|
||||
int E3, E4;
|
||||
@@
|
||||
(
|
||||
- igt_assert(E1 == E2);
|
||||
+ igt_assert_eq_u32(E1, E2);
|
||||
|
|
||||
- igt_assert(E1 != E2);
|
||||
+ igt_assert_neq_u32(E1, E2);
|
||||
|
|
||||
- igt_assert(E1 <= E2);
|
||||
+ igt_assert_lte_u32(E1, E2);
|
||||
|
|
||||
- igt_assert(E1 < E2);
|
||||
+ igt_assert_lt_u32(E1, E2);
|
||||
|
|
||||
- igt_assert(E3 == E4);
|
||||
+ igt_assert_eq(E3, E4);
|
||||
|
|
||||
- igt_assert(E3 != E4);
|
||||
+ igt_assert_neq(E3, E4);
|
||||
|
|
||||
- igt_assert(E3 <= E4);
|
||||
+ igt_assert_lte(E3, E4);
|
||||
|
|
||||
- igt_assert(E3 < E4);
|
||||
+ igt_assert_lt(E3, E4);
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user