diff options
author | Christian Pointner <equinox@anytun.org> | 2017-09-14 19:04:31 +0200 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2017-09-14 19:04:31 +0200 |
commit | 2f559ba569652878bf5c9370dc02d0fa6c5a96b0 (patch) | |
tree | 08b5129ba5943ad39953baa9f5cdd545d3558063 /satp | |
parent | make the random tests more random (diff) |
test data generate sometimes produced invalid dataset
Diffstat (limited to 'satp')
-rw-r--r-- | satp/packet_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/satp/packet_test.go b/satp/packet_test.go index 3640570..ffff08e 100644 --- a/satp/packet_test.go +++ b/satp/packet_test.go @@ -166,7 +166,7 @@ func TestPlainPacketWriteTo(t *testing.T) { func generateRandomTestDataPlainPacket() (payloadType uint16, payload []byte) { payloadType = uint16(tRand.Uint32()) - packetLen := uint(2 + tRand.Int31n(PACKET_BUFFER_SIZE-2)) + packetLen := uint(tRand.Int31n(PACKET_BUFFER_SIZE - 2)) payload = make([]byte, packetLen) tRand.Read(payload) return |