diff options
author | Mattias Andrée <maandree@kth.se> | 2023-01-08 11:11:55 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-01-08 11:11:55 +0100 |
commit | aaf631e76df1e1a730b6a0ffb0d62b3ba661643e (patch) | |
tree | 1a737835a07eaebd3436a1fee19bf691f63d918b | |
parent | Fix and test libfonts_get_default_font_name (diff) | |
download | libfonts-aaf631e76df1e1a730b6a0ffb0d62b3ba661643e.tar.gz libfonts-aaf631e76df1e1a730b6a0ffb0d62b3ba661643e.tar.bz2 libfonts-aaf631e76df1e1a730b6a0ffb0d62b3ba661643e.tar.xz |
Move test-todos into .c-files and add empty test functions
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | libfonts.h | 3 | ||||
-rw-r--r-- | libfonts_decode_font_description.c | 15 | ||||
-rw-r--r-- | libfonts_encode_font_description.c | 15 | ||||
-rw-r--r-- | libfonts_get_output_dpi.c | 14 |
5 files changed, 45 insertions, 9 deletions
@@ -25,17 +25,12 @@ OBJ =\ libfonts_get_subpixel_order_class.o\ libfonts_unget_subpixel_order_class.o -TESTS =\ - libfonts_calculate_subpixel_order.test\ - libfonts_get_default_font_name.test\ - libfonts_get_subpixel_order_class.test\ - libfonts_unget_subpixel_order_class.test - HDR =\ common.h\ libfonts.h LOBJ = $(OBJ:.o=.lo) +TESTS = $(OBJ:.o=.test) all: libfonts.a libfonts.$(LIBEXT) $(TESTS) @@ -1647,7 +1647,6 @@ int libfonts_get_default_font_by_name(enum libfonts_default_font *, const char * * @throws EINVAL Invalid font description */ int libfonts_encode_font_description(const struct libfonts_font_description *, char[static 256]); -/* TODO add test */ /** * Decode an X Logical Font Description (XLFD) string @@ -1659,7 +1658,6 @@ int libfonts_encode_font_description(const struct libfonts_font_description *, c * @throws EINVAL Invalid font description */ int libfonts_decode_font_description(struct libfonts_font_description *, const char *); -/* TODO add test */ /** * Check if an X Logical Font Description (XLFD) matches @@ -1762,7 +1760,6 @@ int libfonts_get_output_rendering_settings(struct libfonts_rendering_settings *, * non-invertable output transformation) */ int libfonts_get_output_dpi(struct libfonts_output *, const char *); -/* TODO add test */ /** * Calculate the subpixel order on an output device after diff --git a/libfonts_decode_font_description.c b/libfonts_decode_font_description.c index 46031de..2348d97 100644 --- a/libfonts_decode_font_description.c +++ b/libfonts_decode_font_description.c @@ -1,5 +1,7 @@ /* See LICENSE file for copyright and license details. */ #include "common.h" +#ifndef TEST + #define LIST_FIELDS_EXCEPT_FINAL(X)\ X(foundry)\ @@ -215,3 +217,16 @@ private: desc->private_font_name = desc->_buf; return 0; } + + +#else + + +int +main(void) /* TODO add test */ +{ + return 0; +} + + +#endif diff --git a/libfonts_encode_font_description.c b/libfonts_encode_font_description.c index 5bbac5f..5cc26bb 100644 --- a/libfonts_encode_font_description.c +++ b/libfonts_encode_font_description.c @@ -1,5 +1,7 @@ /* See LICENSE file for copyright and license details. */ #include "common.h" +#ifndef TEST + #define LIST_FIELDS(X)\ X(foundry)\ @@ -102,3 +104,16 @@ einval: errno = EINVAL; return -1; } + + +#else + + +int +main(void) /* TODO add test */ +{ + return 0; +} + + +#endif diff --git a/libfonts_get_output_dpi.c b/libfonts_get_output_dpi.c index 17ae837..47fcb70 100644 --- a/libfonts_get_output_dpi.c +++ b/libfonts_get_output_dpi.c @@ -1,5 +1,6 @@ /* See LICENSE file for copyright and license details. */ #include "common.h" +#ifndef TEST static int @@ -115,3 +116,16 @@ libfonts_get_output_dpi(struct libfonts_output *output, const char *edid) return 1; } + + +#else + + +int +main(void) /* TODO add test */ +{ + return 0; +} + + +#endif |