diff --git a/net/net_linux_test.go b/net/net_linux_test.go index bec091c..05ff023 100644 --- a/net/net_linux_test.go +++ b/net/net_linux_test.go @@ -137,14 +137,6 @@ func TestDecodeAddress(t *testing.T) { assert := assert.New(t) addr := map[string]AddrTest{ - "0500000A:0016": { - IP: "10.0.0.5", - Port: 22, - }, - "0100007F:D1C2": { - IP: "127.0.0.1", - Port: 53698, - }, "11111:0035": { Error: true, }, @@ -159,6 +151,25 @@ func TestDecodeAddress(t *testing.T) { Error: true, }, } + if IsLittleEndian() { + addr["0500000A:0016"] = AddrTest{ + IP: "10.0.0.5", + Port: 22, + } + addr["0100007F:D1C2"] = AddrTest{ + IP: "127.0.0.1", + Port: 53698, + } + } else { + addr["0A000005:0016"] = AddrTest{ + IP: "10.0.0.5", + Port: 22, + } + addr["7F000001:D1C2"] = AddrTest{ + IP: "127.0.0.1", + Port: 53698, + } + } for src, dst := range addr { family := syscall.AF_INET