diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2012-04-19 19:01:27 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2012-04-19 19:01:27 -0400 |
commit | 68dbfcb69bdb668a9a4ac3db7da77ec8b232c4ba (patch) | |
tree | 0a60da2fac22288c1ab3907ce55eb74e8141c22a /test_bits.c | |
parent | d3250c3e1e712e4894404f9d19da4d6519aa96a9 (diff) | |
download | gpsd-68dbfcb69bdb668a9a4ac3db7da77ec8b232c4ba.tar.gz |
Another multibyte test of little-endian extraction succeeded.
Diffstat (limited to 'test_bits.c')
-rw-r--r-- | test_bits.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test_bits.c b/test_bits.c index 4402ae00..84d23c68 100644 --- a/test_bits.c +++ b/test_bits.c @@ -124,11 +124,12 @@ int main(void) {buf, 0, 8, 0x01, false, "first 8 bits"}, {buf, 32, 7, 0x02, false, "first seven bits of fifth byte (0x05)"}, {buf, 56, 12, 0x8f, false, "12 bits crossing 7th to 8th bytes (0x08ff)"}, - {buf, 78, 4, 11, false, "2 bits crossing 8th to 9th byte (0xfefd)"}, + {buf, 78, 4, 0xb, false, "4 bits crossing 8th to 9th byte (0xfefd)"}, {buf, 0, 1, 0, true, "first bit of first byte"}, {buf, 0, 8, 0x80, true, "first 8 bits"}, {buf, 32, 7, 0x20, true, "first seven bits of fifth byte (0x05)"}, {buf, 56, 12, 0xf10,true, "12 bits crossing 7th to 8th bytes (0x08ff)"}, + {buf, 78, 4, 0xd, true, "4 bits crossing 8th to 9th byte (0xfefd)"}, /* sporadic tests based on found bugs */ {(unsigned char *)"\x19\x23\f6", 7, 2, 2, false, "2 bits crossing 1st to 2nd byte (0x1923)"}, |