Branch Coverage

amqp_table.c
Criterion Covered Total %
branch 0 144 0.0


line true false branch
38 0 0 if (!amqp_decode_32(encoded, offset, &arraysize)) {
42 0 0 if (arraysize + *offset > encoded.len) {
47 0 0 if (entries == NULL) {
52 0 0 while (*offset < limit) {
53 0 0 if (num_entries >= allocated_entries) {
59 0 0 if (newentries == NULL) {
68 0 0 if (res < 0) {
79 0 0 if (output->entries == NULL) {
80 0 0 if (num_entries == 0) {
106 0 0 if (!amqp_decode_32(encoded, offset, &tablesize)) {
110 0 0 if (tablesize + *offset > encoded.len) {
115 0 0 if (entries == NULL) {
120 0 0 while (*offset < limit) {
124 0 0 if (!amqp_decode_8(encoded, offset, &keylen)) {
128 0 0 if (num_entries >= allocated_entries) {
134 0 0 if (newentries == NULL) {
142 0 0 if (!amqp_decode_bytes(encoded, offset, &entries[num_entries].key,
149 0 0 if (res < 0) {
160 0 0 if (output->entries == NULL) {
161 0 0 if (num_entries == 0) {
187 0 0 if (depth > TABLE_DEPTH_LIMIT) {
191 0 0 if (!amqp_decode_8(encoded, offset, &entry->kind)) {
208 0 0 SIMPLE_FIELD_DECODER(8, boolean, val ? 1 : 0);
211 0 0 SIMPLE_FIELD_DECODER(8, i8, (int8_t)val);
213 0 0 TRIVIAL_FIELD_DECODER(8);
216 0 0 SIMPLE_FIELD_DECODER(16, i16, (int16_t)val);
218 0 0 TRIVIAL_FIELD_DECODER(16);
221 0 0 SIMPLE_FIELD_DECODER(32, i32, (int32_t)val);
223 0 0 TRIVIAL_FIELD_DECODER(32);
226 0 0 SIMPLE_FIELD_DECODER(64, i64, (int64_t)val);
228 0 0 TRIVIAL_FIELD_DECODER(64);
231 0 0 TRIVIAL_FIELD_DECODER(32);
235 0 0 TRIVIAL_FIELD_DECODER(64);
264 0 0 TRIVIAL_FIELD_DECODER(64);
293 0 0 for (i = 0; i < input->num_entries; i++) {
295 0 0 if (res < 0) {
300 0 0 if (!amqp_encode_32(encoded, &start, (uint32_t)(*offset - start - 4))) {
318 0 0 for (i = 0; i < input->num_entries; i++) {
319 0 0 if (!amqp_encode_8(encoded, offset, (uint8_t)input->entries[i].key.len)) {
324 0 0 if (!amqp_encode_bytes(encoded, offset, input->entries[i].key)) {
330 0 0 if (res < 0) {
335 0 0 if (!amqp_encode_32(encoded, &start, (uint32_t)(*offset - start - 4))) {
350 0 0 if (!amqp_encode_8(encoded, offset, entry->kind)) {
363 0 0 FIELD_ENCODER(8, entry->value.boolean ? 1 : 0);
366 0 0 FIELD_ENCODER(8, entry->value.i8);
368 0 0 FIELD_ENCODER(8, entry->value.u8);
371 0 0 FIELD_ENCODER(16, entry->value.i16);
373 0 0 FIELD_ENCODER(16, entry->value.u16);
376 0 0 FIELD_ENCODER(32, entry->value.i32);
378 0 0 FIELD_ENCODER(32, entry->value.u32);
381 0 0 FIELD_ENCODER(64, entry->value.i64);
383 0 0 FIELD_ENCODER(64, entry->value.u64);
387 0 0 FIELD_ENCODER(32, entry->value.u32);
391 0 0 FIELD_ENCODER(64, entry->value.u64);
418 0 0 FIELD_ENCODER(64, entry->value.u64);
448 0 0 if (p2->key.len < minlen) {
453 0 0 if (d != 0) {
519 0 0 if (0 == original->value.bytes.len) {
524 0 0 if (NULL == clone->value.bytes.bytes) {
533 0 0 if (0 == original->value.array.entries) {
539 0 0 if (NULL == clone->value.array.entries) {
543 0 0 for (i = 0; i < clone->value.array.num_entries; ++i) {
546 0 0 if (AMQP_STATUS_OK != res) {
570 0 0 if (0 == original->key.len) {
575 0 0 if (NULL == clone->key.bytes) {
589 0 0 if (0 == clone->num_entries) {
597 0 0 if (NULL == clone->entries) {
601 0 0 for (i = 0; i < clone->num_entries; ++i) {
604 0 0 if (AMQP_STATUS_OK != res) {
645 0 0 assert(table != NULL);
646 0 0 for (i = 0; i < table->num_entries; ++i) {
647 0 0 if (amqp_bytes_equal(table->entries[i].key, key)) {