diff options
Diffstat (limited to 'tests/fgla_test_internals.h')
-rw-r--r-- | tests/fgla_test_internals.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/fgla_test_internals.h b/tests/fgla_test_internals.h new file mode 100644 index 0000000..6e019c7 --- /dev/null +++ b/tests/fgla_test_internals.h @@ -0,0 +1,28 @@ +/**
+ * fgla_test_internals.h - Internal function declarations for testing
+ *
+ * This header exposes internal fgla functions for unit testing purposes.
+ * These functions should not be used in production code.
+ */
+
+#ifndef FGLA_TEST_INTERNALS_H
+#define FGLA_TEST_INTERNALS_H
+
+#include "../include/glautils/fgla.h"
+
+#ifdef TEST_BUILD
+
+// Re-declare internal functions as extern for testing
+// These functions are normally static in fgla.c
+
+extern void to_lowercase_safe(char* str, size_t max_len);
+extern int normalize_string_safe(const char* input, char* output, size_t output_size);
+extern int contains_substring_safe(const char* haystack, const char* needle);
+extern int matches_catalog(const char* manufacturer, const char* catalog_list[], int catalog_count);
+extern int validate_search_term(const char* term);
+extern int is_glass_code_pattern(const char* term);
+extern int matches_glass_code_pattern_safe(const char* glass_code, const char* pattern);
+
+#endif /* TEST_BUILD */
+
+#endif /* FGLA_TEST_INTERNALS_H */
\ No newline at end of file |