mirror of https://github.com/tidwall/tile38.git
27 lines
529 B
Go
27 lines
529 B
Go
package amqp
|
||
|
||
import (
|
||
"strings"
|
||
"testing"
|
||
)
|
||
|
||
func TestGoFuzzCrashers(t *testing.T) {
|
||
if testing.Short() {
|
||
t.Skip("excessive allocation")
|
||
}
|
||
|
||
testData := []string{
|
||
"\b000000",
|
||
"\x02\x16\x10<31>[<5B><>\t\xbdui<75>" + "\x10\x01\x00\xff\xbf\xef\xbfサn\x99\x00\x10r",
|
||
"\x0300\x00\x00\x00\x040000",
|
||
}
|
||
|
||
for idx, testStr := range testData {
|
||
r := reader{strings.NewReader(testStr)}
|
||
frame, err := r.ReadFrame()
|
||
if err != nil && frame != nil {
|
||
t.Errorf("%d. frame is not nil: %#v err = %v", idx, frame, err)
|
||
}
|
||
}
|
||
}
|