aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/convert_test.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/host/tests/convert_test.cpp b/host/tests/convert_test.cpp
index b4a616133..af2828a17 100644
--- a/host/tests/convert_test.cpp
+++ b/host/tests/convert_test.cpp
@@ -550,7 +550,10 @@ static void test_convert_types_fc32(
std::swap(out_id.input_format, out_id.output_format);
std::swap(out_id.num_inputs, out_id.num_outputs);
loopback(nsamps, in_id, out_id, input, output);
- BOOST_CHECK_EQUAL_COLLECTIONS(input.begin(), input.end(), output.begin(), output.end());
+ for (size_t i = 0; i < nsamps; i++){
+ MY_CHECK_CLOSE(input[i].real(), output[i].real(), float(1./(1 << 16)));
+ MY_CHECK_CLOSE(input[i].imag(), output[i].imag(), float(1./(1 << 16)));
+ }
}
BOOST_AUTO_TEST_CASE(test_convert_types_fc32_and_fc32){
@@ -588,7 +591,9 @@ static void test_convert_types_f32(
std::swap(out_id.input_format, out_id.output_format);
std::swap(out_id.num_inputs, out_id.num_outputs);
loopback(nsamps, in_id, out_id, input, output);
- BOOST_CHECK_EQUAL_COLLECTIONS(input.begin(), input.end(), output.begin(), output.end());
+ for (size_t i = 0; i < nsamps; i++){
+ MY_CHECK_CLOSE(input[i], output[i], float(1./(1 << 16)));
+ }
}
BOOST_AUTO_TEST_CASE(test_convert_types_f32_and_f32){