From c40b62c5b409aa97acfa397e94dfb40198c62ea0 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Thu, 21 Feb 2019 15:13:28 -0800 Subject: deg_to_s(): Fix bad conversion. Add test cases. Bug and test case by: Stephen Moshier --- SConstruct | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index c9a76957..bd63541f 100644 --- a/SConstruct +++ b/SConstruct @@ -1377,6 +1377,9 @@ test_float = env.Program('tests/test_float', ['tests/test_float.c']) test_geoid = env.Program('tests/test_geoid', ['tests/test_geoid.c'], LIBS=['gpsd', 'gps_static'], parse_flags=gpsdflags) +test_gpsdclient = env.Program('tests/test_gpsdclient', + ['tests/test_gpsdclient.c'], + LIBS=['gps_static', 'm']) test_matrix = env.Program('tests/test_matrix', ['tests/test_matrix.c'], LIBS=['gpsd', 'gps_static'], parse_flags=gpsdflags) @@ -1408,8 +1411,16 @@ else: test_gpsmm = env.Program('tests/test_gpsmm', ['tests/test_gpsmm.cpp'], LIBS=['gps_static'], parse_flags=["-lm"] + rtlibs + dbusflags) -testprogs = [test_bits, test_float, test_geoid, test_libgps, test_matrix, - test_mktime, test_packet, test_timespec, test_trig] +testprogs = [test_bits, + test_float, + test_geoid, + test_gpsdclient, + test_libgps, + test_matrix, + test_mktime, + test_packet, + test_timespec, + test_trig] if env['socket_export']: testprogs.append(test_json) if env["libgpsmm"]: @@ -2050,6 +2061,11 @@ bits_regress = Utility('bits-regress', [test_bits], [ '$SRCDIR/tests/test_bits --quiet' ]) +# Unit-test the deg_to_str() extractor +bits_regress = Utility('deg-regress', [test_gpsdclient], [ + '$SRCDIR/tests/test_gpsdclient' +]) + # Unit-test the bitfield extractor matrix_regress = Utility('matrix-regress', [test_matrix], [ '$SRCDIR/tests/test_matrix --quiet' -- cgit v1.2.1