From: Joel Holdsworth Date: Sat, 6 Oct 2012 11:15:48 +0000 (+0100) Subject: Added tests for low scale X-Git-Tag: pulseview-0.1.0~289 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ac7aa63682630456303a8a47cdf3ca3b3dd27451;p=pulseview.git Added tests for low scale --- diff --git a/test/logicdatasnapshot.cpp b/test/logicdatasnapshot.cpp index 32bbe81a..b86066c7 100644 --- a/test/logicdatasnapshot.cpp +++ b/test/logicdatasnapshot.cpp @@ -255,8 +255,8 @@ BOOST_AUTO_TEST_CASE(LargeData) } //----- Test LogicDataSnapshot::get_subsampled_edges -----// + // Check in normal case vector edges; - s.get_subsampled_edges(edges, 0, Length-1, 1, 7); BOOST_CHECK_EQUAL(edges.size(), 32); @@ -268,6 +268,12 @@ BOOST_AUTO_TEST_CASE(LargeData) } BOOST_CHECK_EQUAL(edges[31].first, 999999); + + // Check in very low zoom case + edges.clear(); + s.get_subsampled_edges(edges, 0, Length-1, 50e6f, 7); + + BOOST_CHECK_EQUAL(edges.size(), 2); } BOOST_AUTO_TEST_CASE(Pulses)