Branch Coverage

blib/lib/GDS2.pm
Criterion Covered Total %
branch 263 856 30.7


line true false branch
541 0 8 unless (defined $fileName)
546 8 0 unless (defined $resolution)
550 0 8 if $resolution <= 0 or not $resolution =~ /^\d+$/
556 0 8 if ($openModStr =~ /^\+/)
561 5 3 if ($openModStr eq '>') { }
0 3 elsif ($openModStr eq '>>') { }
574 0 8 unless $fileHandle->open("$fileName", $openModeNum)
577 0 8 unless flock $fileHandle, $lockMode
686 0 5 if (defined $markEnd and $markEnd)
692 1 4 if (defined $pad and $pad > 0)
699 0 1 if $padSize == $pad
738 0 2 unless (defined $libName)
744 2 0 if (not defined $isoDate) { }
0 0 elsif ($isoDate != 0) { }
755 2 0 if (not defined $uUnit) { }
767 2 0 unless defined $dbUnit
773 0 2 if $isoDate
798 0 4 unless (defined $strName)
804 4 0 if (not defined $isoDate) { }
0 0 elsif ($isoDate != 0) { }
813 0 4 if (defined $createTime) { }
825 0 4 if (defined $modTime) { }
835 0 4 if ($isoDate)
878 0 2 unless defined $layer
881 2 0 unless defined $dataType
884 0 2 unless defined $pathType
887 2 0 unless defined $bgnExtn
890 2 0 unless defined $endExtn
895 0 2 if (defined $unitWidth and $unitWidth >= 0)
899 2 0 if (defined $widthReal and $widthReal >= 0)
907 0 2 unless (defined $xy or defined $xyInt)
911 0 2 if (defined $xyInt)
919 0 2 if $pathType
920 2 0 if $width
921 0 2 if ($pathType == 4)
928 12 0 if ($$xy[$i] >= 0) { }
931 0 2 if ($bgnExtn or $endExtn)
941 0 0 if ($bgnExtn)
943 0 0 if ($bgnX1 == $bgnX2) { }
0 0 elsif ($bgnY1 == $bgnY2) { }
945 0 0 if ($bgnY1 < $bgnY2) { }
948 0 0 if $pathType != 0
953 0 0 if $pathType != 0
958 0 0 if ($bgnX1 < $bgnX2) { }
961 0 0 if $pathType != 0
966 0 0 if $pathType != 0
971 0 0 if ($endExtn)
973 0 0 if ($endX1 == $endX2) { }
0 0 elsif ($endY1 == $endY2) { }
975 0 0 if ($endY1 < $endY2) { }
978 0 0 if $pathType != 0
983 0 0 if $pathType != 0
988 0 0 if ($endX1 < $endX2) { }
991 0 0 if $pathType != 0
996 0 0 if $pathType != 0
1031 0 2 unless defined $layer
1033 2 0 unless defined $dataType
1038 0 2 unless (defined $xy or defined $xyInt)
1042 0 2 if (defined $xyInt)
1050 0 2 if (my $numPoints = $#$xy + 1 < 6)
1056 16 0 if ($$xy[$i] >= 0) { }
1060 2 0 if ($$xy[0] != $$xy[$#$xy - 1] or $$xy[1] != $$xy[$#$xy])
1062 2 0 if ($$xy[0] >= 0) { }
1064 2 0 if ($$xy[1] >= 0) { }
1101 0 2 unless (defined $sname)
1108 0 2 unless (defined $xy or defined $xyInt)
1112 0 2 if (defined $xyInt)
1120 2 0 if (not defined $reflect or $reflect <= 0) { }
1130 2 0 if (not defined $mag or $mag <= 0) { }
1140 2 0 if (not defined $angle) { }
1149 0 2 if ($useSTRANS)
1153 0 0 if $mag
1154 0 0 if $angle
1159 4 0 if ($$xy[$i] >= 0) { }
1199 0 2 unless (defined $sname)
1206 0 2 unless (defined $xy or defined $xyInt)
1210 0 2 if (defined $xyInt)
1218 2 0 if (not defined $reflect or $reflect <= 0) { }
1228 2 0 if (not defined $mag or $mag <= 0) { }
1238 2 0 if (not defined $angle) { }
1247 0 2 if ($useSTRANS)
1251 0 0 if $mag
1252 0 0 if $angle
1255 0 2 if (not defined $columns or $columns <= 0) { }
1264 0 2 if (not defined $rows or $rows <= 0) { }
1276 8 0 if ($$xy[$i] >= 0) { }
1320 0 0 unless (defined $string)
1330 0 0 if (defined $xyInt)
1335 0 0 if (defined $xy)
1342 0 0 if (defined $x2)
1346 0 0 unless (defined $x)
1350 0 0 if ($x >= 0) { }
1354 0 0 if (defined $y2)
1358 0 0 unless (defined $y)
1362 0 0 if ($y >= 0) { }
1366 0 0 unless defined $layer
1368 0 0 unless defined $textType
1370 0 0 if (not defined $reflect or $reflect <= 0) { }
1381 0 0 if (not defined $font or $font < 0 or $font > 3)
1391 0 0 if (defined $top) { }
0 0 elsif (defined $bottom) { }
1398 0 0 if (defined $left) { }
0 0 elsif (defined $right) { }
1405 0 0 if (not defined $mag or $mag <= 0) { }
1414 0 0 if (not defined $angle) { }
1425 0 0 if defined $font or defined $top or defined $middle or defined $bottom or defined $bottom or defined $left or defined $center or defined $right
1426 0 0 if ($useSTRANS)
1431 0 0 if $mag
1432 0 0 if $angle
1472 0 0 if (not defined $type) { }
1486 0 0 if defined $dataString and (defined $data[0] and $data[0] ne '')
1489 0 0 if ($type eq 'RECORD') { }
1499 0 0 unless (defined $scale)
1503 0 0 if ($scale <= 0)
1509 0 0 if (not defined $snap) { }
1517 0 0 if ($snap < 1)
1522 0 0 if (defined $data[0] and $data[0] ne '')
1526 0 0 if ($numDataElements) { }
1537 0 0 if (defined $dataString)
1541 0 0 unless $dataString =~ /'/
1544 0 0 if ($recordDataType == 1 or $recordDataType == 6) { }
1553 0 0 if ($recordDataType == 3)
1558 0 0 if ($data[$i] >= 0) { }
1567 0 0 if ($recordDataType == 1) { }
0 0 elsif ($recordDataType == 2) { }
0 0 elsif ($recordDataType == 3) { }
0 0 elsif ($recordDataType == 5) { }
0 0 elsif ($recordDataType == 6) { }
1597 0 0 if ($recordDataType == 1) { }
0 0 elsif ($recordDataType == 2) { }
0 0 elsif ($recordDataType == 3) { }
0 0 elsif ($recordDataType == 5) { }
0 0 elsif ($recordDataType == 6) { }
1613 0 0 if $scale != 1
1614 0 0 if $snap != 1
1624 0 0 if ($num < 0)
1637 0 0 if ($real != 0)
1646 0 0 if ($negative) { }
1652 0 0 if ($real >= 0) { }
1706 0 317 if (not defined $type) { }
1716 0 255 if defined $dataString and (defined $data[0] and $data[0] ne '')
1723 277 40 unless defined $data[0]
1725 0 317 if ($type eq 'RECORD') { }
1727 0 0 if ($isLittleEndian) { }
1743 0 0 if ($recordLength > 4)
1748 0 0 if ($recordDataType == 2 or $recordDataType == 1) { }
0 0 elsif ($recordDataType == 3) { }
0 0 elsif ($recordDataType == 5) { }
0 0 elsif ($recordDataType == 6) { }
0 0 elsif ($recordDataType == 4) { }
1815 317 0 unless (defined $scale)
1819 0 317 if ($scale <= 0)
1825 317 0 if (not defined $snap) { }
1833 0 317 if ($snap < 1)
1838 40 277 if (defined $data[0] and $data[0] ne '')
1842 18 22 if ($numDataElements) { }
1854 255 62 if (defined $dataString)
1858 225 30 unless $dataString =~ /'/
1861 57 198 if ($recordDataType == 1 or $recordDataType == 6) { }
1870 33 165 if ($recordDataType == 3)
1875 126 39 if ($data[$i] >= 0) { }
1884 27 290 if ($recordDataType == 1) { }
87 203 elsif ($recordDataType == 2) { }
43 160 elsif ($recordDataType == 3) { }
26 134 elsif ($recordDataType == 5) { }
40 94 elsif ($recordDataType == 6) { }
1906 317 0 if ($isLittleEndian) { }
1918 317 0 if $isLittleEndian
1922 317 0 if $isLittleEndian
1925 27 290 if ($recordDataType == 1) { }
87 203 elsif ($recordDataType == 2) { }
43 160 elsif ($recordDataType == 3) { }
26 134 elsif ($recordDataType == 5) { }
40 94 elsif ($recordDataType == 6) { }
1937 287 0 if $isLittleEndian
1946 0 211 if $scale != 1
1947 0 211 if $snap != 1
1949 211 0 if $isLittleEndian
1960 0 31 if ($num < 0)
1973 31 0 if ($real != 0)
1981 0 31 if ($negative) { }
1984 31 0 if $isLittleEndian
1989 217 0 if ($real >= 0) { }
1992 217 0 if $isLittleEndian
2020 0 0 unless (defined $record)
2025 0 0 if (defined $type)
2057 2 170 if $$self{'EOLIB'}
2085 24 232 if not $$self{'INDATA'} and $$self{'INHEADER'} != -1
2090 1 255 if $$self{'EOLIB'}
2093 0 255 unless read $$self{'FileHandle'}, $buffer, 4
2098 255 0 if $isLittleEndian
2107 255 0 if $isLittleEndian
2110 3 252 if $$self{'RecordType'} == 4
2112 252 3 if ($$self{'UsingPrettyPrint'})
2114 9 243 if $$self{'RecordType'} == 7
2115 9 243 if $$self{'RecordType'} == 5
2117 9 222 if $$self{'RecordType'} == 12 or $$self{'RecordType'} == 9 or $$self{'RecordType'} == 8 or $$self{'RecordType'} == 10 or $$self{'RecordType'} == 11
2120 30 222 if ($$self{'RecordType'} == 17)
2126 9 243 if $$self{'RecordType'} == 12
2127 9 243 if $$self{'RecordType'} == 8
2128 12 240 if ($$self{'RecordType'} == 2 or $$self{'RecordType'} == 6)
2133 12 240 if $$self{'RecordType'} == 1 or $$self{'RecordType'} == 5
2140 255 0 if $isLittleEndian
2168 0 255 if $$self{'INHEADER'} != 1
2169 72 183 if $$self{'DataType'} == 0
2177 27 156 if ($$self{'DataType'} == 1) { }
69 87 elsif ($$self{'DataType'} == 2) { }
33 54 elsif ($$self{'DataType'} == 3) { }
0 54 elsif ($$self{'DataType'} == 4) { }
24 30 elsif ($$self{'DataType'} == 5) { }
30 0 elsif ($$self{'DataType'} == 6) { }
2181 27 0 if $isLittleEndian
2194 201 0 if $isLittleEndian
2214 165 0 if $isLittleEndian
2240 0 27 if ($negative) { }
2260 0 27 if $negative
2261 6 21 if ($RecordTypeStrings[$$self{'RecordType'}] eq 'UNITS') { }
2263 3 3 if ($$self{'UUnits'} == -1) { }
3 0 elsif ($$self{'DBUnits'} == -1) { }
2275 21 0 if $$self{'UUnits'} != 0
2353 170 85 unless defined $compact
2359 170 85 unless ($compact)
2361 164 6 if $$self{'RecordType'} != 5
2362 150 6 unless $$self{'RecordType'} == 8 or $$self{'RecordType'} == 9 or $$self{'RecordType'} == 12 or $$self{'RecordType'} == 10 or $$self{'RecordType'} == 11
2371 85 170 if ($compact) { }
2382 27 689 if ($$self{'DataType'} == 1) { }
201 488 elsif ($$self{'DataType'} == 2) { }
165 323 elsif ($$self{'DataType'} == 3) { }
27 296 elsif ($$self{'DataType'} == 5) { }
30 266 elsif ($$self{'DataType'} == 6) { }
2385 27 0 if ($isLittleEndian)
2390 9 18 if ($compact) { }
2392 2 7 if $bitString =~ /^1/
2393 3 6 if ($inText and $$self{'RecordType'} != 26)
2396 3 0 if $bitString =~ /00....$/
2397 0 3 if $bitString =~ /01....$/
2398 0 3 if $bitString =~ /10....$/
2399 0 3 if $bitString =~ /11....$/
2400 0 3 if $bitString =~ /00..$/
2401 0 3 if $bitString =~ /01..$/
2402 3 0 if $bitString =~ /10..$/
2403 2 1 if $bitString =~ /00$/
2404 0 3 if $bitString =~ /01$/
2405 1 2 if $bitString =~ /10$/
2415 67 134 if ($compact) { }
2417 48 19 if ($dateFld) { }
2420 8 40 if ($dateFld =~ /^[17]$/)
2422 4 4 if ($dateFld eq '1') { }
4 0 elsif ($dateFld eq '7') { }
2424 1 3 if ($recordType eq 'BGNLIB') { }
2435 1 3 if ($recordType eq 'BGNLIB') { }
2444 8 0 if $num < 1900
2447 16 32 if $dateFld =~ /^[2389]/
2448 8 40 if $dateFld =~ /^[56]/
2449 8 40 if $dateFld =~ /^1[12]/
2450 8 40 if $dateFld eq '4' or $dateFld eq '10'
2455 8 11 unless $string =~ / (a|m|pt|dt|tt)$/i
2464 0 201 if ($recordType eq 'UNITS')
2472 55 110 if ($compact) { }
2474 44 11 if $i
2481 10 45 if ($compact and $i and $i == $#{$$self{'RecordData'};})
2483 3 7 if $inBoundary
2489 9 18 if ($compact) { }
2491 2 7 unless $string =~ / (a|m|pt|dt|tt)$/i
2498 3 24 if ($num =~ /e/i) { }
2507 6 21 if ($recordType eq 'UNITS')
2515 20 10 unless $compact
2519 144 572 if $dateFld
2522 85 170 if ($compact)
2525 20 65 if ($G_gdtString =~ /}$/ or $G_gdtString =~ /^(gds2|lib|m).*\d$/ or $G_gdtString =~ /^cell.*'$/) { }
2564 0 0 unless defined $asInteger
2566 0 0 unless defined $withClosure
2568 0 0 if ($self->isXy)
2572 0 0 if ($withClosure) { }
2574 0 0 if $asInteger
2583 0 0 if ($asInteger) { }
2618 0 0 unless defined $gds2File
2621 0 0 unless defined $PGR
2625 0 0 if $$self{'RecordType'} != 5
2626 0 0 unless $$self{'RecordType'} == 12 or $$self{'RecordType'} == 9 or $$self{'RecordType'} == 8 or $$self{'RecordType'} == 10 or $$self{'RecordType'} == 11
2633 0 0 if ($$self{'RecordType'} == 12 or $$self{'RecordType'} == 9 or $$self{'RecordType'} == 8 or $$self{'RecordType'} == 10 or $$self{'RecordType'} == 11 or $$self{'RecordType'} == 17 or $$self{'RecordType'} == 7 or $$self{'RecordType'} == 4) { }
2651 0 0 if ($maxi >= 1)
2654 0 0 if ($$self{'DataType'} == 1) { }
0 0 elsif ($$self{'DataType'} == 2) { }
0 0 elsif ($$self{'DataType'} == 3) { }
0 0 elsif ($$self{'DataType'} == 5) { }
0 0 elsif ($$self{'DataType'} == 6) { }
2657 0 0 if ($isLittleEndian)
2680 0 0 if ($i < $maxi)
2683 0 0 if ($maxi >= 1)
2708 0 0 unless defined $angle
2710 0 0 if $angle
2725 0 0 unless (defined $string)
2744 0 0 unless (defined $num)
2749 0 0 if ($num >= 0) { }
2768 0 0 if (not defined $isoDate) { }
0 0 elsif ($isoDate != 0) { }
2778 0 0 if $isoDate
2808 0 0 unless (defined $num)
2827 0 0 if (not defined $columns or $columns <= 0) { }
2836 0 0 if (not defined $rows or $rows <= 0) { }
2859 0 0 unless defined $dataType
2882 0 0 unless (defined $num)
2912 0 0 unless (defined $num)
2917 0 0 if ($num >= 0) { }
2967 0 0 unless (defined $string)
2979 0 0 unless (defined $num)
3007 0 0 unless (defined $rev)
3028 0 0 unless defined $layer
3051 0 0 unless (defined $libName)
3070 0 0 unless (defined $num)
3082 0 0 unless (defined $num)
3103 0 0 unless defined $pathType
3104 0 0 if $pathType
3121 0 0 if not defined $mag or $mag <= 0
3123 0 0 if $mag
3131 0 0 unless (defined $string)
3159 0 0 unless (defined $num)
3171 0 0 unless (defined $num)
3197 0 0 if (not defined $font or $font < 0 or $font > 3)
3207 0 0 if (defined $top) { }
0 0 elsif (defined $bottom) { }
3214 0 0 if (defined $left) { }
0 0 elsif (defined $right) { }
3235 0 0 unless (defined $num)
3254 0 0 unless (defined $string)
3266 0 0 unless (defined $string)
3278 0 0 unless (defined $num)
3297 0 0 unless (defined $string)
3330 0 0 if (not defined $reflect or $reflect <= 0) { }
3361 0 0 unless (defined $string)
3380 0 0 unless (defined $strName)
3399 0 0 unless (defined $string)
3411 0 0 unless (defined $num)
3423 0 0 unless (defined $num)
3449 0 0 unless (defined $num)
3453 0 0 if $num < 0
3478 0 0 if (not defined $uUnit) { }
3489 0 0 unless (defined $dbUnit)
3518 0 0 if (not defined $width or $width <= 0)
3522 0 0 if $width
3544 0 0 unless (defined $xy or defined $xyInt)
3548 0 0 if (defined $xyInt)
3556 0 0 if ($$xy[$i] >= 0) { }
3600 0 0 if ($self->isBgnextn) { }
3616 0 0 if ($self->isDatatype) { }
3631 0 0 if ($self->isEndextn) { }
3648 0 0 if ($self->isLayer) { }
3663 0 0 if ($self->isPathtype) { }
3678 0 0 if ($self->isPropattr) { }
3692 0 0 if ($self->isPropvalue) { }
3704 0 0 if ($self->isSname) { }
3716 0 0 if ($self->isString) { }
3728 0 0 if ($self->isStrname) { }
3744 0 0 if ($self->isTexttype) { }
3759 0 0 if ($self->isWidth) { }
3779 0 0 if ($$self{'RecordType'} == 11) { }
3791 0 0 if ($$self{'RecordType'} == 1) { }
3803 0 0 if ($$self{'RecordType'} == 5) { }
3815 0 0 if ($$self{'RecordType'} == 8) { }
3827 0 0 if ($$self{'RecordType'} == 14) { }
3839 0 0 if ($$self{'RecordType'} == 4) { }
3851 0 0 if ($$self{'RecordType'} == 17) { }
3863 0 0 if ($$self{'RecordType'} == 7) { }
3876 0 0 if ($$self{'RecordType'} == 0) { }
3888 0 0 if ($$self{'RecordType'} == 2) { }
3900 0 0 if ($$self{'RecordType'} == 9) { }
3912 0 0 if ($$self{'RecordType'} == 10) { }
3924 0 0 if ($$self{'RecordType'} == 58) { }
3936 0 0 if ($$self{'RecordType'} == 12) { }
3948 0 0 if ($$self{'RecordType'} == 3) { }
3960 0 0 if ($$self{'RecordType'} == 13) { }
3972 0 0 if ($$self{'RecordType'} == 6) { }
3984 0 0 if ($$self{'RecordType'} == 15) { }
3996 0 0 if ($$self{'RecordType'} == 16) { }
4008 0 0 if ($$self{'RecordType'} == 18) { }
4020 0 0 if ($$self{'RecordType'} == 19) { }
4032 0 0 if ($$self{'RecordType'} == 20) { }
4044 0 0 if ($$self{'RecordType'} == 21) { }
4056 0 0 if ($$self{'RecordType'} == 22) { }
4068 0 0 if ($$self{'RecordType'} == 23) { }
4080 0 0 if ($$self{'RecordType'} == 24) { }
4092 0 0 if ($$self{'RecordType'} == 25) { }
4104 0 0 if ($$self{'RecordType'} == 26) { }
4116 0 0 if ($$self{'RecordType'} == 27) { }
4128 0 0 if ($$self{'RecordType'} == 28) { }
4140 0 0 if ($$self{'RecordType'} == 29) { }
4152 0 0 if ($$self{'RecordType'} == 30) { }
4164 0 0 if ($$self{'RecordType'} == 31) { }
4176 0 0 if ($$self{'RecordType'} == 32) { }
4188 0 0 if ($$self{'RecordType'} == 33) { }
4200 0 0 if ($$self{'RecordType'} == 34) { }
4212 0 0 if ($$self{'RecordType'} == 35) { }
4224 0 0 if ($$self{'RecordType'} == 36) { }
4236 0 0 if ($$self{'RecordType'} == 37) { }
4248 0 0 if ($$self{'RecordType'} == 38) { }
4260 0 0 if ($$self{'RecordType'} == 39) { }
4272 0 0 if ($$self{'RecordType'} == 40) { }
4284 0 0 if ($$self{'RecordType'} == 41) { }
4296 0 0 if ($$self{'RecordType'} == 42) { }
4308 0 0 if ($$self{'RecordType'} == 43) { }
4320 0 0 if ($$self{'RecordType'} == 44) { }
4332 0 0 if ($$self{'RecordType'} == 45) { }
4344 0 0 if ($$self{'RecordType'} == 46) { }
4356 0 0 if ($$self{'RecordType'} == 47) { }
4368 0 0 if ($$self{'RecordType'} == 48) { }
4380 0 0 if ($$self{'RecordType'} == 49) { }
4392 0 0 if ($$self{'RecordType'} == 50) { }
4404 0 0 if ($$self{'RecordType'} == 51) { }
4416 0 0 if ($$self{'RecordType'} == 52) { }
4428 0 0 if ($$self{'RecordType'} == 53) { }
4440 0 0 if ($$self{'RecordType'} == 54) { }
4452 0 0 if ($$self{'RecordType'} == 55) { }
4464 0 0 if ($$self{'RecordType'} == 56) { }
4476 0 0 if ($$self{'RecordType'} == 57) { }
4488 0 0 if ($$self{'RecordType'} == 59) { }
4500 0 0 if ($dt == 0) { }
0 0 elsif ($dt == 2 or $dt == 3 or $dt == 5) { }
0 0 elsif ($dt == 6) { }
4533 0 24 if $$self{'INHEADER'} != 1
4547 0 0 if ($$self{'RecordType'} == 16) { }
4571 0 0 unless $num =~ /^-?\d+/
4573 0 0 if $num =~ /\./
4581 0 0 unless $num =~ /^-?\d+$/
4585 0 0 if $num < 0
4588 0 0 if ($num < 0)
4594 0 0 if ($bigPart =~ /^[-]?$/) { }
4669 0 0 if ($self->isUnits) { }