Branch Coverage

src/xh_h2x_native_attr.c
Criterion Covered Total %
branch 56 72 77.7


line true false branch
17 33 24 if (ctx->opts.content[0] != '\0' && xh_strcmp(key, ctx->opts.content) == 0)
8 25 if (ctx->opts.content[0] != '\0' && xh_strcmp(key, ctx->opts.content) == 0)
22 2 55 if (type & XH_H2X_T_BLESSED && (method = gv_fetchmethod_autoload(SvSTASH(value), "iternext", 0)) != NULL) {
2 0 if (type & XH_H2X_T_BLESSED && (method = gv_fetchmethod_autoload(SvSTASH(value), "iternext", 0)) != NULL) {
23 1 1 if (!(flag & XH_H2X_F_COMPLEX)) goto FINISH;
27 1 4 if (!SvOK(item_value)) break;
1 0 if (!SvOK(item_value)) break;
1 0 if (!SvOK(item_value)) break;
36 30 25 if (type & XH_H2X_T_SCALAR) {
37 15 15 if (flag & XH_H2X_F_COMPLEX && (flag & XH_H2X_F_SIMPLE || type & XH_H2X_T_RAW)) {
8 7 if (flag & XH_H2X_F_COMPLEX && (flag & XH_H2X_F_SIMPLE || type & XH_H2X_T_RAW)) {
0 8 if (flag & XH_H2X_F_COMPLEX && (flag & XH_H2X_F_SIMPLE || type & XH_H2X_T_RAW)) {
40 8 15 else if (flag & XH_H2X_F_COMPLEX && flag & XH_H2X_F_CONTENT) {
4 4 else if (flag & XH_H2X_F_COMPLEX && flag & XH_H2X_F_CONTENT) {
43 15 4 else if (flag & XH_H2X_F_SIMPLE && !(flag & XH_H2X_F_CONTENT) && !(type & XH_H2X_T_RAW)) {
11 4 else if (flag & XH_H2X_F_SIMPLE && !(flag & XH_H2X_F_CONTENT) && !(type & XH_H2X_T_RAW)) {
11 0 else if (flag & XH_H2X_F_SIMPLE && !(flag & XH_H2X_F_CONTENT) && !(type & XH_H2X_T_RAW)) {
48 15 10 else if (type & XH_H2X_T_HASH) {
49 2 13 if (!(flag & XH_H2X_F_COMPLEX)) goto FINISH;
51 0 13 len = HvUSEDKEYS((SV *) value);
52 1 12 if (len == 0) {
61 6 6 if (len > 1 && ctx->opts.canonical) {
6 0 if (len > 1 && ctx->opts.canonical) {
64 17 6 for (i = 0; i < len; i++) {
68 1 5 if (done == len) {
74 15 5 for (i = 0; i < len; i++) {
85 6 6 while ((item_value = hv_iternextsv((HV *) value, (char **) &item, &item_len))) {
89 5 1 if (done == len) {
96 1 1 while ((item_value = hv_iternextsv((HV *) value, (char **) &item, &item_len))) {
106 10 0 else if (type & XH_H2X_T_ARRAY) {
107 5 5 if (!(flag & XH_H2X_F_COMPLEX)) goto FINISH;
110 9 5 for (i = 0; i < len; i++) {
117 0 0 if (flag & XH_H2X_F_SIMPLE && flag & XH_H2X_F_COMPLEX) {
0 0 if (flag & XH_H2X_F_SIMPLE && flag & XH_H2X_F_COMPLEX) {
120 0 0 else if (flag & XH_H2X_F_SIMPLE && !(flag & XH_H2X_F_CONTENT)) {
0 0 else if (flag & XH_H2X_F_SIMPLE && !(flag & XH_H2X_F_CONTENT)) {