19 #include <boost/test/unit_test.hpp>
20 #include <boost/smart_ptr.hpp>
27 namespace architecture {
29 BOOST_AUTO_TEST_SUITE(architecture)
43 BOOST_CHECK(versions.
readVersions(digestStream,
true) > 0);
53 BOOST_CHECK_EQUAL(header,
">>>> Family >>>>");
54 boost::uint16_t familyNameLength;
55 digestStream.
read(familyNameLength);
56 BOOST_CHECK_EQUAL(familyNameLength, 7u);
57 boost::scoped_ptr<char> familyNamePtr(
new char[familyNameLength]);
58 digestStream.
read(familyNamePtr.get(), familyNameLength);
59 BOOST_CHECK(memcmp(familyNamePtr.get(),
"Virtex5", familyNameLength) == 0);
61 BOOST_CHECK_EQUAL(header,
">>>> Speeds >>>>");
62 uint16_t speedGradeCount;
63 digestStream.
read(speedGradeCount);
64 BOOST_CHECK_EQUAL(speedGradeCount, 3);
73 BOOST_AUTO_TEST_SUITE_END()
static const boost::filesystem::path & getDevicesPath(void)
Returns the absolute path to the family and device database directory.
size_t readVersions(DigestStream &inStream, bool inShowVersion=false)
Read the version information.
std::istream & read(uint8_t &outValue)
Read and return a uint8_t.
BOOST_AUTO_TEST_CASE(ArcUnitTest)
Unit test for the Arc class.
Header for the DirectoryTree class.
Header for the Versions class.
void readSectionHeader(string &outHeader)
Read and return a section header.
Encapsulation of database version information.
Header for the DigestStream class.
Encapsulation of a device or family digest stream.
size_t getBytesRead(void) const
Returns the number of bytes read.
Device database types for Xilinx architectures.