19 #include <boost/test/unit_test.hpp>
25 BOOST_AUTO_TEST_SUITE(bitstream)
43 const boost::uint32_t length = 3;
46 BOOST_CHECK_EQUAL(virtexFrame1.
getLength(), length);
47 BOOST_CHECK_EQUAL(virtexFrame1.
isUsed(),
true);
48 BOOST_CHECK_EQUAL(virtexFrame1.
isDirty(),
false);
50 for(boost::uint32_t i = 0; i < length; i++) {
51 BOOST_CHECK_EQUAL(virtexFrame1[i], data[i]);
52 BOOST_CHECK_EQUAL(*(p1 + i), data[i]);
56 BOOST_CHECK_EQUAL(virtexFrame2.
getLength(), length);
57 BOOST_CHECK_EQUAL(virtexFrame2.
isUsed(),
true);
58 BOOST_CHECK_EQUAL(virtexFrame2.
isDirty(),
true);
61 for(boost::uint32_t i = 0; i < length; i++) {
62 BOOST_CHECK_EQUAL(virtexFrame2[i], 0u);
66 BOOST_AUTO_TEST_SUITE_END()
bool isUsed(void) const
Returns a non-const raw word pointer.
const word_t * getWords(void) const
Returns a const raw word pointer.
void setDirty(bool inIsDirty=true)
Marks the frame dirty or clean, and if dirty automatically marks it used.
Header for the Frame class.
uint32_t getLength(void) const
Returns the length of the frame in words.
bool isDirty(void) const
Returns true if the frame has been modified, or false otherwise.
BOOST_AUTO_TEST_CASE(hexCharacterToDec)
WORD_TYPE word_t
Frame word type.