Branch Coverage

TtyWrite.xs
Criterion Covered Total %
branch 17 86 19.7


line true false branch
29 1 0 if ((svp = hv_fetchs((HV*)obj, "fd", FALSE))) {
30 0 1 if (SvOK(*svp) && SvIOK(*svp))
0 0 if (SvOK(*svp) && SvIOK(*svp))
0 0 if (SvOK(*svp) && SvIOK(*svp))
1 0 if (SvOK(*svp) && SvIOK(*svp))
31 1 0 close((int) SvIV(*svp));
41 0 3 if ( sv_isobject(ST(0)) ) {
42 0 0 classname = HvNAME(SvSTASH(SvRV(ST(0))));
0 0 classname = HvNAME(SvSTASH(SvRV(ST(0))));
0 0 classname = HvNAME(SvSTASH(SvRV(ST(0))));
0 0 classname = HvNAME(SvSTASH(SvRV(ST(0))));
0 0 classname = HvNAME(SvSTASH(SvRV(ST(0))));
0 0 classname = HvNAME(SvSTASH(SvRV(ST(0))));
44 3 0 classname = (char *)SvPV_nolen(ST(0));
50 2 1 if (items != 2 || !SvPOK(ST(1)))
0 2 if (items != 2 || !SvPOK(ST(1)))
53 2 0 devname = SvPV(ST(1),len);
54 19 1 for (i = 0; i < len; i++) {
55 1 18 if (devname[i] == '\0')
58 0 1 if ((fd = open(devname, O_WRONLY)) < 0)
71 0 1 if (items != 2 || !SvPOK(ST(1)))
0 0 if (items != 2 || !SvPOK(ST(1)))
79 0 0 if ((svp = hv_fetchs((HV*)obj, "fd", FALSE))) {
80 0 0 if (SvOK(*svp) && SvIOK(*svp)) {
0 0 if (SvOK(*svp) && SvIOK(*svp)) {
0 0 if (SvOK(*svp) && SvIOK(*svp)) {
0 0 if (SvOK(*svp) && SvIOK(*svp)) {
81 0 0 fd = (int) SvIV(*svp);
82 0 0 str = SvPV(ST(1),len);
83 0 0 while(len-- > 0) {
96 0 1 if (items != 3 || !SvPOK(ST(1)) || !SvNIOK(ST(2)))
0 0 if (items != 3 || !SvPOK(ST(1)) || !SvNIOK(ST(2)))
0 0 if (items != 3 || !SvPOK(ST(1)) || !SvNIOK(ST(2)))
107 0 0 if ((svp = hv_fetchs((HV*)obj, "fd", FALSE))) {
108 0 0 if (SvOK(*svp) && SvIOK(*svp)) {
0 0 if (SvOK(*svp) && SvIOK(*svp)) {
0 0 if (SvOK(*svp) && SvIOK(*svp)) {
0 0 if (SvOK(*svp) && SvIOK(*svp)) {
109 0 0 fd = (int) SvIV(*svp);
110 0 0 str = SvPV(ST(1),len);
111 0 0 delayms = SvIV(ST(2));
112 0 0 if (delayms > UINT_MAX / 1000) delayms = UINT_MAX / 1000;
114 0 0 while(len-- > 0) {