summaryrefslogtreecommitdiffstats
path: root/host/test/ranges_test.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-05 12:17:06 -0800
committerJosh Blum <josh@joshknows.com>2011-01-05 12:17:06 -0800
commit283067dea28c2082b71793706f582ce96e667370 (patch)
tree2e728f479a2c64e4afc91ec264bd5d8822efb057 /host/test/ranges_test.cpp
parent03f4ce0fb260b8ebf7982a896fbd2ce8ab4c9c5a (diff)
downloaduhd-283067dea28c2082b71793706f582ce96e667370.tar.gz
uhd-283067dea28c2082b71793706f582ce96e667370.tar.bz2
uhd-283067dea28c2082b71793706f582ce96e667370.zip
uhd: replaced templated ranges with one range thing using doubles only to avoid trouble with compiler portability
Diffstat (limited to 'host/test/ranges_test.cpp')
-rw-r--r--host/test/ranges_test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/host/test/ranges_test.cpp b/host/test/ranges_test.cpp
index ad61867e1..bbc7f4661 100644
--- a/host/test/ranges_test.cpp
+++ b/host/test/ranges_test.cpp
@@ -24,13 +24,13 @@ using namespace uhd;
static const double tolerance = 0.001;
BOOST_AUTO_TEST_CASE(test_ranges_bounds){
- meta_range_t<double> mr;
- mr.push_back(range_t<double>(-1.0, +1.0, 0.1));
+ meta_range_t mr;
+ mr.push_back(range_t(-1.0, +1.0, 0.1));
BOOST_CHECK_CLOSE(mr.start(), -1.0, tolerance);
BOOST_CHECK_CLOSE(mr.stop(), +1.0, tolerance);
BOOST_CHECK_CLOSE(mr.step(), 0.1, tolerance);
- mr.push_back(range_t<double>(40.0, 60.0, 1.0));
+ mr.push_back(range_t(40.0, 60.0, 1.0));
BOOST_CHECK_CLOSE(mr.start(), -1.0, tolerance);
BOOST_CHECK_CLOSE(mr.stop(), 60.0, tolerance);
BOOST_CHECK_CLOSE(mr.step(), 0.1, tolerance);
@@ -43,9 +43,9 @@ BOOST_AUTO_TEST_CASE(test_ranges_bounds){
}
BOOST_AUTO_TEST_CASE(test_ranges_clip){
- meta_range_t<double> mr;
- mr.push_back(range_t<double>(-1.0, +1.0, 0.1));
- mr.push_back(range_t<double>(40.0, 60.0, 1.0));
+ meta_range_t mr;
+ mr.push_back(range_t(-1.0, +1.0, 0.1));
+ mr.push_back(range_t(40.0, 60.0, 1.0));
BOOST_CHECK_CLOSE(mr.clip(-30.0), -1.0, tolerance);
BOOST_CHECK_CLOSE(mr.clip(70.0), 60.0, tolerance);