test-seq-range-array.c revision b7324e421e2132cbbf753e6fdbe675bbaecdf929
/* Copyright (c) 2007-2016 Dovecot authors, see the included COPYING file */
#include "test-lib.h"
#include "array.h"
#include "seq-range-array.h"
static void
{
unsigned int seqs_count;
unsigned int j;
if (i+1 < count) {
for (j = i; j < count; j++) {
}
return;
}
for (i = 0; i < count; i++)
}
static void test_seq_range_array_add_boundaries(void)
{
}
static void test_seq_range_array_add_merge(void)
{
test_begin("seq_range_array_add() merging");
test_end();
}
static void test_seq_range_array_remove_nth(void)
{
const struct seq_range *r;
test_begin("seq_range_array_remove_nth()");
test_end();
}
static void test_seq_range_array_random(void)
{
#define SEQ_RANGE_TEST_BUFSIZE 100
#define SEQ_RANGE_TEST_COUNT 20000
unsigned char shadowbuf[SEQ_RANGE_TEST_BUFSIZE];
int test = -1;
for (i = 0; i < SEQ_RANGE_TEST_COUNT; i++) {
switch (test) {
case 0:
break;
case 1:
ret2++;
}
}
break;
case 2:
break;
case 3:
ret2++;
}
}
break;
}
break;
goto fail;
goto fail;
}
goto fail;
}
}
goto fail;
}
}
fail:
if (i == SEQ_RANGE_TEST_COUNT)
else {
}
array_free(&range);
}
{
struct seq_range_iter iter;
array_clear(&range);
for (unsigned int i = 0; i < mask_size; i++) {
if ((mask & (1 << i)) != 0)
}
inverse_mask = 0;
}
}
}
static void test_seq_range_array_invert(void)
{
test_begin("seq_range_array_invert()");
/* first numbers */
} T_END;
}
/* last numbers */
} T_END;
}
test_end();
}
static void test_seq_range_array_invert_edges(void)
{
static const struct {
} tests[] = {
{ -1, -1, -1, -1,
0, 0xffffffff, -1, -1 },
{ 0, 0xffffffff, -1, -1,
-1, -1, -1, -1 },
{ 0, 0xfffffffe, -1, -1,
0xffffffff, 0xffffffff, -1, -1 },
{ 1, 0xfffffffe, -1, -1,
0, 0, 0xffffffff, 0xffffffff },
{ 1, 0xffffffff, -1, -1,
0, 0, -1, -1 },
{ 0, 0, 0xffffffff, 0xffffffff,
1, 0xfffffffe, -1, -1 },
{ 0xffffffff, 0xffffffff, -1, -1,
0, 0xfffffffe, -1, -1 },
};
unsigned int count;
test_begin("seq_range_array_invert() edges");
test_assert_idx(count == 0, i);
else {
else {
}
}
} T_END;
test_end();
}
{
unsigned int i;
for (i = 0; i < 8; i++) {
if ((byte & (1 << i)) != 0)
}
}
static void test_seq_range_array_have_common(void)
{
unsigned int i, j;
for (i = 0; i < 256; i++) {
test_seq_range_create(&arr1, i);
for (j = 0; j < 256; j++) {
test_seq_range_create(&arr2, j);
ret2 = (i & j) != 0;
}
}
}
void test_seq_range_array(void)
{
}