From 1b7bf0ce1a5b5306323730ef790b3038d4ca3979 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 15 Jul 2010 14:51:18 -0700 Subject: uhd: added test to check derive_freq_from_xx_subdev_and_dsp --- host/test/tune_helper_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/host/test/tune_helper_test.cpp b/host/test/tune_helper_test.cpp index e9fb93081..47b47beda 100644 --- a/host/test/tune_helper_test.cpp +++ b/host/test/tune_helper_test.cpp @@ -122,6 +122,9 @@ BOOST_AUTO_TEST_CASE(test_tune_helper_rx){ std::cout << tr.to_pp_string() << std::endl; BOOST_CHECK_CLOSE(tr.actual_inter_freq, 2.345e9, tolerance); BOOST_CHECK_CLOSE(tr.actual_dsp_freq, -100e3, tolerance); + + double freq_derived = derive_freq_from_rx_subdev_and_dsp(subdev.get_link(), dsp.get_link()); + BOOST_CHECK_CLOSE(freq_derived, 2.3451e9, tolerance); } BOOST_AUTO_TEST_CASE(test_tune_helper_tx){ @@ -133,4 +136,7 @@ BOOST_AUTO_TEST_CASE(test_tune_helper_tx){ std::cout << tr.to_pp_string() << std::endl; BOOST_CHECK_CLOSE(tr.actual_inter_freq, 2.345e9, tolerance); BOOST_CHECK_CLOSE(tr.actual_dsp_freq, 100e3, tolerance); + + double freq_derived = derive_freq_from_tx_subdev_and_dsp(subdev.get_link(), dsp.get_link()); + BOOST_CHECK_CLOSE(freq_derived, 2.3451e9, tolerance); } -- cgit v1.2.3