Branch Coverage

dumper.c
Criterion Covered Total %
branch 0 82 0.0


line true false branch
58 0 0 assert(emitter); /* Non-NULL emitter object is required. */
59 0 0 assert(!emitter->opened); /* Emitter should not be opened yet. */
63 0 0 if (!yaml_emitter_emit(emitter, &event)) {
82 0 0 assert(emitter); /* Non-NULL emitter object is required. */
83 0 0 assert(emitter->opened); /* Emitter should be opened. */
85 0 0 if (emitter->closed) return 1;
89 0 0 if (!yaml_emitter_emit(emitter, &event)) {
108 0 0 assert(emitter); /* Non-NULL emitter object is required. */
109 0 0 assert(document); /* Non-NULL emitter object is expected. */
113 0 0 if (!emitter->opened) {
114 0 0 if (!yaml_emitter_open(emitter)) goto error;
117 0 0 if (STACK_EMPTY(emitter, document->nodes)) {
118 0 0 if (!yaml_emitter_close(emitter)) goto error;
123 0 0 assert(emitter->opened); /* Emitter should be opened. */
127 0 0 if (!emitter->anchors) goto error;
134 0 0 if (!yaml_emitter_emit(emitter, &event)) goto error;
137 0 0 if (!yaml_emitter_dump_node(emitter, 1)) goto error;
140 0 0 if (!yaml_emitter_emit(emitter, &event)) goto error;
162 0 0 if (!emitter->anchors) {
168 0 0 for (index = 0; emitter->document->nodes.start + index
171 0 0 if (!emitter->anchors[index].serialized) {
173 0 0 if (node.type == YAML_SCALAR_NODE) {
177 0 0 if (node.type == YAML_SEQUENCE_NODE) {
180 0 0 if (node.type == YAML_MAPPING_NODE) {
206 0 0 if (emitter->anchors[index-1].references == 1) {
209 0 0 for (item = node->data.sequence.items.start;
215 0 0 for (pair = node->data.mapping.pairs.start;
226 0 0 else if (emitter->anchors[index-1].references == 2) {
243 0 0 if (!anchor) return NULL;
261 0 0 if (anchor_id) {
263 0 0 if (!anchor) return 0;
266 0 0 if (emitter->anchors[index-1].serialized) {
342 0 0 if (!yaml_emitter_emit(emitter, &event)) return 0;
344 0 0 for (item = node->data.sequence.items.start;
346 0 0 if (!yaml_emitter_dump_node(emitter, *item)) return 0;
350 0 0 if (!yaml_emitter_emit(emitter, &event)) return 0;
372 0 0 if (!yaml_emitter_emit(emitter, &event)) return 0;
374 0 0 for (pair = node->data.mapping.pairs.start;
376 0 0 if (!yaml_emitter_dump_node(emitter, pair->key)) return 0;
377 0 0 if (!yaml_emitter_dump_node(emitter, pair->value)) return 0;
381 0 0 if (!yaml_emitter_emit(emitter, &event)) return 0;