From 4f767cf7100023341f94fa9f0d1befc5101c3d6d Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sat, 29 Sep 2012 10:11:18 +0100 Subject: [PATCH] Made longpulses a 64-bit test --- test/logicdatasnapshot.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/logicdatasnapshot.cpp b/test/logicdatasnapshot.cpp index a8f8fd3..5041c1b 100644 --- a/test/logicdatasnapshot.cpp +++ b/test/logicdatasnapshot.cpp @@ -342,16 +342,16 @@ BOOST_AUTO_TEST_CASE(LongPulses) //----- Create a LogicDataSnapshot -----// sr_datafeed_logic logic; - logic.unitsize = 1; + logic.unitsize = 8; logic.length = Length; - logic.data = (uint64_t*)new uint8_t[Length]; - uint8_t *p = (uint8_t*)logic.data; + logic.data = (uint64_t*)new uint64_t[Length]; + uint64_t *p = (uint64_t*)logic.data; for(int i = 0; i < Cycles; i++) { for(j = 0; j < PulseWidth; j++) - *p++ = 0xFF; + *p++ = ~0; for(j; j < Period; j++) - *p++ = 0x00; + *p++ = 0; } LogicDataSnapshot s(logic); @@ -368,14 +368,14 @@ BOOST_AUTO_TEST_CASE(LongPulses) for(j = 0; i < s._mip_map[0].length && j < 2; j++) { BOOST_TEST_MESSAGE( "Testing mip_map[0].data[" << i << "]"); - BOOST_CHECK_EQUAL(s.get_subsample(0, i++) & 0xFF, 0xFF); + BOOST_CHECK_EQUAL(s.get_subsample(0, i++), ~0); } for(j; i < s._mip_map[0].length && j < Period/LogicDataSnapshot::MipMapScaleFactor; j++) { BOOST_TEST_MESSAGE( "Testing mip_map[0].data[" << i << "]"); - BOOST_CHECK_EQUAL(s.get_subsample(0, i++) & 0xFF, 0x00); + BOOST_CHECK_EQUAL(s.get_subsample(0, i++), 0); } } -- 2.30.2