aboutsummaryrefslogtreecommitdiffstats
path: root/host/test/gain_group_test.cpp
diff options
context:
space:
mode:
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);
}