add tests for mask read size
This commit is contained in:
parent
613620998a
commit
b7cd292577
|
@ -139,6 +139,22 @@ func TestReadEOF(t *testing.T) {
|
||||||
"complete extended 64 bits length",
|
"complete extended 64 bits length",
|
||||||
[]byte{0x82,127, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
[]byte{0x82,127, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||||
false, true,
|
false, true,
|
||||||
|
}, {
|
||||||
|
"missing mask",
|
||||||
|
[]byte{0x82,0x80},
|
||||||
|
true, false,
|
||||||
|
}, {
|
||||||
|
"incomplete mask 1",
|
||||||
|
[]byte{0x82,0x80, 0x00},
|
||||||
|
true, false,
|
||||||
|
}, {
|
||||||
|
"incomplete mask 2",
|
||||||
|
[]byte{0x82,0x80, 0x00, 0x00, 0x00},
|
||||||
|
true, false,
|
||||||
|
},{
|
||||||
|
"complete mask",
|
||||||
|
[]byte{0x82,0x80, 0x00, 0x00, 0x00, 0x00},
|
||||||
|
false, false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue