|
|
@ -48,7 +48,7 @@ func TestGetSetID(t *testing.T) { |
|
|
|
assert.Equal(t, id, id2) |
|
|
|
assert.Equal(t, id, id2) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// TestGetSetIP4 tests encoding/decoding and setting/getting of the IP key.
|
|
|
|
// TestGetSetIPv4 tests encoding/decoding and setting/getting of the IP key.
|
|
|
|
func TestGetSetIPv4(t *testing.T) { |
|
|
|
func TestGetSetIPv4(t *testing.T) { |
|
|
|
ip := IPv4{192, 168, 0, 3} |
|
|
|
ip := IPv4{192, 168, 0, 3} |
|
|
|
var r Record |
|
|
|
var r Record |
|
|
@ -59,7 +59,7 @@ func TestGetSetIPv4(t *testing.T) { |
|
|
|
assert.Equal(t, ip, ip2) |
|
|
|
assert.Equal(t, ip, ip2) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// TestGetSetIP6 tests encoding/decoding and setting/getting of the IP6 key.
|
|
|
|
// TestGetSetIPv6 tests encoding/decoding and setting/getting of the IP6 key.
|
|
|
|
func TestGetSetIPv6(t *testing.T) { |
|
|
|
func TestGetSetIPv6(t *testing.T) { |
|
|
|
ip := IPv6{0x20, 0x01, 0x48, 0x60, 0, 0, 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0x00, 0x68} |
|
|
|
ip := IPv6{0x20, 0x01, 0x48, 0x60, 0, 0, 0x20, 0x01, 0, 0, 0, 0, 0, 0, 0x00, 0x68} |
|
|
|
var r Record |
|
|
|
var r Record |
|
|
|