X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=test%2Fview%2Fruler.cpp;h=3984e973aa026af34fc8a3cfa1b66ce85eea3b50;hp=5230e240dd9450f16757480e9e8de9b7cd89eb63;hb=866431680fdd701bfbfa5c128d7b116ea8d7d34d;hpb=aca9aa834c742ba70f49d1ac3eb2d1e02e759416 diff --git a/test/view/ruler.cpp b/test/view/ruler.cpp index 5230e24..3984e97 100644 --- a/test/view/ruler.cpp +++ b/test/view/ruler.cpp @@ -20,10 +20,10 @@ #include #include -#include "pv/view/ruler.hpp" +#include "pv/views/trace/ruler.hpp" #include "test/test.hpp" -using namespace pv::views::TraceView; +using namespace pv::views::trace; namespace { QString format(const pv::util::Timestamp& t) @@ -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); + 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); + 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); + major_period, offset, scale, width, minor_tick_count, format); const double mp = 5; const int off = 8;