add tests for mask read size

This commit is contained in:
xdrm-brackets 2018-05-06 14:47:34 +02:00
parent 613620998a
commit b7cd292577
1 changed files with 16 additions and 0 deletions

View File

@ -139,6 +139,22 @@ func TestReadEOF(t *testing.T) {
"complete extended 64 bits length",
[]byte{0x82,127, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
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,
},
}