(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func TestChecksum(t *testing.T) { |
| 39 | for length := 0; length <= 9001; length++ { |
| 40 | buf := make([]byte, length) |
| 41 | rng := rand.New(rand.NewSource(1)) |
| 42 | rng.Read(buf) |
| 43 | csum := checksum(buf, 0x1234) |
| 44 | csumRef := checksumRef(buf, 0x1234) |
| 45 | if csum != csumRef { |
| 46 | t.Error("Expected checksum", csumRef, "got", csum) |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | func TestPseudoHeaderChecksum(t *testing.T) { |
| 52 | for _, addrLen := range []int{4, 16} { |
nothing calls this directly
no test coverage detected