X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=test%2Fview%2Fruler.cpp;h=5cef38d5ce20211c1ca8e329ca8e05f0a62629a1;hp=37ba9c8673e6db327977ac6caba48c3872862c1d;hb=2543cd4e271ff13898080d011a8fdbc13da77655;hpb=f23c46921d031dba4c96062164cc9f3ca3c4809c diff --git a/test/view/ruler.cpp b/test/view/ruler.cpp index 37ba9c8..5cef38d 100644 --- a/test/view/ruler.cpp +++ b/test/view/ruler.cpp @@ -42,9 +42,10 @@ BOOST_AUTO_TEST_CASE(tick_position_test_0) const pv::util::Timestamp offset("0"); const double scale(0.001); const int width(500); + const unsigned int minor_tick_count(4); - const Ruler::TickPositions ts = Ruler::calculate_tick_positions( - major_period, offset, scale, width, format); + const TickPositions ts = Ruler::calculate_tick_positions( + major_period, offset, scale, width, minor_tick_count, format); BOOST_REQUIRE_EQUAL(ts.major.size(), 6); @@ -88,9 +89,10 @@ BOOST_AUTO_TEST_CASE(tick_position_test_1) const pv::util::Timestamp offset("-0.463"); const double scale(0.001); const int width(500); + const unsigned int minor_tick_count(4); - const Ruler::TickPositions ts = Ruler::calculate_tick_positions( - major_period, offset, scale, width, format); + const TickPositions ts = Ruler::calculate_tick_positions( + major_period, offset, scale, width, minor_tick_count, format); BOOST_REQUIRE_EQUAL(ts.major.size(), 5); @@ -132,9 +134,10 @@ BOOST_AUTO_TEST_CASE(tick_position_test_2) const pv::util::Timestamp offset("8"); const double scale(0.129746); const int width(580); + const unsigned int minor_tick_count(4); - const Ruler::TickPositions ts = Ruler::calculate_tick_positions( - major_period, offset, scale, width, format); + const TickPositions ts = Ruler::calculate_tick_positions( + major_period, offset, scale, width, minor_tick_count, format); const double mp = 5; const int off = 8;