On Wed, 17 Jul 2019 at 15:48, Józef Kucia joseph.kucia@gmail.com wrote:
+static bool compare_uint64(uint64_t a, uint64_t b, unsigned int max_diff) +{
- return abs(a - b) <= max_diff;
+}
llabs()?
- static const struct
- {
const float *color;uint64_t expected;bool is_todo;- }
- test_r16g16b16a16_unorm[] =
- {
{green, 0xffff0000},- },
- test_r16g16b16a16_uint[] =
- {
{green, 0x0010000, true},{color, 0x00000000, true},{negative_value, 0x00000001, true},- },
- test_r16g16b16a16_sint[] =
- {
{green, 0x0010000, true},{color, 0x00000000, true},{negative_value, 0xfffe0000ffff0001, true},- };
Like 1/6, do these need to be separate arrays/loops?