(t *testing.T)
| 19 | ) |
| 20 | |
| 21 | func TestPcapNonexistentFile(t *testing.T) { |
| 22 | handle, err := OpenOffline("/path/to/nonexistent/file") |
| 23 | if err == nil { |
| 24 | t.Error("No error returned for nonexistent file open") |
| 25 | } else { |
| 26 | t.Logf("Error returned for nonexistent file: %v", err) |
| 27 | } |
| 28 | if handle != nil { |
| 29 | t.Error("Non-nil handle returned for nonexistent file open") |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func TestPcapFileRead(t *testing.T) { |
| 34 | invalidData := []byte{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…