Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix endianness issues in sys::unix::in_addr_convertion test
Previously, the "expected" values were implicitly encoded in little-endian byte order with bitwise operators to match the native (little-endian) byte order of u32s on most architectures. This test obviously breaks when the byte order is big-endian. Instead, provide the expected value as an array of numbers converted into a network-endian u32. This has the added benefit that it's much clearer to read, and the numbers in the array also match the ones that are used in the Ipv4Addr constructor, and no longer have to be constructed manually with bitwise operators.
- Loading branch information