Skip to content

Commit

Permalink
tests: simde_assert_equal_{v,}f funcs were silently failing
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed May 7, 2023
1 parent 356db0c commit 395efd9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ simde_assert_equal_vf16_(
}
return 0;
}
#define simde_assert_equal_vf16(vec_len, a, b, precision) simde_assert_equal_vf16_(vec_len, a, b, simde_test_f16_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)
#define simde_assert_equal_vf16(vec_len, a, b, precision) do { if (simde_assert_equal_vf16_(vec_len, a, b, simde_test_f16_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)) { return 1; } } while (0)

static int
simde_assert_equal_f16_(simde_float16 a, simde_float16 b, simde_float16 slop,
Expand All @@ -729,7 +729,7 @@ simde_assert_equal_f16_(simde_float16 a, simde_float16 b, simde_float16 slop,
}
return 0;
}
#define simde_assert_equal_f16(a, b, precision) simde_assert_equal_f16_(a, b, simde_test_f16_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)
#define simde_assert_equal_f16(a, b, precision) do { if (simde_assert_equal_f16_(a, b, simde_test_f16_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)) { return 1; } } while (0)

static int
simde_assert_equal_vf32_(
Expand All @@ -744,7 +744,7 @@ simde_assert_equal_vf32_(
}
return 0;
}
#define simde_assert_equal_vf32(vec_len, a, b, precision) simde_assert_equal_vf32_(vec_len, a, b, simde_test_f32_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)
#define simde_assert_equal_vf32(vec_len, a, b, precision) do { if (simde_assert_equal_vf32_(vec_len, a, b, simde_test_f32_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)) { return 1; } } while (0)

static int
simde_assert_equal_f32_(simde_float32 a, simde_float32 b, simde_float32 slop,
Expand All @@ -756,7 +756,7 @@ simde_assert_equal_f32_(simde_float32 a, simde_float32 b, simde_float32 slop,
}
return 0;
}
#define simde_assert_equal_f32(a, b, precision) simde_assert_equal_f32_(a, b, simde_test_f32_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)
#define simde_assert_equal_f32(a, b, precision) do { if (simde_assert_equal_f32_(a, b, simde_test_f32_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)) { return 1; } } while (0)

static int
simde_assert_equal_vf64_(
Expand All @@ -771,7 +771,7 @@ simde_assert_equal_vf64_(
}
return 0;
}
#define simde_assert_equal_vf64(vec_len, a, b, precision) simde_assert_equal_vf64_(vec_len, a, b, simde_test_f64_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)
#define simde_assert_equal_vf64(vec_len, a, b, precision) do { if (simde_assert_equal_vf64_(vec_len, a, b, simde_test_f64_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)) { return 1; } } while (0)

static int
simde_assert_equal_f64_(simde_float64 a, simde_float64 b, simde_float64 slop,
Expand All @@ -783,7 +783,7 @@ simde_assert_equal_f64_(simde_float64 a, simde_float64 b, simde_float64 slop,
}
return 0;
}
#define simde_assert_equal_f64(a, b, precision) simde_assert_equal_f64_(a, b, simde_test_f64_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)
#define simde_assert_equal_f64(a, b, precision) do { if (simde_assert_equal_f64_(a, b, simde_test_f64_precision_to_slop(precision), __FILE__, __LINE__, #a, #b)) { return 1; } } while (0)

#define SIMDE_TEST_GENERATE_ASSERT_EQUAL_FUNC_(T, symbol_identifier, fmt) \
static int \
Expand Down

0 comments on commit 395efd9

Please sign in to comment.