aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 dd04dcafc..cd31a7846 100644
--- a/host/tests/convert_test.cpp
+++ b/host/tests/convert_test.cpp
@@ -551,7 +551,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){
@@ -589,7 +592,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){