aboutsummaryrefslogtreecommitdiffstats
path: root/host/test/gain_group_test.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-11 12:23:38 -0800
committerJosh Blum <josh@joshknows.com>2010-11-11 12:23:38 -0800
commit5da1e3e2d683eecce1f0e888d90caef40661e98e (patch)
tree3d3975e2b71da80835d4e1b5aed02cbeb1489661 /host/test/gain_group_test.cpp
parent314efb09459582b39ea2985bd8f9beba703076e4 (diff)
parent06e2e1e02fdc93eb00f6cf0d532ffc2943feaf06 (diff)
downloaduhd-5da1e3e2d683eecce1f0e888d90caef40661e98e.tar.gz
uhd-5da1e3e2d683eecce1f0e888d90caef40661e98e.tar.bz2
uhd-5da1e3e2d683eecce1f0e888d90caef40661e98e.zip
Merge branch 'ranges'
Diffstat (limited to 'host/test/gain_group_test.cpp')
-rw-r--r--host/test/gain_group_test.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/host/test/gain_group_test.cpp b/host/test/gain_group_test.cpp
index 555ccaed3..dbb585987 100644
--- a/host/test/gain_group_test.cpp
+++ b/host/test/gain_group_test.cpp
@@ -40,7 +40,7 @@ public:
}
void set_value(float gain){
- float step = get_range().step;
+ float step = get_range().step();
_gain = step*rint(gain/step);
}
@@ -60,7 +60,7 @@ public:
}
void set_value(float gain){
- float step = get_range().step;
+ float step = get_range().step();
_gain = step*rint(gain/step);
}
@@ -102,9 +102,9 @@ BOOST_AUTO_TEST_CASE(test_gain_group_overall){
//test the overall stuff
gg->set_value(80);
BOOST_CHECK_CLOSE(gg->get_value(), float(80), tolerance);
- BOOST_CHECK_CLOSE(gg->get_range().min, float(-20), tolerance);
- BOOST_CHECK_CLOSE(gg->get_range().max, float(100), tolerance);
- BOOST_CHECK_CLOSE(gg->get_range().step, float(0.1), tolerance);
+ BOOST_CHECK_CLOSE(gg->get_range().start(), float(-20), tolerance);
+ BOOST_CHECK_CLOSE(gg->get_range().stop(), float(100), tolerance);
+ BOOST_CHECK_CLOSE(gg->get_range().step(), float(0.1), tolerance);
}
BOOST_AUTO_TEST_CASE(test_gain_group_priority){
@@ -113,10 +113,10 @@ BOOST_AUTO_TEST_CASE(test_gain_group_priority){
//test the overall stuff
gg->set_value(80);
BOOST_CHECK_CLOSE(gg->get_value(), float(80), tolerance);
- BOOST_CHECK_CLOSE(gg->get_range().min, float(-20), tolerance);
- BOOST_CHECK_CLOSE(gg->get_range().max, float(100), tolerance);
- BOOST_CHECK_CLOSE(gg->get_range().step, float(0.1), tolerance);
+ BOOST_CHECK_CLOSE(gg->get_range().start(), float(-20), tolerance);
+ BOOST_CHECK_CLOSE(gg->get_range().stop(), float(100), tolerance);
+ BOOST_CHECK_CLOSE(gg->get_range().step(), float(0.1), tolerance);
//test the the higher priority gain got filled first (gain 2)
- BOOST_CHECK_CLOSE(g2.get_value(), g2.get_range().max, tolerance);
+ BOOST_CHECK_CLOSE(g2.get_value(), g2.get_range().stop(), tolerance);
}