|
@@ -42,7 +42,7 @@ static void testRandomSetReadResize() {
|
|
for(size_t i = 0; i < bits.length; i++) {
|
|
for(size_t i = 0; i < bits.length; i++) {
|
|
CORE_TEST_U64(data[i], coreBitArrayGet(&bits, i));
|
|
CORE_TEST_U64(data[i], coreBitArrayGet(&bits, i));
|
|
}
|
|
}
|
|
- coreResizeBitArray(&bits, bits.length, bits.bits + 1);
|
|
+ coreResizeBitArray(&bits, bits.length, bits.bits + 1u);
|
|
CORE_TEST_U64(14, bits.bits);
|
|
CORE_TEST_U64(14, bits.bits);
|
|
CORE_TEST_U64(100, bits.length);
|
|
CORE_TEST_U64(100, bits.length);
|
|
for(size_t i = 0; i < bits.length; i++) {
|
|
for(size_t i = 0; i < bits.length; i++) {
|
|
@@ -60,6 +60,7 @@ static void testCopy() {
|
|
coreBitArraySet(&bits, 3, 4);
|
|
coreBitArraySet(&bits, 3, 4);
|
|
CoreBitArray copy = CORE_BIT_ARRAY;
|
|
CoreBitArray copy = CORE_BIT_ARRAY;
|
|
coreCopyBitArray(©, &bits);
|
|
coreCopyBitArray(©, &bits);
|
|
|
|
+ coreCopyBitArray(©, ©);
|
|
CORE_TEST_U64(1, coreBitArrayGet(©, 0));
|
|
CORE_TEST_U64(1, coreBitArrayGet(©, 0));
|
|
CORE_TEST_U64(2, coreBitArrayGet(©, 1));
|
|
CORE_TEST_U64(2, coreBitArrayGet(©, 1));
|
|
CORE_TEST_U64(3, coreBitArrayGet(©, 2));
|
|
CORE_TEST_U64(3, coreBitArrayGet(©, 2));
|
|
@@ -149,6 +150,7 @@ static void testMove() {
|
|
}
|
|
}
|
|
CoreBitArray m = CORE_BIT_ARRAY;
|
|
CoreBitArray m = CORE_BIT_ARRAY;
|
|
coreMoveBitArray(&m, &bits);
|
|
coreMoveBitArray(&m, &bits);
|
|
|
|
+ coreMoveBitArray(&m, &m);
|
|
CORE_TEST_U64(8, m.length);
|
|
CORE_TEST_U64(8, m.length);
|
|
for(size_t i = 0; i < m.length; i++) {
|
|
for(size_t i = 0; i < m.length; i++) {
|
|
CORE_TEST_U64(i, coreBitArrayGet(&m, i));
|
|
CORE_TEST_U64(i, coreBitArrayGet(&m, i));
|