mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
tests/hard_coded/read_binary_int16.exp2:
tests/hard_coded/read_binary_int32.exp2:
tests/hard_coded/read_binary_int64.exp2:
tests/hard_coded/read_binary_uint16.exp2:
tests/hard_coded/read_binary_uint32.exp2:
tests/hard_coded/read_binary_uint64.exp2:
Add expected outputs on big endian architectures.
tests/hard_coded/read_binary_int16.m:
tests/hard_coded/read_binary_int32.m:
tests/hard_coded/read_binary_int64.m:
tests/hard_coded/read_binary_uint16.m:
tests/hard_coded/read_binary_uint32.m:
tests/hard_coded/read_binary_uint64.m:
Document expected outputs.
64 lines
1.9 KiB
Plaintext
64 lines
1.9 KiB
Plaintext
================
|
|
Input: []
|
|
Result: EOF (read big-endian)
|
|
================
|
|
Input: [1u8]
|
|
Result: Incomplete ([1u8]) (read big-endian)
|
|
================
|
|
Input: [1u8, 2u8]
|
|
Result: Incomplete ([1u8, 2u8]) (read big-endian)
|
|
================
|
|
Input: [1u8, 2u8, 3u8]
|
|
Result: Incomplete ([1u8, 2u8, 3u8]) (read big-endian)
|
|
================
|
|
Input: [0u8, 0u8, 0u8, 1u8] (LE: 16777216) (BE: 1)
|
|
Result: 1i32 (read big-endian)
|
|
================
|
|
Input: [255u8, 0u8, 0u8, 0u8] (LE: 255) (BE: -16777216)
|
|
Result: -16777216i32 (read big-endian)
|
|
================
|
|
Input: [1u8, 1u8, 0u8, 0u8] (LE: 257) (BE: 16842752)
|
|
Result: 16842752i32 (read big-endian)
|
|
================
|
|
Input: []
|
|
Result: EOF (read little-endian)
|
|
================
|
|
Input: [1u8]
|
|
Result: Incomplete ([1u8]) (read little-endian)
|
|
================
|
|
Input: [1u8, 2u8]
|
|
Result: Incomplete ([1u8, 2u8]) (read little-endian)
|
|
================
|
|
Input: [1u8, 2u8, 3u8]
|
|
Result: Incomplete ([1u8, 2u8, 3u8]) (read little-endian)
|
|
================
|
|
Input: [0u8, 0u8, 0u8, 1u8] (LE: 16777216) (BE: 1)
|
|
Result: 16777216i32 (read little-endian)
|
|
================
|
|
Input: [255u8, 0u8, 0u8, 0u8] (LE: 255) (BE: -16777216)
|
|
Result: 255i32 (read little-endian)
|
|
================
|
|
Input: [1u8, 1u8, 0u8, 0u8] (LE: 257) (BE: 16842752)
|
|
Result: 257i32 (read little-endian)
|
|
================
|
|
Input: []
|
|
Result: EOF (read native byte order)
|
|
================
|
|
Input: [1u8]
|
|
Result: Incomplete ([1u8]) (read native byte order)
|
|
================
|
|
Input: [1u8, 2u8]
|
|
Result: Incomplete ([1u8, 2u8]) (read native byte order)
|
|
================
|
|
Input: [1u8, 2u8, 3u8]
|
|
Result: Incomplete ([1u8, 2u8, 3u8]) (read native byte order)
|
|
================
|
|
Input: [0u8, 0u8, 0u8, 1u8] (LE: 16777216) (BE: 1)
|
|
Result: 1i32 (read native byte order)
|
|
================
|
|
Input: [255u8, 0u8, 0u8, 0u8] (LE: 255) (BE: -16777216)
|
|
Result: -16777216i32 (read native byte order)
|
|
================
|
|
Input: [1u8, 1u8, 0u8, 0u8] (LE: 257) (BE: 16842752)
|
|
Result: 16842752i32 (read native byte order)
|