X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=test%2Fdata%2Fanalogsegment.cpp;h=08b87e51639cd06fb622ecb8515e58cfe8817cd3;hb=c6e0990ea76a4c8097fb3ad89627aec34eb912c4;hp=fd7b887085acdf5acb8f8de7dd71db08be7137cb;hpb=f3d66e52ed6b454ea7a0662d5e6367e230116a2b;p=pulseview.git
diff --git a/test/data/analogsegment.cpp b/test/data/analogsegment.cpp
index fd7b887..08b87e5 100644
--- a/test/data/analogsegment.cpp
+++ b/test/data/analogsegment.cpp
@@ -14,13 +14,13 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
+#if 0
#include
-#include
+#include
#include
@@ -28,7 +28,6 @@
using pv::data::AnalogSegment;
-#if 0
BOOST_AUTO_TEST_SUITE(AnalogSegmentTest)
void push_analog(AnalogSegment &s, unsigned int num_samples,
@@ -55,7 +54,7 @@ BOOST_AUTO_TEST_CASE(Basic)
const AnalogSegment::Envelope &m = s.envelope_levels_[i];
BOOST_CHECK_EQUAL(m.length, 0);
BOOST_CHECK_EQUAL(m.data_length, 0);
- BOOST_CHECK(m.samples == NULL);
+ BOOST_CHECK(m.samples == nullptr);
}
// Push 8 samples of all zeros
@@ -69,7 +68,7 @@ BOOST_AUTO_TEST_CASE(Basic)
const AnalogSegment::Envelope &m = s.envelope_levels_[i];
BOOST_CHECK_EQUAL(m.length, 0);
BOOST_CHECK_EQUAL(m.data_length, 0);
- BOOST_CHECK(m.samples == NULL);
+ BOOST_CHECK(m.samples == nullptr);
}
// Push 8 samples of 1.0s to bring the total up to 16
@@ -80,7 +79,7 @@ BOOST_AUTO_TEST_CASE(Basic)
const AnalogSegment::Envelope &e0 = s.envelope_levels_[0];
BOOST_CHECK_EQUAL(e0.length, 1);
BOOST_CHECK_EQUAL(e0.data_length, AnalogSegment::EnvelopeDataUnit);
- BOOST_REQUIRE(e0.samples != NULL);
+ BOOST_REQUIRE(e0.samples != nullptr);
BOOST_CHECK_EQUAL(e0.samples[0].min, 0.0f);
BOOST_CHECK_EQUAL(e0.samples[0].max, 1.0f);
@@ -90,7 +89,7 @@ BOOST_AUTO_TEST_CASE(Basic)
const AnalogSegment::Envelope &m = s.envelope_levels_[i];
BOOST_CHECK_EQUAL(m.length, 0);
BOOST_CHECK_EQUAL(m.data_length, 0);
- BOOST_CHECK(m.samples == NULL);
+ BOOST_CHECK(m.samples == nullptr);
}
// Push 240 samples of all zeros to bring the total up to 256
@@ -107,7 +106,7 @@ BOOST_AUTO_TEST_CASE(Basic)
const AnalogSegment::Envelope &e1 = s.envelope_levels_[1];
BOOST_CHECK_EQUAL(e1.length, 1);
BOOST_CHECK_EQUAL(e1.data_length, AnalogSegment::EnvelopeDataUnit);
- BOOST_REQUIRE(e1.samples != NULL);
+ BOOST_REQUIRE(e1.samples != nullptr);
BOOST_CHECK_EQUAL(e1.samples[0].min, -1.0f);
BOOST_CHECK_EQUAL(e1.samples[0].max, 1.0f);
}