diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-07-13 12:43:59 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-07-13 12:43:59 +0000 |
commit | 6bc544d16b024ea8faf95f8696a5141f3337e613 (patch) | |
tree | 25f669af9b305d6c7ce575329e91905e98fc4503 /test_json.c | |
parent | e5ae2867b2235a976ee51fb6ffbd1e4a04dc1e5f (diff) | |
download | gpsd-6bc544d16b024ea8faf95f8696a5141f3337e613.tar.gz |
Fix booleans potion of JSON unit test.
Diffstat (limited to 'test_json.c')
-rw-r--r-- | test_json.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test_json.c b/test_json.c index 27579b03..3872ef79 100644 --- a/test_json.c +++ b/test_json.c @@ -108,7 +108,7 @@ const struct json_attr_t json_attrs_2_1[] = { {"el", integer, .addr.integer = gpsdata.elevation}, {"az", integer, .addr.integer = gpsdata.azimuth}, {"ss", real, .addr.real = gpsdata.ss}, - {"used", integer, .addr.integer = gpsdata.used}, + {"used", boolean, .addr.boolean = usedflags}, {NULL}, }; @@ -150,7 +150,11 @@ int main(int argc UNUSED, char *argv[] UNUSED) ASSERT_INTEGER("PRN[0]", gpsdata.PRN[0], 10); ASSERT_INTEGER("el[0]", gpsdata.elevation[0], 45); ASSERT_INTEGER("az[0]", gpsdata.azimuth[0], 196); - //ASSERT_BOOLEAN("used[0]", usedflags[0], true); + ASSERT_BOOLEAN("used[0]", usedflags[0], true); + ASSERT_INTEGER("PRN[6]", gpsdata.PRN[6], 21); + ASSERT_INTEGER("el[6]", gpsdata.elevation[6], 10); + ASSERT_INTEGER("az[6]", gpsdata.azimuth[6], 301); + ASSERT_BOOLEAN("used[6]", usedflags[6], false); (void)fprintf(stderr, "succeeded.\n"); exit(0); |