예제 #1
0
func TestParseHeader(t *testing.T) {
	h, err := ipv6.ParseHeader(wireHeaderFromKernel[:])
	if err != nil {
		t.Fatal(err)
	}
	if !reflect.DeepEqual(h, testHeader) {
		t.Fatalf("got %#v; want %#v", h, testHeader)
	}
}
예제 #2
0
func TestParseHeader(t *testing.T) {
	h, err := ipv6.ParseHeader(wireHeaderFromKernel[:])
	if err != nil {
		t.Fatal(err)
	}
	if !reflect.DeepEqual(h, testHeader) {
		t.Fatalf("got %#v; want %#v", h, testHeader)
	}
	s := h.String()
	if strings.Contains(s, ",") {
		t.Fatalf("should be space-separated values: %s", s)
	}
}