aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-04-22 12:57:39 -0700
committerMartin Braun <martin.braun@ettus.com>2016-04-22 12:57:39 -0700
commit4a33820cbbc67e5cd60065843e319b4409441b5e (patch)
tree469080d1ae2fc51cb8fd09d6c0feead378d39f24 /host/tests
parent3a835db75489aa11ff8bfc5080e1f2fe5dc101a0 (diff)
parent0feabd678fe3bde22e994649b9071bb05f4050d3 (diff)
downloaduhd-4a33820cbbc67e5cd60065843e319b4409441b5e.tar.gz
uhd-4a33820cbbc67e5cd60065843e319b4409441b5e.tar.bz2
uhd-4a33820cbbc67e5cd60065843e319b4409441b5e.zip
Merge branch 'maint'
Conflicts: fpga-src host/cmake/Modules/UHDVersion.cmake host/lib/usrp/b200/b200_impl.cpp
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/fp_compare_delta_test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/host/tests/fp_compare_delta_test.cpp b/host/tests/fp_compare_delta_test.cpp
index 36ff14756..d6d8a5209 100644
--- a/host/tests/fp_compare_delta_test.cpp
+++ b/host/tests/fp_compare_delta_test.cpp
@@ -237,6 +237,14 @@ BOOST_AUTO_TEST_CASE(double_greaterthanequals_operators) {
BOOST_CHECK(double(alpha._value + 3.0008) >= alpha);
}
+BOOST_AUTO_TEST_CASE(fp_compare_large_delta) {
+ BOOST_CHECK(fp_compare_delta<double>(61440000.047870710492, 0.1) == 61440000.000000000000);
+ BOOST_CHECK(fp_compare_delta<double>(61440000.047870710492, 0.1) <= 61440000.000000000000);
+ BOOST_CHECK(fp_compare_delta<double>(61440000.047870710492, 0.1) >= 61440000.000000000000);
+
+ BOOST_CHECK(fp_compare_delta<double>(1.0, 10.0) == 2.0);
+}
+
BOOST_AUTO_TEST_CASE(frequency_compare_function) {
BOOST_CHECK(uhd::math::frequencies_are_equal(6817333232.0, 6817333232.0));