From: Peter Meerwald <p.meerwald@xxxxxxxxxxxxxxxxxx> cleanup output of signed shorts (use 0xhx) Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com> --- src/tests/cpu-test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/cpu-test.c b/src/tests/cpu-test.c index 29e7bb6..33c2e9e 100644 --- a/src/tests/cpu-test.c +++ b/src/tests/cpu-test.c @@ -104,7 +104,7 @@ static void run_volume_test(pa_do_volume_func_t func, pa_do_volume_func_t orig_f for (i = 0; i < nsamples; i++) { if (samples[i] != samples_ref[i]) { pa_log_debug("Correctness test failed: align=%d, channels=%d", align, channels); - pa_log_debug("%d: %04x != %04x (%04x * %08x)\n", i, samples[i], samples_ref[i], + pa_log_debug("%d: %04hx != %04hx (%04hx * %08x)\n", i, samples[i], samples_ref[i], samples_orig[i], volumes[i % channels]); fail(); } @@ -278,9 +278,9 @@ static void run_conv_test_float_to_s16(pa_convert_func_t func, pa_convert_func_t func(nsamples, floats, samples); for (i = 0; i < nsamples; i++) { - if (abs(samples[i] - samples_ref[i]) > 1) { + if (abs(samples[i] - samples_ref[i]) >= 1) { pa_log_debug("Correctness test failed: align=%d", align); - pa_log_debug("%d: %04x != %04x (%.24f)\n", i, samples[i], samples_ref[i], floats[i]); + pa_log_debug("%d: %04hx != %04hx (%.24f)\n", i, samples[i], samples_ref[i], floats[i]); fail(); } } @@ -324,7 +324,7 @@ static void run_conv_test_s16_to_float(pa_convert_func_t func, pa_convert_func_t func(nsamples, samples, floats); for (i = 0; i < nsamples; i++) { - if (abs(floats[i] - floats_ref[i]) > 1) { + if (abs(floats[i] - floats_ref[i]) >= 1) { pa_log_debug("Correctness test failed: align=%d", align); pa_log_debug("%d: %.24f != %.24f (%d)\n", i, floats[i], floats_ref[i], samples[i]); fail(); -- 1.7.9.5