Branch Coverage

blib/lib/Woothee/OS.pm
Criterion Covered Total %
branch 100 118 84.7


line true false branch
15 336 93 if index($ua, 'Windows') < 0
18 6 87 if (index($ua, 'Xbox') > -1)
20 3 3 if ($ua =~ /Xbox; Xbox One\)/) { }
33 0 87 unless ($ua =~ /Windows ([ .a-zA-Z0-9]+)[;\\)]/o)
41 6 81 if ($version eq 'NT 10.0') { }
12 69 elsif ($version eq 'NT 6.3') { }
3 66 elsif ($version eq 'NT 6.2') { }
18 48 elsif ($version eq 'NT 6.1') { }
12 36 elsif ($version eq 'NT 6.0') { }
24 12 elsif ($version eq 'NT 5.1') { }
6 6 elsif ($version =~ /^Phone(?: OS)? ([.0-9]+)/o) { }
3 3 elsif ($version eq 'NT 5.0') { }
0 3 elsif ($version eq 'NT 4.0') { }
0 3 elsif ($version eq '98') { }
0 3 elsif ($version eq '95') { }
3 0 elsif ($version eq 'CE') { }
68 282 54 if index($ua, 'Mac OS X') < 0
76 30 24 if (index($ua, 'like Mac OS X') > -1) { }
80 15 15 if (index($ua, 'iPhone;') > -1) { }
6 9 elsif (index($ua, 'iPad;') > -1) { }
9 0 elsif (index($ua, 'iPod') > -1) { }
87 30 0 if ($ua =~ /; CPU(?: iPhone)? OS (\d+_\d+(?:_\d+)?) like Mac OS X/)
93 24 0 if ($ua =~ /Mac OS X (10[._]\d+(?:[._]\d+)?)(?:\)|;)/)
100 54 0 if ($version)
109 246 36 if index($ua, 'Linux') < 0
113 18 18 if (index($ua, 'Android') > -1) { }
119 18 0 if ($ua =~ /Android[- ](\d+\.\d+(?:\.\d+)?)/)
127 18 18 if ($os_version)
138 3 243 if (index($ua, 'iPhone') > -1) { }
0 243 elsif (index($ua, 'iPad') > -1) { }
0 243 elsif (index($ua, 'iPod') > -1) { }
12 231 elsif (index($ua, 'Android') > -1) { }
6 225 elsif (index($ua, 'CFNetwork') > -1) { }
3 222 elsif (index($ua, 'BB10') > -1) { }
6 216 elsif (index($ua, 'BlackBerry') > -1) { }
149 3 0 if ($ua =~ m[BB10(?:.+)Version/([.0-9]+)])
154 3 3 if ($ua =~ m[BlackBerry(?:\d+)/([.0-9]+) ])
160 18 228 if ($$result{'Woothee::DataSet'->const('KEY_NAME')} and $$result{'Woothee::DataSet'->const('KEY_NAME')} eq dataset('Firefox')->{'Woothee::DataSet'->const('KEY_NAME')})
165 6 12 if ($ua =~ m[^Mozilla/[.0-9]+ \((?:Mobile|Tablet);(?:.*;)? rv:([.0-9]+)\) Gecko/[.0-9]+ Firefox/[.0-9]+$])
171 210 36 unless $data
175 12 24 if ($os_version)
184 6 204 if (index($ua, 'KDDI-') > -1)
185 6 0 if ($ua =~ m[KDDI-([^- /;()"']+)]o)
194 6 198 if (index($ua, 'WILLCOM') > -1 or index($ua, 'DDIPOCKET') > -1)
195 6 0 if ($ua =~ m[(?:WILLCOM|DDIPOCKET);[^/]+/([^ /;()]+)]o)
204 3 195 if (index($ua, 'SymbianOS') > -1)
210 3 192 if (index($ua, 'Google Wireless Transcoder') > -1)
215 0 192 if (index($ua, 'Naver Transcoder') > -1)
227 3 189 if (index($ua, 'Nintendo DSi;') > -1)
233 3 186 if (index($ua, 'Nintendo Wii;') > -1)
249 3 183 if (index($ua, '(Win98;') > -1) { }
6 177 elsif (index($ua, 'Macintosh; U; PPC;') > -1 or index($ua, 'Mac_PowerPC') > -1) { }
6 171 elsif (index($ua, 'X11; FreeBSD ') > -1) { }
3 168 elsif (index($ua, 'X11; CrOS ') > -1) { }
255 3 3 if ($ua =~ /rv:(\d+\.\d+\.\d+)/)
262 6 0 if ($ua =~ /FreeBSD ([^;\)]+);/)
269 3 0 if ($ua =~ /CrOS ([^\)]+)\)/)
275 18 168 if ($data)
278 15 3 if ($os_version)