aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/convert_test.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-07-17 18:44:48 -0700
committerMartin Braun <martin.braun@ettus.com>2017-07-17 18:44:48 -0700
commit3d5176874f90f9155c1591656df8a7d663b3c712 (patch)
tree3693c123057a9420b273f595e6609fb32343130c /host/tests/convert_test.cpp
parent47c853f9dd518ef25d23b94bc0e77dbda3c2ddab (diff)
parent684fd3a3ffaf31b9fa726ccf2fdea2627f6ea10d (diff)
downloaduhd-3d5176874f90f9155c1591656df8a7d663b3c712.tar.gz
uhd-3d5176874f90f9155c1591656df8a7d663b3c712.tar.bz2
uhd-3d5176874f90f9155c1591656df8a7d663b3c712.zip
Merge branch 'maint'
Diffstat (limited to 'host/tests/convert_test.cpp')
-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){