diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-07-01 12:41:56 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-07-03 00:57:06 +0200 |
commit | a64417804f4c2b0425e167851d10854cf1f23e99 (patch) | |
tree | 663cbafb8f30df0d82a289c69a4ace43656bd154 /lib/util/Makemodule.am | |
parent | a201669daff7e64255148404a27bed6c0df1eaa4 (diff) |
Consolidate some of the stray integer parsers
There are several ad-hoc int/uint parsers scattered around the code,
add a single helper function for that task and replace the multiple
instances. A simple white-box test case is added for the utility
function.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/util/Makemodule.am')
-rw-r--r-- | lib/util/Makemodule.am | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/util/Makemodule.am b/lib/util/Makemodule.am index 6386066..9b2065a 100644 --- a/lib/util/Makemodule.am +++ b/lib/util/Makemodule.am @@ -9,7 +9,8 @@ libutil_a_SOURCES = include/util/util.h include/util/str_table.h \ lib/util/src/canonicalize_name.c lib/util/src/filename_sane.c \ lib/util/src/source_date_epoch.c lib/util/src/file_cmp.c \ lib/util/src/hex_decode.c lib/util/src/base64_decode.c \ - lib/util/src/get_line.c lib/util/src/split_line.c + lib/util/src/get_line.c lib/util/src/split_line.c \ + lib/util/src/parse_int.c libutil_a_CFLAGS = $(AM_CFLAGS) libutil_a_CPPFLAGS = $(AM_CPPFLAGS) @@ -83,11 +84,14 @@ test_get_line_LDADD = libutil.a libio.a libcompat.a test_split_line_SOURCES = lib/util/test/split_line.c test_split_line_LDADD = libutil.a libcompat.a +test_parse_int_SOURCES = lib/util/test/parse_int.c +test_parse_int_LDADD = libutil.a libcompat.a + LIBUTIL_TESTS = \ test_str_table test_rbtree test_xxhash test_threadpool test_ismemzero \ test_canonicalize_name test_filename_sane test_filename_sane_w32 \ test_sdate_epoch test_hex_decode test_base64_decode test_get_line \ - test_split_line + test_split_line test_parse_int check_PROGRAMS += $(LIBUTIL_TESTS) TESTS += $(LIBUTIL_TESTS) |