本文整理汇总了C++中BitVector::WriteLong方法的典型用法代码示例。如果您正苦于以下问题:C++ BitVector::WriteLong方法的具体用法?C++ BitVector::WriteLong怎么用?C++ BitVector::WriteLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitVector
的用法示例。
在下文中一共展示了BitVector::WriteLong方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Test_bitVectorLong
void BitVector_Test::Test_bitVectorLong()
{
BitVector<256>* bits = setup();
assert(bits->ReadLong(16, 64) == HexU64(0x13571112,0x13141234));
assert(bits->ReadLong(0, 32) == HexU64(0x0,0x24681357));
assert(bits->ReadLong(96, 32) == HexU64(0x0,0x9abcdef0));
assert(bits->ReadLong(160, 36) == HexU64(0x8,0x76543214));
bits->WriteLong(16,64,HexU64(0x13000012,0x13141234));
assert(bits->ReadLong(16, 64) == HexU64(0x13000012,0x13141234));
bits->WriteLong(24,16,0x5711L);
assert(bits->ReadLong(16, 64) == HexU64(0x13571112,0x13141234));
bits->WriteLong(192,64,0x0L);
assert(bits->ReadLong(160, 64) == HexU64(0x87654321,0x00000000));
assert(bits->ReadLong(192, 64) == 0x0L);
bits->WriteLong(192,64,(u64) -1L);
assert(bits->ReadLong(192, 64) == (u64) -1L);
}