summaryrefslogtreecommitdiff
path: root/test_bits.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-04-19 18:12:51 -0400
committerEric S. Raymond <esr@thyrsus.com>2012-04-19 18:13:00 -0400
commit9e7289c268f7c4643225005cab27a6cd6bb83202 (patch)
tree29c2ad515a6d32823691b31265c1b273bb1ab9db /test_bits.c
parent60eeb93321e753828050bb70c6c58c98700e8656 (diff)
downloadgpsd-9e7289c268f7c4643225005cab27a6cd6bb83202.tar.gz
First regressions for little-endian extraction pass.
Diffstat (limited to 'test_bits.c')
-rw-r--r--test_bits.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test_bits.c b/test_bits.c
index 87b8af1c..d3fb94a0 100644
--- a/test_bits.c
+++ b/test_bits.c
@@ -122,9 +122,11 @@ int main(void)
/* tests using the big buffer */
{buf, 0, 1, 0, false, "first bit of first byte"},
{buf, 0, 8, 0x01, false, "first 8 bits"},
- {buf, 32, 7, 0x02, false, "first seven bits of fifth byte"},
+ {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, 0, 1, 0, true, "first bit of first byte"},
+ {buf, 0, 8, 0x80, true, "first 8 bits"},
/* sporadic tests based on found bugs */
{(unsigned char *)"\x19\x23\f6",
7, 2, 2, false, "2 bits crossing 1st to 2nd byte (0x1923)"},