mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
unix: fix AF_CAN tests for big endian systems
see discussion in https://go-review.googlesource.com/c/sys/+/248977
Change-Id: I25dff34d2a6587d0b02836d7e2c9c40e08378731
GitHub-Last-Rev: 33cf644d65
GitHub-Pull-Request: golang/sys#81
Reviewed-on: https://go-review.googlesource.com/c/sys/+/249743
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
1fb7954272
commit
fda516888d
@@ -174,16 +174,16 @@ func Test_anyToSockaddr(t *testing.T) {
|
||||
Family: AF_CAN,
|
||||
Ifindex: 12345678,
|
||||
Addr: [16]byte{
|
||||
0x89, 0x67, 0x45, 0x23,
|
||||
0x90, 0x78, 0x56, 0x34,
|
||||
0xAA, 0xAA, 0xAA, 0xAA,
|
||||
0xBB, 0xBB, 0xBB, 0xBB,
|
||||
0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0,
|
||||
},
|
||||
}),
|
||||
sa: &SockaddrCAN{
|
||||
Ifindex: 12345678,
|
||||
RxID: 0x23456789,
|
||||
TxID: 0x34567890,
|
||||
RxID: 0xAAAAAAAA,
|
||||
TxID: 0xBBBBBBBB,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -573,15 +573,15 @@ func TestSockaddrCAN_sockaddr(t *testing.T) {
|
||||
name: "with ids",
|
||||
sa: &SockaddrCAN{
|
||||
Ifindex: 12345678,
|
||||
RxID: 0x23456789,
|
||||
TxID: 0x34567890,
|
||||
RxID: 0xAAAAAAAA,
|
||||
TxID: 0xBBBBBBBB,
|
||||
},
|
||||
raw: &RawSockaddrCAN{
|
||||
Family: AF_CAN,
|
||||
Ifindex: 12345678,
|
||||
Addr: [16]byte{
|
||||
0x89, 0x67, 0x45, 0x23,
|
||||
0x90, 0x78, 0x56, 0x34,
|
||||
0xAA, 0xAA, 0xAA, 0xAA,
|
||||
0xBB, 0xBB, 0xBB, 0xBB,
|
||||
0x0, 0x0, 0x0, 0x0,
|
||||
0x0, 0x0, 0x0, 0x0,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user