Branch Coverage

blib/lib/Mojo/WebSocket.pm
Criterion Covered Total %
branch 54 60 90.0


line true false branch
30 348 6 $fin ? :
31 9 345 if $rsv1
32 4 350 if $rsv2
33 4 350 if $rsv3
38 336 18 if ($len < 126) { }
11 7 elsif ($len < 65536) { }
40 159 177 $masked ? :
46 6 5 $masked ? :
52 3 4 $masked ? :
57 168 186 if ($masked)
70 3 60 if ($headers->sec_websocket_extensions // "") =~ /permessage-deflate/u
79 80 0 unless $headers->upgrade
80 80 0 unless $headers->connection
81 80 0 unless $headers->sec_websocket_version
85 79 1 unless $headers->sec_websocket_key
94 289 275 unless length $$buffer >= 2
98 270 5 ($first & 128) == 128 ? :
101 7 268 ($first & 64) == 64 ? :
102 2 273 ($first & 32) == 32 ? :
103 2 273 ($first & 16) == 16 ? :
111 259 16 if ($len < 126) { }
10 6 elsif ($len == 126) { }
6 0 elsif ($len == 127) { }
115 0 10 unless length $$buffer > 4
123 0 6 unless length $$buffer > 10
130 3 272 if $len > $max
133 118 154 if my $masked = $second & 128
134 1 271 if length $$buffer < $hlen + $len
138 232 39 $len ? :
139 118 153 if $masked