summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorPeter Meerwald <pmeerw@pmeerw.net>2014-08-06 11:47:33 +0200
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>2014-08-10 12:20:52 +0300
commite14863334b7e9267b3b3bbab08edf4a019411e89 (patch)
tree2531708e9c0d27e187d05f3ab8368bbb1484389b /src/tests
parent6d9891e8b951e6d41e10fccd18851dcd31f6ee7c (diff)
tests: Cleanup mix-test
indentation and use of fabsf() for floats Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/mix-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/mix-test.c b/src/tests/mix-test.c
index 9e5a0cc50..c0cd55971 100644
--- a/src/tests/mix-test.c
+++ b/src/tests/mix-test.c
@@ -202,7 +202,7 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_FLOAT32_SWAP(*u);
- fail_unless(fabs(uu - *v) <= 1e-6, NULL);
+ fail_unless(fabsf(uu - *v) <= 1e-6f, NULL);
++u;
++v;
}
@@ -215,7 +215,7 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_FLOAT32_SWAP(*u);
- fail_unless(fabs(uu - *v) <= 1e-6, NULL);
+ fail_unless(fabsf(uu - *v) <= 1e-6f, NULL);
++u;
++v;
}
@@ -385,7 +385,7 @@ static pa_memblock* generate_block(pa_mempool *pool, const pa_sample_spec *ss) {
for (i = 0; i < 10; i++)
u[i] = PA_FLOAT32_SWAP(float_samples[i]);
} else
- memcpy(d, float_samples, sizeof(float_samples));
+ memcpy(d, float_samples, sizeof(float_samples));
break;
}