diff options
Diffstat (limited to 'host/tests')
-rw-r--r-- | host/tests/math_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/host/tests/math_test.cpp b/host/tests/math_test.cpp index 1fb01f5c1..12ede7f06 100644 --- a/host/tests/math_test.cpp +++ b/host/tests/math_test.cpp @@ -24,3 +24,11 @@ BOOST_AUTO_TEST_CASE(test_sign) BOOST_CHECK_EQUAL(uhd::math::sign(-2.3), -1); BOOST_CHECK_EQUAL(uhd::math::sign(0.0), 0); } + +BOOST_AUTO_TEST_CASE(test_wrap_frequency) +{ + BOOST_CHECK_EQUAL(uhd::math::wrap_frequency(10e6, 200e6), 10e6); + BOOST_CHECK_EQUAL(uhd::math::wrap_frequency(250e6, 200e6), 50e6); + BOOST_CHECK_EQUAL(uhd::math::wrap_frequency(120e6, 200e6), -80e6); + BOOST_CHECK_EQUAL(uhd::math::wrap_frequency(-250e6, 200e6), -50e6); +} |