Run gofmt -w -s (#971)
mechanical run of gofmt. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
0930b62a13
commit
087e486609
38
fuzz_test.go
38
fuzz_test.go
|
@ -85,23 +85,23 @@ func TestPackDataOpt(t *testing.T) {
|
|||
func TestCrashNSEC(t *testing.T) {
|
||||
compression := make(map[string]struct{})
|
||||
nsec := &NSEC{
|
||||
Hdr: RR_Header{
|
||||
Name:".",
|
||||
Rrtype:0x2f,
|
||||
Class:0x3030,
|
||||
Ttl:0x30303030,
|
||||
Rdlength:0xb,
|
||||
},
|
||||
NextDomain:".",
|
||||
TypeBitMap:[]uint16{
|
||||
0x2302, 0x2303, 0x230a, 0x230b,
|
||||
0x2312, 0x2313, 0x231a, 0x231b,
|
||||
0x2322, 0x2323,
|
||||
},
|
||||
}
|
||||
expectedLength := 19
|
||||
l := nsec.len(0, compression)
|
||||
if l != expectedLength {
|
||||
t.Fatalf("expected length of %d, got %d", expectedLength, l)
|
||||
}
|
||||
Hdr: RR_Header{
|
||||
Name: ".",
|
||||
Rrtype: 0x2f,
|
||||
Class: 0x3030,
|
||||
Ttl: 0x30303030,
|
||||
Rdlength: 0xb,
|
||||
},
|
||||
NextDomain: ".",
|
||||
TypeBitMap: []uint16{
|
||||
0x2302, 0x2303, 0x230a, 0x230b,
|
||||
0x2312, 0x2313, 0x231a, 0x231b,
|
||||
0x2322, 0x2323,
|
||||
},
|
||||
}
|
||||
expectedLength := 19
|
||||
l := nsec.len(0, compression)
|
||||
if l != expectedLength {
|
||||
t.Fatalf("expected length of %d, got %d", expectedLength, l)
|
||||
}
|
||||
}
|
||||
|
|
10
msg_test.go
10
msg_test.go
|
@ -220,11 +220,11 @@ func TestUnpackDomainName(t *testing.T) {
|
|||
|
||||
func TestPackDomainNameCompressionMap(t *testing.T) {
|
||||
expected := map[string]struct{}{
|
||||
`www\.this.is.\131an.example.org.`: struct{}{},
|
||||
`is.\131an.example.org.`: struct{}{},
|
||||
`\131an.example.org.`: struct{}{},
|
||||
`example.org.`: struct{}{},
|
||||
`org.`: struct{}{},
|
||||
`www\.this.is.\131an.example.org.`: {},
|
||||
`is.\131an.example.org.`: {},
|
||||
`\131an.example.org.`: {},
|
||||
`example.org.`: {},
|
||||
`org.`: {},
|
||||
}
|
||||
|
||||
msg := make([]byte, 256)
|
||||
|
|
Loading…
Reference in New Issue