]> sigrok.org Git - pulseview.git/blobdiff - test/logicdatasnapshot.cpp
Corrected project name in header comments
[pulseview.git] / test / logicdatasnapshot.cpp
index 32bbe81aefbee117cfcfd0fc89d12d595aa05aad..4e31bfae8f0a1d21fb10e324043f6f17fb9307b3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of the sigrok project.
+ * This file is part of the PulseView project.
  *
  * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
  *
@@ -255,8 +255,8 @@ BOOST_AUTO_TEST_CASE(LargeData)
        }
 
        //----- Test LogicDataSnapshot::get_subsampled_edges -----//
+       // Check in normal case
        vector<LogicDataSnapshot::EdgePair> 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)