From 87cd97ecf220c3101d4c2647356de4ce6f6562ee Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 3 Dec 2025 23:44:57 -0600 Subject: [PATCH] Update: Add missing array types for time and date structures. Update the build files. Add unit tests. --- build/disable/level_0/f_type.h | 6 + build/disable/level_0/f_type_array.h | 6 + build/disable/level_2/fll_program.h | 2 + build/level_0/settings | 6 +- build/monolithic/settings | 6 +- build/stand_alone/byte_dump.config.h | 17 +- build/stand_alone/byte_dump.settings | 2 +- build/stand_alone/example.config.h | 17 +- build/stand_alone/example.settings | 2 +- build/stand_alone/fake.config.h | 17 +- build/stand_alone/fake.settings | 2 +- build/stand_alone/utf8.config.h | 15 +- build/stand_alone/utf8.settings | 2 +- level_0/f_type/c/type.h | 3 +- level_0/f_type/c/type/date.h | 291 +++++++++++++++++++++ level_0/f_type/c/type/time.h | 118 +++++---- level_0/f_type/data/build/settings | 2 +- level_0/f_type_array/c/type_array.h | 2 + level_0/f_type_array/c/type_array/date.c | 90 +++++++ level_0/f_type_array/c/type_array/date.h | 143 ++++++++++ level_0/f_type_array/c/type_array/time.c | 50 ++++ level_0/f_type_array/c/type_array/time.h | 83 ++++++ level_0/f_type_array/data/build/settings | 4 +- level_0/f_type_array/data/build/settings-mocks | 4 +- level_0/f_type_array/data/build/settings-tests | 3 + ...test-type_array-date_simpless_delete_callback.c | 57 ++++ ...test-type_array-date_simpless_delete_callback.h | 27 ++ ...est-type_array-date_simpless_destroy_callback.c | 57 ++++ ...est-type_array-date_simpless_destroy_callback.h | 27 ++ .../c/test-type_array-datess_delete_callback.c | 57 ++++ .../c/test-type_array-datess_delete_callback.h | 27 ++ .../c/test-type_array-datess_destroy_callback.c | 57 ++++ .../c/test-type_array-datess_destroy_callback.h | 27 ++ ...test-type_array-time_simpless_delete_callback.c | 57 ++++ ...test-type_array-time_simpless_delete_callback.h | 27 ++ ...est-type_array-time_simpless_destroy_callback.c | 57 ++++ ...est-type_array-time_simpless_destroy_callback.h | 27 ++ .../f_type_array/tests/unit/c/test-type_array.c | 18 ++ .../f_type_array/tests/unit/c/test-type_array.h | 6 + 39 files changed, 1351 insertions(+), 70 deletions(-) create mode 100644 level_0/f_type/c/type/date.h create mode 100644 level_0/f_type_array/c/type_array/date.c create mode 100644 level_0/f_type_array/c/type_array/date.h create mode 100644 level_0/f_type_array/c/type_array/time.c create mode 100644 level_0/f_type_array/c/type_array/time.h create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.c create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.h create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.c create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.h create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.c create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.h create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.c create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.h create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.c create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.h create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.c create mode 100644 level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.h diff --git a/build/disable/level_0/f_type.h b/build/disable/level_0/f_type.h index 1af95d4..f67c902 100644 --- a/build/disable/level_0/f_type.h +++ b/build/disable/level_0/f_type.h @@ -3,7 +3,11 @@ #define _di_f_cells_t_ #define _di_f_cellss_t_ #define _di_f_date_simple_t_ +#define _di_f_date_simples_t_ +#define _di_f_date_simpless_t_ #define _di_f_date_t_ +#define _di_f_dates_t_ +#define _di_f_datess_t_ #define _di_f_file_t_ #define _di_f_files_t_ #define _di_f_filess_t_ @@ -55,6 +59,8 @@ #define _di_f_statusss_t_ #define _di_f_time_part_t_ #define _di_f_time_simple_t_ +#define _di_f_time_simples_t_ +#define _di_f_time_simpless_t_ #define _di_f_time_spec_t_ #define _di_f_time_t_ #define _di_f_time_value_t_ diff --git a/build/disable/level_0/f_type_array.h b/build/disable/level_0/f_type_array.h index 0906e75..e565052 100644 --- a/build/disable/level_0/f_type_array.h +++ b/build/disable/level_0/f_type_array.h @@ -1,5 +1,9 @@ #define _di_f_cellss_delete_callback_ #define _di_f_cellss_destroy_callback_ +#define _di_f_date_simpless_delete_callback_ +#define _di_f_date_simpless_destroy_callback_ +#define _di_f_datess_delete_callback_ +#define _di_f_datess_destroy_callback_ #define _di_f_filess_delete_callback_ #define _di_f_filess_destroy_callback_ #define _di_f_fll_ids_delete_callback_ @@ -53,6 +57,8 @@ #define _di_f_statess_destroy_callback_ #define _di_f_statusss_delete_callback_ #define _di_f_statusss_destroy_callback_ +#define _di_f_time_simpless_delete_callback_ +#define _di_f_time_simpless_destroy_callback_ #define _di_f_uidss_delete_callback_ #define _di_f_uidss_destroy_callback_ #define _di_f_uint128ss_delete_callback_ diff --git a/build/disable/level_2/fll_program.h b/build/disable/level_2/fll_program.h index 2d8c200..2ea1b9b 100644 --- a/build/disable/level_2/fll_program.h +++ b/build/disable/level_2/fll_program.h @@ -40,6 +40,8 @@ #define _di_fll_program_print_error_parameter_process_ #define _di_fll_program_print_error_parameter_range_start_before_stop_ #define _di_fll_program_print_error_parameter_support_not_ +#define _di_fll_program_print_error_parameter_too_few_ +#define _di_fll_program_print_error_parameter_too_many_ #define _di_fll_program_print_error_parameter_value_too_long_ #define _di_fll_program_print_error_pipe_invalid_form_feed_ #define _di_fll_program_print_error_pipe_missing_content_ diff --git a/build/level_0/settings b/build/level_0/settings index 1c61246..3f88db5 100644 --- a/build/level_0/settings +++ b/build/level_0/settings @@ -77,7 +77,7 @@ build_sources_library string/map_multi.c string/map_multis.c string/map_multiss. build_sources_library string/static.c string/statics.c string/staticss.c build_sources_library string/triple.c string/triples.c string/tripless.c build_sources_library time.c -build_sources_library type_array/cell.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c +build_sources_library type_array/cell.c type_array/date.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/time.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c build_sources_library utf.c private-utf.c private-utf_alphabetic.c private-utf_combining.c private-utf_control.c private-utf_digit.c private-utf_emoji.c private-utf_numeric.c private-utf_phonetic.c private-utf_private.c private-utf_punctuation.c private-utf_subscript.c private-utf_superscript.c private-utf_symbol.c private-utf_unassigned.c private-utf_valid.c private-utf_whitespace.c private-utf_wide.c private-utf_word.c private-utf_zero_width.c build_sources_library utf/common.c utf/convert.c build_sources_library utf/dynamic.c utf/dynamics.c utf/dynamicss.c @@ -136,8 +136,8 @@ build_sources_headers string/map_multi.h string/map_multis.h string/map_multiss. build_sources_headers string/static.h string/statics.h string/staticss.h build_sources_headers string/triple.h string/triples.h string/tripless.h build_sources_headers time.h time/common.h -build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/pid.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h type/void.h -build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h +build_sources_headers type.h type/cell.h type/date.h type/file.h type/fll.h type/mode.h type/number.h type/pid.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h type/void.h +build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/date.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/time.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h build_sources_headers utf.h utf/common.h utf/convert.h utf/dynamic.h utf/dynamics.h utf/dynamicss.h utf/is.h utf/is_character.h utf/map.h utf/maps.h utf/mapss.h utf/map_multi.h utf/map_multis.h utf/map_multiss.h utf/static.h utf/statics.h utf/staticss.h utf/string.h utf/triple.h utf/triples.h utf/tripless.h build_sources_headers-thread thread.h diff --git a/build/monolithic/settings b/build/monolithic/settings index 8950267..ea6658f 100644 --- a/build/monolithic/settings +++ b/build/monolithic/settings @@ -77,7 +77,7 @@ build_sources_library level_0/string/map_multi.c level_0/string/map_multis.c lev build_sources_library level_0/string/static.c level_0/string/statics.c level_0/string/staticss.c build_sources_library level_0/string/triple.c level_0/string/triples.c level_0/string/tripless.c build_sources_library level_0/time.c -build_sources_library level_0/type_array/cell.c level_0/type_array/file.c level_0/type_array/fll_id.c level_0/type_array/int8.c level_0/type_array/int16.c level_0/type_array/int32.c level_0/type_array/int64.c level_0/type_array/int128.c level_0/type_array/number_signed.c level_0/type_array/number_unsigned.c level_0/type_array/pid.c level_0/type_array/poll.c level_0/type_array/quantity.c level_0/type_array/quantitys.c level_0/type_array/quantityss.c level_0/type_array/range.c level_0/type_array/ranges.c level_0/type_array/rangess.c level_0/type_array/range_double.c level_0/type_array/range_doubles.c level_0/type_array/range_doubless.c level_0/type_array/state.c level_0/type_array/status.c level_0/type_array/uint8.c level_0/type_array/uint16.c level_0/type_array/uint32.c level_0/type_array/uint64.c level_0/type_array/uint128.c +build_sources_library level_0/type_array/cell.c level_0/type_array/date.c level_0/type_array/file.c level_0/type_array/fll_id.c level_0/type_array/int8.c level_0/type_array/int16.c level_0/type_array/int32.c level_0/type_array/int64.c level_0/type_array/int128.c level_0/type_array/number_signed.c level_0/type_array/number_unsigned.c level_0/type_array/pid.c level_0/type_array/poll.c level_0/type_array/quantity.c level_0/type_array/quantitys.c level_0/type_array/quantityss.c level_0/type_array/range.c level_0/type_array/ranges.c level_0/type_array/rangess.c level_0/type_array/range_double.c level_0/type_array/range_doubles.c level_0/type_array/range_doubless.c level_0/type_array/state.c level_0/type_array/status.c level_0/type_array/time.c level_0/type_array/uint8.c level_0/type_array/uint16.c level_0/type_array/uint32.c level_0/type_array/uint64.c level_0/type_array/uint128.c build_sources_library level_0/utf.c level_0/private-utf.c level_0/private-utf_alphabetic.c level_0/private-utf_combining.c level_0/private-utf_control.c level_0/private-utf_digit.c level_0/private-utf_emoji.c level_0/private-utf_numeric.c level_0/private-utf_phonetic.c level_0/private-utf_private.c level_0/private-utf_punctuation.c level_0/private-utf_subscript.c level_0/private-utf_superscript.c level_0/private-utf_symbol.c level_0/private-utf_unassigned.c level_0/private-utf_valid.c level_0/private-utf_whitespace.c level_0/private-utf_wide.c level_0/private-utf_word.c level_0/private-utf_zero_width.c build_sources_library level_0/utf/common.c level_0/utf/convert.c build_sources_library level_0/utf/dynamic.c level_0/utf/dynamics.c level_0/utf/dynamicss.c @@ -157,8 +157,8 @@ build_sources_headers level_0/string/map_multi.h level_0/string/map_multis.h lev build_sources_headers level_0/string/static.h level_0/string/statics.h level_0/string/staticss.h build_sources_headers level_0/string/triple.h level_0/string/triples.h level_0/string/tripless.h build_sources_headers level_0/time.h level_0/time/common.h -build_sources_headers level_0/type.h level_0/type/cell.h level_0/type/file.h level_0/type/fll.h level_0/type/mode.h level_0/type/number.h level_0/type/pid.h level_0/type/quantity.h level_0/type/range.h level_0/type/range_double.h level_0/type/state.h level_0/type/status.h level_0/type/time.h level_0/type/void.h -build_sources_headers level_0/type_array.h level_0/type_array_file.h level_0/type_array/common.h level_0/type_array/cell.h level_0/type_array/file.h level_0/type_array/fll_id.h level_0/type_array/int8.h level_0/type_array/int16.h level_0/type_array/int32.h level_0/type_array/int64.h level_0/type_array/int128.h level_0/type_array/number_signed.h level_0/type_array/number_unsigned.h level_0/type_array/pid.h level_0/type_array/poll.h level_0/type_array/quantity.h level_0/type_array/quantitys.h level_0/type_array/quantityss.h level_0/type_array/range.h level_0/type_array/ranges.h level_0/type_array/rangess.h level_0/type_array/range_double.h level_0/type_array/range_doubles.h level_0/type_array/range_doubless.h level_0/type_array/state.h level_0/type_array/status.h level_0/type_array/uint8.h level_0/type_array/uint16.h level_0/type_array/uint32.h level_0/type_array/uint64.h level_0/type_array/uint128.h +build_sources_headers level_0/type.h level_0/type/cell.h level_0/type/date.h level_0/type/file.h level_0/type/fll.h level_0/type/mode.h level_0/type/number.h level_0/type/pid.h level_0/type/quantity.h level_0/type/range.h level_0/type/range_double.h level_0/type/state.h level_0/type/status.h level_0/type/time.h level_0/type/void.h +build_sources_headers level_0/type_array.h level_0/type_array_file.h level_0/type_array/common.h level_0/type_array/cell.h level_0/type_array/date.h level_0/type_array/file.h level_0/type_array/fll_id.h level_0/type_array/int8.h level_0/type_array/int16.h level_0/type_array/int32.h level_0/type_array/int64.h level_0/type_array/int128.h level_0/type_array/number_signed.h level_0/type_array/number_unsigned.h level_0/type_array/pid.h level_0/type_array/poll.h level_0/type_array/quantity.h level_0/type_array/quantitys.h level_0/type_array/quantityss.h level_0/type_array/range.h level_0/type_array/ranges.h level_0/type_array/rangess.h level_0/type_array/range_double.h level_0/type_array/range_doubles.h level_0/type_array/range_doubless.h level_0/type_array/state.h level_0/type_array/status.h level_0/type_array/time.h level_0/type_array/uint8.h level_0/type_array/uint16.h level_0/type_array/uint32.h level_0/type_array/uint64.h level_0/type_array/uint128.h build_sources_headers level_0/utf.h level_0/utf/common.h level_0/utf/convert.h level_0/utf/dynamic.h level_0/utf/dynamics.h level_0/utf/dynamicss.h level_0/utf/is.h level_0/utf/is_character.h level_0/utf/map.h level_0/utf/maps.h level_0/utf/mapss.h level_0/utf/map_multi.h level_0/utf/map_multis.h level_0/utf/map_multiss.h level_0/utf/static.h level_0/utf/statics.h level_0/utf/staticss.h level_0/utf/string.h level_0/utf/triple.h level_0/utf/triples.h level_0/utf/tripless.h build_sources_headers level_1/control_group.h diff --git a/build/stand_alone/byte_dump.config.h b/build/stand_alone/byte_dump.config.h index a2b887d..8590bf0 100644 --- a/build/stand_alone/byte_dump.config.h +++ b/build/stand_alone/byte_dump.config.h @@ -212,7 +212,15 @@ //#define _di_f_conversion_number_unsigned_print_ //#define _di_f_conversion_number_unsigned_to_string_ #define _di_f_date_simple_t_ +#define _di_f_date_simples_t_ +#define _di_f_date_simpless_delete_callback_ +#define _di_f_date_simpless_destroy_callback_ +#define _di_f_date_simpless_t_ #define _di_f_date_t_ +#define _di_f_dates_t_ +#define _di_f_datess_delete_callback_ +#define _di_f_datess_destroy_callback_ +#define _di_f_datess_t_ #define _di_f_file_access_ #define _di_f_file_access_at_ #define _di_f_file_access_mode_d_ @@ -652,8 +660,8 @@ #define _di_f_statess_delete_callback_ #define _di_f_statess_destroy_callback_ #define _di_f_statess_t_ -//#define _di_f_status_e_ //#define _di_f_status_debug_d_ +//#define _di_f_status_e_ //#define _di_f_status_mask_d_ //#define _di_f_status_t_ #define _di_f_statuss_t_ @@ -1197,7 +1205,6 @@ #define _di_f_thread_mutex_attributess_t_ #define _di_f_thread_mutex_consistent_ #define _di_f_thread_mutex_create_ -#define _di_f_thread_mutex_d_ #define _di_f_thread_mutex_delete_ #define _di_f_thread_mutex_full_delete_ #define _di_f_thread_mutex_full_t_ @@ -1270,6 +1277,10 @@ #define _di_f_thread_unlock_ #define _di_f_time_part_t_ #define _di_f_time_simple_t_ +#define _di_f_time_simples_t_ +#define _di_f_time_simpless_delete_callback_ +#define _di_f_time_simpless_destroy_callback_ +#define _di_f_time_simpless_t_ #define _di_f_time_spec_t_ #define _di_f_time_t_ #define _di_f_time_value_t_ @@ -1589,6 +1600,8 @@ //#define _di_fl_print_warning_s_ //#define _di_fll_error_file_flag_e_ //#define _di_fll_error_file_print_ +#define _di_fll_error_file_print_one_ +#define _di_fll_error_file_print_simple_ //#define _di_fll_error_file_type_directory_s_ //#define _di_fll_error_file_type_e_ //#define _di_fll_error_file_type_file_s_ diff --git a/build/stand_alone/byte_dump.settings b/build/stand_alone/byte_dump.settings index 778e38d..a3e9d23 100644 --- a/build/stand_alone/byte_dump.settings +++ b/build/stand_alone/byte_dump.settings @@ -50,7 +50,7 @@ build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_ build_sources_program fll/level_0/signal.c build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c -build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c +build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/date.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/time.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c build_sources_program fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c diff --git a/build/stand_alone/example.config.h b/build/stand_alone/example.config.h index ff0fd66..f7c5f31 100644 --- a/build/stand_alone/example.config.h +++ b/build/stand_alone/example.config.h @@ -163,7 +163,15 @@ //#define _di_f_conversion_number_unsigned_print_ //#define _di_f_conversion_number_unsigned_to_string_ #define _di_f_date_simple_t_ +#define _di_f_date_simples_t_ +#define _di_f_date_simpless_delete_callback_ +#define _di_f_date_simpless_destroy_callback_ +#define _di_f_date_simpless_t_ #define _di_f_date_t_ +#define _di_f_dates_t_ +#define _di_f_datess_delete_callback_ +#define _di_f_datess_destroy_callback_ +#define _di_f_datess_t_ #define _di_f_file_access_ #define _di_f_file_access_at_ #define _di_f_file_access_mode_d_ @@ -603,8 +611,8 @@ #define _di_f_statess_delete_callback_ #define _di_f_statess_destroy_callback_ #define _di_f_statess_t_ -//#define _di_f_status_e_ //#define _di_f_status_debug_d_ +//#define _di_f_status_e_ //#define _di_f_status_mask_d_ //#define _di_f_status_t_ #define _di_f_statuss_t_ @@ -1148,7 +1156,6 @@ #define _di_f_thread_mutex_attributess_t_ #define _di_f_thread_mutex_consistent_ #define _di_f_thread_mutex_create_ -#define _di_f_thread_mutex_d_ #define _di_f_thread_mutex_delete_ #define _di_f_thread_mutex_full_delete_ #define _di_f_thread_mutex_full_t_ @@ -1231,6 +1238,10 @@ #define _di_f_time_of_day_set_ #define _di_f_time_part_t_ #define _di_f_time_simple_t_ +#define _di_f_time_simples_t_ +#define _di_f_time_simpless_delete_callback_ +#define _di_f_time_simpless_destroy_callback_ +#define _di_f_time_simpless_t_ #define _di_f_time_sleep_spec_ #define _di_f_time_spec_millisecond_ #define _di_f_time_spec_nanosecond_ @@ -1528,6 +1539,8 @@ //#define _di_fl_print_warning_s_ //#define _di_fll_error_file_flag_e_ //#define _di_fll_error_file_print_ +#define _di_fll_error_file_print_one_ +#define _di_fll_error_file_print_simple_ //#define _di_fll_error_file_type_directory_s_ //#define _di_fll_error_file_type_e_ //#define _di_fll_error_file_type_file_s_ diff --git a/build/stand_alone/example.settings b/build/stand_alone/example.settings index cb1455f..be47945 100644 --- a/build/stand_alone/example.settings +++ b/build/stand_alone/example.settings @@ -50,7 +50,7 @@ build_sources_program fll/level_0/rip.c fll/level_0/rip/utf.c fll/level_0/privat build_sources_program fll/level_0/signal.c build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c -build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c +build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/date.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/time.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c build_sources_program fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c diff --git a/build/stand_alone/fake.config.h b/build/stand_alone/fake.config.h index c049968..4816557 100644 --- a/build/stand_alone/fake.config.h +++ b/build/stand_alone/fake.config.h @@ -299,7 +299,15 @@ //#define _di_f_conversion_number_unsigned_print_ //#define _di_f_conversion_number_unsigned_to_string_ #define _di_f_date_simple_t_ +#define _di_f_date_simples_t_ +#define _di_f_date_simpless_delete_callback_ +#define _di_f_date_simpless_destroy_callback_ +#define _di_f_date_simpless_t_ #define _di_f_date_t_ +#define _di_f_dates_t_ +#define _di_f_datess_delete_callback_ +#define _di_f_datess_destroy_callback_ +#define _di_f_datess_t_ //#define _di_f_directory_at_d_ //#define _di_f_directory_back_s_ //#define _di_f_directory_compare_call_t_ @@ -1094,8 +1102,8 @@ #define _di_f_statess_delete_callback_ #define _di_f_statess_destroy_callback_ #define _di_f_statess_t_ -//#define _di_f_status_e_ //#define _di_f_status_debug_d_ +//#define _di_f_status_e_ //#define _di_f_status_mask_d_ //#define _di_f_status_t_ #define _di_f_statuss_t_ @@ -1639,7 +1647,6 @@ #define _di_f_thread_mutex_attributess_t_ #define _di_f_thread_mutex_consistent_ #define _di_f_thread_mutex_create_ -#define _di_f_thread_mutex_d_ #define _di_f_thread_mutex_delete_ #define _di_f_thread_mutex_full_delete_ #define _di_f_thread_mutex_full_t_ @@ -1712,6 +1719,10 @@ #define _di_f_thread_unlock_ #define _di_f_time_part_t_ #define _di_f_time_simple_t_ +#define _di_f_time_simples_t_ +#define _di_f_time_simpless_delete_callback_ +#define _di_f_time_simpless_destroy_callback_ +#define _di_f_time_simpless_t_ #define _di_f_time_spec_t_ #define _di_f_time_t_ #define _di_f_time_value_t_ @@ -2075,6 +2086,8 @@ //#define _di_fl_print_warning_s_ //#define _di_fll_error_file_flag_e_ //#define _di_fll_error_file_print_ +#define _di_fll_error_file_print_one_ +#define _di_fll_error_file_print_simple_ //#define _di_fll_error_file_type_directory_s_ //#define _di_fll_error_file_type_e_ //#define _di_fll_error_file_type_file_s_ diff --git a/build/stand_alone/fake.settings b/build/stand_alone/fake.settings index 7dde9bf..5ebd187 100644 --- a/build/stand_alone/fake.settings +++ b/build/stand_alone/fake.settings @@ -64,7 +64,7 @@ build_sources_program fll/level_0/rip.c fll/level_0/rip/utf.c fll/level_0/privat build_sources_program fll/level_0/signal.c build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c -build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c +build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/date.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/time.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c build_sources_program fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c diff --git a/build/stand_alone/utf8.config.h b/build/stand_alone/utf8.config.h index 9e12cb3..51c3655 100644 --- a/build/stand_alone/utf8.config.h +++ b/build/stand_alone/utf8.config.h @@ -212,7 +212,15 @@ //#define _di_f_conversion_number_unsigned_print_ //#define _di_f_conversion_number_unsigned_to_string_ #define _di_f_date_simple_t_ +#define _di_f_date_simples_t_ +#define _di_f_date_simpless_delete_callback_ +#define _di_f_date_simpless_destroy_callback_ +#define _di_f_date_simpless_t_ #define _di_f_date_t_ +#define _di_f_dates_t_ +#define _di_f_datess_delete_callback_ +#define _di_f_datess_destroy_callback_ +#define _di_f_datess_t_ #define _di_f_file_access_ #define _di_f_file_access_at_ #define _di_f_file_access_mode_d_ @@ -670,8 +678,8 @@ #define _di_f_statess_delete_callback_ #define _di_f_statess_destroy_callback_ #define _di_f_statess_t_ -//#define _di_f_status_e_ //#define _di_f_status_debug_d_ +//#define _di_f_status_e_ //#define _di_f_status_mask_d_ //#define _di_f_status_t_ #define _di_f_statuss_t_ @@ -1215,7 +1223,6 @@ #define _di_f_thread_mutex_attributess_t_ #define _di_f_thread_mutex_consistent_ #define _di_f_thread_mutex_create_ -#define _di_f_thread_mutex_d_ #define _di_f_thread_mutex_delete_ #define _di_f_thread_mutex_full_delete_ #define _di_f_thread_mutex_full_t_ @@ -1288,6 +1295,10 @@ #define _di_f_thread_unlock_ #define _di_f_time_part_t_ #define _di_f_time_simple_t_ +#define _di_f_time_simples_t_ +#define _di_f_time_simpless_delete_callback_ +#define _di_f_time_simpless_destroy_callback_ +#define _di_f_time_simpless_t_ #define _di_f_time_spec_t_ #define _di_f_time_t_ #define _di_f_time_value_t_ diff --git a/build/stand_alone/utf8.settings b/build/stand_alone/utf8.settings index 994f491..0f8e415 100644 --- a/build/stand_alone/utf8.settings +++ b/build/stand_alone/utf8.settings @@ -51,7 +51,7 @@ build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_ build_sources_program fll/level_0/signal.c build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c -build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c +build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/date.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/time.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c build_sources_program fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c diff --git a/level_0/f_type/c/type.h b/level_0/f_type/c/type.h index ba95175..f129275 100644 --- a/level_0/f_type/c/type.h +++ b/level_0/f_type/c/type.h @@ -28,7 +28,7 @@ // FLL-0 type includes. #include -#include +#include // Must be after number.h. #include #include #include @@ -38,6 +38,7 @@ #include #include #include +#include // Must be after time.h. #include #ifdef __cplusplus diff --git a/level_0/f_type/c/type/date.h b/level_0/f_type/c/type/date.h new file mode 100644 index 0000000..aefb423 --- /dev/null +++ b/level_0/f_type/c/type/date.h @@ -0,0 +1,291 @@ +/** + * FLL - Level 0 + * + * Project: Type + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Defines date type data. + * + * This is auto-included by type.h and should not need to be explicitly included. + */ +#ifndef _F_type_date_h +#define _F_type_date_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Hold a unit of Time along with a year to represent a date. + * + * This implementation of a date using the unit of Time is limited on the size of the year. + * The value for year is expected to be a signed number. + * For anything that needs a larger (or smaller) year, create a new type or use the "year string format" of Time. + * + * In "year string format" of Time, a Year may be prepended to the Time followed by a single colon ':' to associate a year with the Time. + * This Year has no minimum or maximum but may not have decimals. + * + * For example, "2020:86400000000000" would represent: January 02, 2020 0:00 UTC. + * For example, "2020:86.4 TT" would represent: January 02, 2020 0:00 UTC. + * + * Properties: + * - year: A number representing the year. + * - time: A number representing the time. + */ +#ifndef _di_f_date_t_ + typedef struct { + f_number_signed_t year; + f_time_t time; + } f_date_t; + + #define f_date_t_initialize { \ + .year = f_number_signed_t_initialize, \ + .time = f_time_t_initialize, \ + } + + #define macro_f_date_t_initialize_1(year_value, time_value) { \ + .year = year_value, \ + .time = time_value, \ + } + + #define macro_f_date_t_clear(date) { \ + date.year = 0; \ + date.time = 0; \ + } +#endif // _di_f_date_t_ + +/** + * An array of f_date_t. + * + * The macros are defined in type_array.h or type_array_file.h. + * + * Properties: + * - array: An array of f_date_t. + * - used: Total number of allocated spaces used. + * - size: Total amount of allocated space. + */ +#ifndef _di_f_dates_t_ + typedef struct { + f_date_t *array; + + f_number_unsigned_t used; + f_number_unsigned_t size; + } f_dates_t; + + #define f_dates_t_initialize { \ + .array = 0, \ + .used = 0, \ + .size = 0, \ + } + + #define macro_f_dates_t_initialize_1(array_value, used_value, size_value) { \ + .array = array_value, \ + .used = used_value, \ + .size = size_value, \ + } + + #define macro_f_dates_t_initialize_2(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = length_value, \ + } + + #define macro_f_dates_t_initialize_3(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = 0, \ + } + + #define macro_f_dates_t_clear(dates) { \ + dates.array = 0; \ + dates.used = 0; \ + dates.size = 0; \ + } +#endif // _di_f_dates_t_ + +/** + * An array of f_dates_t. + * + * The macros are defined in type_array.h or type_array_file.h. + * + * Properties: + * - array: The array of f_dates_t. + * - used: Total number of allocated spaces used. + * - size: Total amount of allocated space. + */ +#ifndef _di_f_datess_t_ + typedef struct { + f_dates_t *array; + + f_number_unsigned_t used; + f_number_unsigned_t size; + } f_datess_t; + + #define f_datess_t_initialize { \ + .array = 0, \ + .used = 0, \ + .size = 0, \ + } + + #define macro_f_datess_t_initialize_1(array_value, used_value, size_value) { \ + .array = array_value, \ + .used = used_value, \ + .size = size_value, \ + } + + #define macro_f_datess_t_initialize_2(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = length_value, \ + } + + #define macro_f_datess_t_initialize_3(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = 0, \ + } + + #define macro_f_datess_t_clear(datess) { \ + datess.array = 0; \ + datess.used = 0; \ + datess.size = 0; \ + } +#endif // _di_f_datess_t_ + +/** + * A variation of f_date_t that using f_time_simple_t rather than f_time_t. + * + * This can is a more precise alternative to f_date_t because it stores nanoseconds. + * + * The f_time_simple_t.time.seconds can be directly cast to the f_date_t.time. + * + * Properties: + * - year: A number representing the year. + * - time: A number representing the time with seconds and nanoseconds. + */ +#ifndef _di_f_date_simple_t_ + typedef struct { + f_time_t year; + f_time_simple_t time; + } f_date_simple_t; + + #define f_date_simple_t_initialize { \ + .year = f_time_t_initialize, \ + .time = f_time_simple_t_initialize, \ + } + + #define macro_f_date_simple_t_initialize_1(year_value, time_value) { \ + .year = year_value, \ + .time = time_value, \ + } + + #define macro_f_date_simple_t_clear(date_simple) { \ + date_simple.year = 0; \ + date_simple.time = 0; \ + } +#endif // _di_f_date_simple_t_ + +/** + * An array of f_date_simple_t. + * + * The macros are defined in type_array.h or type_array_file.h. + * + * Properties: + * - array: An array of f_date_simple_t. + * - used: Total number of allocated spaces used. + * - size: Total amount of allocated space. + */ +#ifndef _di_f_date_simples_t_ + typedef struct { + f_date_simple_t *array; + + f_number_unsigned_t used; + f_number_unsigned_t size; + } f_date_simples_t; + + #define f_date_simples_t_initialize { \ + .array = 0, \ + .used = 0, \ + .size = 0, \ + } + + #define macro_f_date_simples_t_initialize_1(array_value, used_value, size_value) { \ + .array = array_value, \ + .used = used_value, \ + .size = size_value, \ + } + + #define macro_f_date_simples_t_initialize_2(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = length_value, \ + } + + #define macro_f_date_simples_t_initialize_3(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = 0, \ + } + + #define macro_f_date_simples_t_clear(date_simples) { \ + date_simples.array = 0; \ + date_simples.used = 0; \ + date_simples.size = 0; \ + } +#endif // _di_f_date_simples_t_ + +/** + * An array of f_date_simples_t. + * + * The macros are defined in type_array.h or type_array_file.h. + * + * Properties: + * - array: The array of f_date_simples_t. + * - used: Total number of allocated spaces used. + * - size: Total amount of allocated space. + */ +#ifndef _di_f_date_simpless_t_ + typedef struct { + f_date_simples_t *array; + + f_number_unsigned_t used; + f_number_unsigned_t size; + } f_date_simpless_t; + + #define f_date_simpless_t_initialize { \ + .array = 0, \ + .used = 0, \ + .size = 0, \ + } + + #define macro_f_date_simpless_t_initialize_1(array_value, used_value, size_value) { \ + .array = array_value, \ + .used = used_value, \ + .size = size_value, \ + } + + #define macro_f_date_simpless_t_initialize_2(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = length_value, \ + } + + #define macro_f_date_simpless_t_initialize_3(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = 0, \ + } + + #define macro_f_date_simpless_t_clear(date_simpless) { \ + date_simpless.array = 0; \ + date_simpless.used = 0; \ + date_simpless.size = 0; \ + } +#endif // _di_f_date_simpless_t_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _F_type_date_h diff --git a/level_0/f_type/c/type/time.h b/level_0/f_type/c/type/time.h index fb8ae7e..2fc768e 100644 --- a/level_0/f_type/c/type/time.h +++ b/level_0/f_type/c/type/time.h @@ -110,76 +110,102 @@ extern "C" { #endif // _di_f_time_simple_t_ /** - * Hold a unit of Time along with a year to represent a date. + * An array of f_time_simple_t. * - * This implementation of a date using the unit of Time is limited on the size of the year. - * The value for year is expected to be a signed number. - * For anything that needs a larger (or smaller) year, create a new type or use the "year string format" of Time. - * - * In "year string format" of Time, a Year may be prepended to the Time followed by a single colon ':' to associate a year with the Time. - * This Year has no minimum or maximum but may not have decimals. - * - * For example, "2020:86400000000000" would represent: January 02, 2020 0:00 UTC. - * For example, "2020:86.4 TT" would represent: January 02, 2020 0:00 UTC. + * The macros are defined in type_array.h or type_array_file.h. * * Properties: - * - year: A number representing the year. - * - time: A number representing the time. + * - array: An array of f_time_simple_t. + * - used: Total number of allocated spaces used. + * - size: Total amount of allocated space. */ -#ifndef _di_f_date_t_ +#ifndef _di_f_time_simples_t_ typedef struct { - f_number_signed_t year; - f_time_t time; - } f_date_t; + f_time_simple_t *array; + + f_number_unsigned_t used; + f_number_unsigned_t size; + } f_time_simples_t; + + #define f_time_simples_t_initialize { \ + .array = 0, \ + .used = 0, \ + .size = 0, \ + } + + #define macro_f_time_simples_t_initialize_1(array_value, used_value, size_value) { \ + .array = array_value, \ + .used = used_value, \ + .size = size_value, \ + } - #define f_date_t_initialize { \ - .year = f_number_signed_t_initialize, \ - .time = f_time_t_initialize, \ + #define macro_f_time_simples_t_initialize_2(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = length_value, \ } - #define macro_f_date_t_initialize_1(year_value, time_value) { \ - .year = year_value, \ - .time = time_value, \ + #define macro_f_time_simples_t_initialize_3(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = 0, \ } - #define macro_f_date_t_clear(date) { \ - date.year = 0; \ - date.time = 0; \ + #define macro_f_time_simples_t_clear(time_simples) { \ + time_simples.array = 0; \ + time_simples.used = 0; \ + time_simples.size = 0; \ } -#endif // _di_f_date_t_ +#endif // _di_f_time_simples_t_ /** - * A variation of f_date_t that using f_time_simple_t rather than f_time_t. + * An array of f_time_simples_t. * - * This can is a more precise alternative to f_date_t because it stores nanoseconds. - * - * The f_time_simple_t.time.seconds can be directly cast to the f_date_t.time. + * The macros are defined in type_array.h or type_array_file.h. * * Properties: - * - year: A number representing the year. - * - time: A number representing the time with seconds and nanoseconds. + * - array: The array of f_time_simples_t. + * - used: Total number of allocated spaces used. + * - size: Total amount of allocated space. */ -#ifndef _di_f_date_simple_t_ +#ifndef _di_f_time_simpless_t_ typedef struct { - f_time_t year; - f_time_simple_t time; - } f_date_simple_t; + f_time_simples_t *array; + + f_number_unsigned_t used; + f_number_unsigned_t size; + } f_time_simpless_t; + + #define f_time_simpless_t_initialize { \ + .array = 0, \ + .used = 0, \ + .size = 0, \ + } + + #define macro_f_time_simpless_t_initialize_1(array_value, used_value, size_value) { \ + .array = array_value, \ + .used = used_value, \ + .size = size_value, \ + } - #define f_date_simple_t_initialize { \ - .year = f_time_t_initialize, \ - .time = f_time_simple_t_initialize, \ + #define macro_f_time_simpless_t_initialize_2(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = length_value, \ } - #define macro_f_date_simple_t_initialize_1(year_value, time_value) { \ - .year = year_value, \ - .time = time_value, \ + #define macro_f_time_simpless_t_initialize_3(array_value, length_value) { \ + .array = array_value, \ + .used = length_value, \ + .size = 0, \ } - #define macro_f_date_simple_t_clear(date_simple) { \ - date_simple.year = 0; \ - date_simple.time = 0; \ + #define macro_f_time_simpless_t_clear(time_simpless) { \ + time_simpless.array = 0; \ + time_simpless.used = 0; \ + time_simpless.size = 0; \ } -#endif // _di_f_date_simple_t_ +#endif // _di_f_time_simpless_t_ #ifdef __cplusplus } // extern "C" diff --git a/level_0/f_type/data/build/settings b/level_0/f_type/data/build/settings index 1eafa4b..0726b25 100644 --- a/level_0/f_type/data/build/settings +++ b/level_0/f_type/data/build/settings @@ -38,7 +38,7 @@ build_libraries_shared -lc build_libraries_static -l:libc.a -build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/pid.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h type/void.h +build_sources_headers type.h type/cell.h type/date.h type/file.h type/fll.h type/mode.h type/number.h type/pid.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h type/void.h build_script yes build_shared yes diff --git a/level_0/f_type_array/c/type_array.h b/level_0/f_type_array/c/type_array.h index baecd4a..5430056 100644 --- a/level_0/f_type_array/c/type_array.h +++ b/level_0/f_type_array/c/type_array.h @@ -20,6 +20,7 @@ // FLL-0 type_array includes. #include #include +#include #include #include #include @@ -40,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/level_0/f_type_array/c/type_array/date.c b/level_0/f_type_array/c/type_array/date.c new file mode 100644 index 0000000..6eff328 --- /dev/null +++ b/level_0/f_type_array/c/type_array/date.c @@ -0,0 +1,90 @@ +#include "../type_array.h" +#include "../type_array_file.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_datess_delete_callback_ + f_status_t f_datess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) { + + { + f_dates_t * const array = (f_dates_t *) void_array; + f_status_t status = F_okay; + + for (f_number_unsigned_t i = start; i < stop; ++i) { + + if (array[i].size && array[i].array) { + status = f_memory_array_resize(0, sizeof(f_date_t), (void **) &array[i].array, &array[i].used, &array[i].size); + if (F_status_is_error(status)) return status; + } + } // for + } + + return F_okay; + } +#endif // _di_f_datess_delete_callback_ + +#ifndef _di_f_datess_destroy_callback_ + f_status_t f_datess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) { + + { + f_dates_t * const array = (f_dates_t *) void_array; + f_status_t status = F_okay; + + for (f_number_unsigned_t i = start; i < stop; ++i) { + + if (array[i].size && array[i].array) { + status = f_memory_array_adjust(0, sizeof(f_date_t), (void **) &array[i].array, &array[i].used, &array[i].size); + if (F_status_is_error(status)) return status; + } + } // for + } + + return F_okay; + } +#endif // _di_f_datess_destroy_callback_ + +#ifndef _di_f_date_simpless_delete_callback_ + f_status_t f_date_simpless_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) { + + { + f_date_simples_t * const array = (f_date_simples_t *) void_array; + f_status_t status = F_okay; + + for (f_number_unsigned_t i = start; i < stop; ++i) { + + if (array[i].size && array[i].array) { + status = f_memory_array_resize(0, sizeof(f_date_simple_t), (void **) &array[i].array, &array[i].used, &array[i].size); + if (F_status_is_error(status)) return status; + } + } // for + } + + return F_okay; + } +#endif // _di_f_date_simpless_delete_callback_ + +#ifndef _di_f_date_simpless_destroy_callback_ + f_status_t f_date_simpless_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) { + + { + f_date_simples_t * const array = (f_date_simples_t *) void_array; + f_status_t status = F_okay; + + for (f_number_unsigned_t i = start; i < stop; ++i) { + + if (array[i].size && array[i].array) { + status = f_memory_array_adjust(0, sizeof(f_date_simple_t), (void **) &array[i].array, &array[i].used, &array[i].size); + if (F_status_is_error(status)) return status; + } + } // for + } + + return F_okay; + } +#endif // _di_f_date_simpless_destroy_callback_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_type_array/c/type_array/date.h b/level_0/f_type_array/c/type_array/date.h new file mode 100644 index 0000000..ac85aeb --- /dev/null +++ b/level_0/f_type_array/c/type_array/date.h @@ -0,0 +1,143 @@ +/** + * FLL - Level 0 + * + * Project: Type + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Defines data to be used for/by type (array) related functionality. + * + * This is auto-included by type_array.h and should not need to be explicitly included. + */ +#ifndef _F_type_array_date_h +#define _F_type_array_date_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * A callback intended to be passed to f_memory_arrays_resize() for an f_datess_t structure. + * + * This is only called when shrinking the array and generally should perform deallocations. + * + * This does not do parameter checking. + * + * @param start + * The inclusive start position in the array to start deleting. + * @param stop + * The exclusive stop position in the array to stop deleting. + * @param array + * The array structure to delete all values of. + * + * Must not be NULL. + * + * @return + * F_okay on success. + * + * F_parameter (with error bit) if a parameter is invalid. + * + * Errors (with error bit) from: f_memory_array_resize(). + * + * @see f_memory_array_resize() + * @see f_memory_arrays_resize() + */ +#ifndef _di_f_datess_delete_callback_ + extern f_status_t f_datess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array); +#endif // _di_f_datess_delete_callback_ + +/** + * A callback intended to be passed to f_memory_arrays_adjust() for an f_datess_t structure. + * + * This is only called when shrinking the array and generally should perform deallocations. + * + * This does not do parameter checking. + * + * @param start + * The inclusive start position in the array to start deleting. + * @param stop + * The exclusive stop position in the array to stop deleting. + * @param array + * The array structure to delete all values of. + * + * Must not be NULL. + * + * @return + * F_okay on success. + * + * F_parameter (with error bit) if a parameter is invalid. + * + * Errors (with error bit) from: f_memory_array_adjust(). + * + * @see f_memory_array_adjust() + * @see f_memory_arrays_adjust() + */ +#ifndef _di_f_datess_destroy_callback_ + extern f_status_t f_datess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array); +#endif // _di_f_datess_destroy_callback_ + +/** + * A callback intended to be passed to f_memory_arrays_resize() for an f_date_simpless_t structure. + * + * This is only called when shrinking the array and generally should perform deallocations. + * + * This does not do parameter checking. + * + * @param start + * The inclusive start position in the array to start deleting. + * @param stop + * The exclusive stop position in the array to stop deleting. + * @param array + * The array structure to delete all values of. + * + * Must not be NULL. + * + * @return + * F_okay on success. + * + * F_parameter (with error bit) if a parameter is invalid. + * + * Errors (with error bit) from: f_memory_array_resize(). + * + * @see f_memory_array_resize() + * @see f_memory_arrays_resize() + */ +#ifndef _di_f_date_simpless_delete_callback_ + extern f_status_t f_date_simpless_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array); +#endif // _di_f_date_simpless_delete_callback_ + +/** + * A callback intended to be passed to f_memory_arrays_adjust() for an f_date_simpless_t structure. + * + * This is only called when shrinking the array and generally should perform deallocations. + * + * This does not do parameter checking. + * + * @param start + * The inclusive start position in the array to start deleting. + * @param stop + * The exclusive stop position in the array to stop deleting. + * @param array + * The array structure to delete all values of. + * + * Must not be NULL. + * + * @return + * F_okay on success. + * + * F_parameter (with error bit) if a parameter is invalid. + * + * Errors (with error bit) from: f_memory_array_adjust(). + * + * @see f_memory_array_adjust() + * @see f_memory_arrays_adjust() + */ +#ifndef _di_f_date_simpless_destroy_callback_ + extern f_status_t f_date_simpless_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array); +#endif // _di_f_date_simpless_destroy_callback_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _F_type_array_date_h diff --git a/level_0/f_type_array/c/type_array/time.c b/level_0/f_type_array/c/type_array/time.c new file mode 100644 index 0000000..6a3fc1f --- /dev/null +++ b/level_0/f_type_array/c/type_array/time.c @@ -0,0 +1,50 @@ +#include "../type_array.h" +#include "../type_array_file.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_f_time_simpless_delete_callback_ + f_status_t f_time_simpless_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) { + + { + f_time_simples_t * const array = (f_time_simples_t *) void_array; + f_status_t status = F_okay; + + for (f_number_unsigned_t i = start; i < stop; ++i) { + + if (array[i].size && array[i].array) { + status = f_memory_array_resize(0, sizeof(f_time_simple_t), (void **) &array[i].array, &array[i].used, &array[i].size); + if (F_status_is_error(status)) return status; + } + } // for + } + + return F_okay; + } +#endif // _di_f_time_simpless_delete_callback_ + +#ifndef _di_f_time_simpless_destroy_callback_ + f_status_t f_time_simpless_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) { + + { + f_time_simples_t * const array = (f_time_simples_t *) void_array; + f_status_t status = F_okay; + + for (f_number_unsigned_t i = start; i < stop; ++i) { + + if (array[i].size && array[i].array) { + status = f_memory_array_adjust(0, sizeof(f_time_simple_t), (void **) &array[i].array, &array[i].used, &array[i].size); + if (F_status_is_error(status)) return status; + } + } // for + } + + return F_okay; + } +#endif // _di_f_time_simpless_destroy_callback_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_type_array/c/type_array/time.h b/level_0/f_type_array/c/type_array/time.h new file mode 100644 index 0000000..c83756d --- /dev/null +++ b/level_0/f_type_array/c/type_array/time.h @@ -0,0 +1,83 @@ +/** + * FLL - Level 0 + * + * Project: Type + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Defines data to be used for/by type (array) related functionality. + * + * This is auto-included by type_array.h and should not need to be explicitly included. + */ +#ifndef _F_type_array_time_h +#define _F_type_array_time_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * A callback intended to be passed to f_memory_arrays_resize() for an f_time_simpless_t structure. + * + * This is only called when shrinking the array and generally should perform deallocations. + * + * This does not do parameter checking. + * + * @param start + * The inclusive start position in the array to start deleting. + * @param stop + * The exclusive stop position in the array to stop deleting. + * @param array + * The array structure to delete all values of. + * + * Must not be NULL. + * + * @return + * F_okay on success. + * + * F_parameter (with error bit) if a parameter is invalid. + * + * Errors (with error bit) from: f_memory_array_resize(). + * + * @see f_memory_array_resize() + * @see f_memory_arrays_resize() + */ +#ifndef _di_f_time_simpless_delete_callback_ + extern f_status_t f_time_simpless_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array); +#endif // _di_f_time_simpless_delete_callback_ + +/** + * A callback intended to be passed to f_memory_arrays_adjust() for an f_time_simpless_t structure. + * + * This is only called when shrinking the array and generally should perform deallocations. + * + * This does not do parameter checking. + * + * @param start + * The inclusive start position in the array to start deleting. + * @param stop + * The exclusive stop position in the array to stop deleting. + * @param array + * The array structure to delete all values of. + * + * Must not be NULL. + * + * @return + * F_okay on success. + * + * F_parameter (with error bit) if a parameter is invalid. + * + * Errors (with error bit) from: f_memory_array_adjust(). + * + * @see f_memory_array_adjust() + * @see f_memory_arrays_adjust() + */ +#ifndef _di_f_time_simpless_destroy_callback_ + extern f_status_t f_time_simpless_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array); +#endif // _di_f_time_simpless_destroy_callback_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _F_type_array_time_h diff --git a/level_0/f_type_array/data/build/settings b/level_0/f_type_array/data/build/settings index a873bf7..aa44b65 100644 --- a/level_0/f_type_array/data/build/settings +++ b/level_0/f_type_array/data/build/settings @@ -40,9 +40,9 @@ build_libraries_shared-individual -lf_memory build_libraries_static -l:libc.a build_libraries_static-individual -l:libf_memory.a -build_sources_library type_array/cell.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c +build_sources_library type_array/cell.c type_array/date.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/time.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c -build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h +build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/date.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/time.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h build_script yes build_shared yes diff --git a/level_0/f_type_array/data/build/settings-mocks b/level_0/f_type_array/data/build/settings-mocks index 95567a0..9ca70b5 100644 --- a/level_0/f_type_array/data/build/settings-mocks +++ b/level_0/f_type_array/data/build/settings-mocks @@ -30,10 +30,10 @@ build_language c build_libraries -lc build_libraries-individual -lf_memory -build_sources_library type_array/cell.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c +build_sources_library type_array/cell.c type_array/date.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/time.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c build_sources_library ../../tests/unit/c/mock-type_array.c -build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h +build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/date.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/time.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h build_script yes build_shared yes diff --git a/level_0/f_type_array/data/build/settings-tests b/level_0/f_type_array/data/build/settings-tests index eb7c558..43b4ad3 100644 --- a/level_0/f_type_array/data/build/settings-tests +++ b/level_0/f_type_array/data/build/settings-tests @@ -24,6 +24,8 @@ build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_type_array build_sources_program test-type_array-cellss_delete_callback.c test-type_array-cellss_destroy_callback.c +build_sources_program test-type_array-date_simpless_delete_callback.c test-type_array-date_simpless_destroy_callback.c +build_sources_program test-type_array-datess_delete_callback.c test-type_array-datess_destroy_callback.c build_sources_program test-type_array-filess_delete_callback.c test-type_array-filess_destroy_callback.c build_sources_program test-type_array-fll_idss_delete_callback.c test-type_array-fll_idss_destroy_callback.c build_sources_program test-type_array-int8ss_delete_callback.c test-type_array-int8ss_destroy_callback.c @@ -43,6 +45,7 @@ build_sources_program test-type_array-range_doubles_append.c test-type_array-ran build_sources_program test-type_array-range_doubless_delete_callback.c test-type_array-range_doubless_destroy_callback.c build_sources_program test-type_array-statess_delete_callback.c test-type_array-statess_destroy_callback.c build_sources_program test-type_array-statusss_delete_callback.c test-type_array-statusss_destroy_callback.c +build_sources_program test-type_array-time_simpless_delete_callback.c test-type_array-time_simpless_destroy_callback.c build_sources_program test-type_array-uint8ss_delete_callback.c test-type_array-uint8ss_destroy_callback.c build_sources_program test-type_array-uint16ss_delete_callback.c test-type_array-uint16ss_destroy_callback.c build_sources_program test-type_array-uint32ss_delete_callback.c test-type_array-uint32ss_destroy_callback.c diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.c new file mode 100644 index 0000000..460c2bc --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.c @@ -0,0 +1,57 @@ +#include "test-type_array.h" +#include "test-type_array-date_simpless_delete_callback.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void test__f_type_array_date_simpless_delete_callback__fails(void **state) { + + mock_unwrap = 0; + mock_unwrap_f_memory = 0; + + f_date_simple_t data = f_date_simple_t_initialize; + f_date_simple_t data_array[] = { data }; + f_date_simples_t datas = { .array = data_array, .used = 1, .size = 1 }; + f_date_simples_t datas_array[] = { datas }; + + { + will_return(__wrap_f_memory_array_resize, true); + will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure)); + + const f_status_t status = f_date_simpless_delete_callback(0, 1, (void *) datas_array); + + assert_int_equal(status, F_status_set_error(F_failure)); + } +} + +void test__f_type_array_date_simpless_delete_callback__works(void **state) { + + mock_unwrap = 1; + mock_unwrap_f_memory = 1; + + const f_number_unsigned_t length = 1; + + f_date_simpless_t datass = f_date_simpless_t_initialize; + + { + f_status_t status = f_memory_array_resize(length, sizeof(f_date_simples_t), (void **) &datass.array, &datass.used, &datass.size); + assert_int_equal(status, F_okay); + + status = f_memory_array_resize(1, sizeof(f_date_simple_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size); + assert_int_equal(status, F_okay); + } + + { + const f_status_t status = f_date_simpless_delete_callback(0, length, (void *) datass.array); + + assert_int_equal(status, F_okay); + assert_int_equal(datass.array[0].size, 0); + } + + free((void *) datass.array); +} + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.h new file mode 100644 index 0000000..73ce306 --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.h @@ -0,0 +1,27 @@ +/** + * FLL - Level 0 + * + * Project: Type + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Test the array types in the type project. + */ +#ifndef _TEST__F_type_array__date_simpless_delete_callback +#define _TEST__F_type_array__date_simpless_delete_callback + +/** + * Test that the function fails. + * + * @see f_date_simpless_delete_callback() + */ +extern void test__f_type_array_date_simpless_delete_callback__fails(void **state); + +/** + * Test that the function works. + * + * @see f_date_simpless_delete_callback() + */ +extern void test__f_type_array_date_simpless_delete_callback__works(void **state); + +#endif // _TEST__F_type_array__date_simpless_delete_callback diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.c new file mode 100644 index 0000000..738ca4d --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.c @@ -0,0 +1,57 @@ +#include "test-type_array.h" +#include "test-type_array-date_simpless_destroy_callback.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void test__f_type_array_date_simpless_destroy_callback__fails(void **state) { + + mock_unwrap = 0; + mock_unwrap_f_memory = 0; + + f_date_simple_t data = f_date_simple_t_initialize; + f_date_simple_t data_array[] = { data }; + f_date_simples_t datas = { .array = data_array, .used = 1, .size = 1 }; + f_date_simples_t datas_array[] = { datas }; + + { + will_return(__wrap_f_memory_array_adjust, true); + will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure)); + + const f_status_t status = f_date_simpless_destroy_callback(0, 1, (void *) datas_array); + + assert_int_equal(status, F_status_set_error(F_failure)); + } +} + +void test__f_type_array_date_simpless_destroy_callback__works(void **state) { + + mock_unwrap = 1; + mock_unwrap_f_memory = 1; + + const f_number_unsigned_t length = 1; + + f_date_simpless_t datass = f_date_simpless_t_initialize; + + { + f_status_t status = f_memory_array_adjust(length, sizeof(f_date_simples_t), (void **) &datass.array, &datass.used, &datass.size); + assert_int_equal(status, F_okay); + + status = f_memory_array_adjust(1, sizeof(f_date_simple_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size); + assert_int_equal(status, F_okay); + } + + { + const f_status_t status = f_date_simpless_destroy_callback(0, length, (void *) datass.array); + + assert_int_equal(status, F_okay); + assert_int_equal(datass.array[0].size, 0); + } + + free((void *) datass.array); +} + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.h new file mode 100644 index 0000000..d712f6b --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.h @@ -0,0 +1,27 @@ +/** + * FLL - Level 0 + * + * Project: Type + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Test the array types in the type project. + */ +#ifndef _TEST__F_type_array__date_simpless_destroy_callback +#define _TEST__F_type_array__date_simpless_destroy_callback + +/** + * Test that the function fails. + * + * @see f_date_simpless_destroy_callback() + */ +extern void test__f_type_array_date_simpless_destroy_callback__fails(void **state); + +/** + * Test that the function works. + * + * @see f_date_simpless_destroy_callback() + */ +extern void test__f_type_array_date_simpless_destroy_callback__works(void **state); + +#endif // _TEST__F_type_array__date_simpless_destroy_callback diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.c new file mode 100644 index 0000000..2973642 --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.c @@ -0,0 +1,57 @@ +#include "test-type_array.h" +#include "test-type_array-datess_delete_callback.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void test__f_type_array_datess_delete_callback__fails(void **state) { + + mock_unwrap = 0; + mock_unwrap_f_memory = 0; + + f_date_t data = f_date_t_initialize; + f_date_t data_array[] = { data }; + f_dates_t datas = { .array = data_array, .used = 1, .size = 1 }; + f_dates_t datas_array[] = { datas }; + + { + will_return(__wrap_f_memory_array_resize, true); + will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure)); + + const f_status_t status = f_datess_delete_callback(0, 1, (void *) datas_array); + + assert_int_equal(status, F_status_set_error(F_failure)); + } +} + +void test__f_type_array_datess_delete_callback__works(void **state) { + + mock_unwrap = 1; + mock_unwrap_f_memory = 1; + + const f_number_unsigned_t length = 1; + + f_datess_t datass = f_datess_t_initialize; + + { + f_status_t status = f_memory_array_resize(length, sizeof(f_dates_t), (void **) &datass.array, &datass.used, &datass.size); + assert_int_equal(status, F_okay); + + status = f_memory_array_resize(1, sizeof(f_date_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size); + assert_int_equal(status, F_okay); + } + + { + const f_status_t status = f_datess_delete_callback(0, length, (void *) datass.array); + + assert_int_equal(status, F_okay); + assert_int_equal(datass.array[0].size, 0); + } + + free((void *) datass.array); +} + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.h new file mode 100644 index 0000000..ce30b22 --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.h @@ -0,0 +1,27 @@ +/** + * FLL - Level 0 + * + * Project: Type + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Test the array types in the type project. + */ +#ifndef _TEST__F_type_array__datess_delete_callback +#define _TEST__F_type_array__datess_delete_callback + +/** + * Test that the function fails. + * + * @see f_datess_delete_callback() + */ +extern void test__f_type_array_datess_delete_callback__fails(void **state); + +/** + * Test that the function works. + * + * @see f_datess_delete_callback() + */ +extern void test__f_type_array_datess_delete_callback__works(void **state); + +#endif // _TEST__F_type_array__datess_delete_callback diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.c new file mode 100644 index 0000000..5e73a0d --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.c @@ -0,0 +1,57 @@ +#include "test-type_array.h" +#include "test-type_array-datess_destroy_callback.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void test__f_type_array_datess_destroy_callback__fails(void **state) { + + mock_unwrap = 0; + mock_unwrap_f_memory = 0; + + f_date_t data = f_date_t_initialize; + f_date_t data_array[] = { data }; + f_dates_t datas = { .array = data_array, .used = 1, .size = 1 }; + f_dates_t datas_array[] = { datas }; + + { + will_return(__wrap_f_memory_array_adjust, true); + will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure)); + + const f_status_t status = f_datess_destroy_callback(0, 1, (void *) datas_array); + + assert_int_equal(status, F_status_set_error(F_failure)); + } +} + +void test__f_type_array_datess_destroy_callback__works(void **state) { + + mock_unwrap = 1; + mock_unwrap_f_memory = 1; + + const f_number_unsigned_t length = 1; + + f_datess_t datass = f_datess_t_initialize; + + { + f_status_t status = f_memory_array_adjust(length, sizeof(f_dates_t), (void **) &datass.array, &datass.used, &datass.size); + assert_int_equal(status, F_okay); + + status = f_memory_array_adjust(1, sizeof(f_date_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size); + assert_int_equal(status, F_okay); + } + + { + const f_status_t status = f_datess_destroy_callback(0, length, (void *) datass.array); + + assert_int_equal(status, F_okay); + assert_int_equal(datass.array[0].size, 0); + } + + free((void *) datass.array); +} + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.h new file mode 100644 index 0000000..1b795b8 --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.h @@ -0,0 +1,27 @@ +/** + * FLL - Level 0 + * + * Project: Type + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Test the array types in the type project. + */ +#ifndef _TEST__F_type_array__datess_destroy_callback +#define _TEST__F_type_array__datess_destroy_callback + +/** + * Test that the function fails. + * + * @see f_datess_destroy_callback() + */ +extern void test__f_type_array_datess_destroy_callback__fails(void **state); + +/** + * Test that the function works. + * + * @see f_datess_destroy_callback() + */ +extern void test__f_type_array_datess_destroy_callback__works(void **state); + +#endif // _TEST__F_type_array__datess_destroy_callback diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.c new file mode 100644 index 0000000..da96932 --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.c @@ -0,0 +1,57 @@ +#include "test-type_array.h" +#include "test-type_array-time_simpless_delete_callback.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void test__f_type_array_time_simpless_delete_callback__fails(void **state) { + + mock_unwrap = 0; + mock_unwrap_f_memory = 0; + + f_time_simple_t data = f_time_simple_t_initialize; + f_time_simple_t data_array[] = { data }; + f_time_simples_t datas = { .array = data_array, .used = 1, .size = 1 }; + f_time_simples_t datas_array[] = { datas }; + + { + will_return(__wrap_f_memory_array_resize, true); + will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure)); + + const f_status_t status = f_time_simpless_delete_callback(0, 1, (void *) datas_array); + + assert_int_equal(status, F_status_set_error(F_failure)); + } +} + +void test__f_type_array_time_simpless_delete_callback__works(void **state) { + + mock_unwrap = 1; + mock_unwrap_f_memory = 1; + + const f_number_unsigned_t length = 1; + + f_time_simpless_t datass = f_time_simpless_t_initialize; + + { + f_status_t status = f_memory_array_resize(length, sizeof(f_time_simples_t), (void **) &datass.array, &datass.used, &datass.size); + assert_int_equal(status, F_okay); + + status = f_memory_array_resize(1, sizeof(f_time_simple_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size); + assert_int_equal(status, F_okay); + } + + { + const f_status_t status = f_time_simpless_delete_callback(0, length, (void *) datass.array); + + assert_int_equal(status, F_okay); + assert_int_equal(datass.array[0].size, 0); + } + + free((void *) datass.array); +} + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.h new file mode 100644 index 0000000..53dc5c0 --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.h @@ -0,0 +1,27 @@ +/** + * FLL - Level 0 + * + * Project: Type + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Test the array types in the type project. + */ +#ifndef _TEST__F_type_array__time_simpless_delete_callback +#define _TEST__F_type_array__time_simpless_delete_callback + +/** + * Test that the function fails. + * + * @see f_time_simpless_delete_callback() + */ +extern void test__f_type_array_time_simpless_delete_callback__fails(void **state); + +/** + * Test that the function works. + * + * @see f_time_simpless_delete_callback() + */ +extern void test__f_type_array_time_simpless_delete_callback__works(void **state); + +#endif // _TEST__F_type_array__time_simpless_delete_callback diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.c new file mode 100644 index 0000000..17d55d8 --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.c @@ -0,0 +1,57 @@ +#include "test-type_array.h" +#include "test-type_array-time_simpless_destroy_callback.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void test__f_type_array_time_simpless_destroy_callback__fails(void **state) { + + mock_unwrap = 0; + mock_unwrap_f_memory = 0; + + f_time_simple_t data = f_time_simple_t_initialize; + f_time_simple_t data_array[] = { data }; + f_time_simples_t datas = { .array = data_array, .used = 1, .size = 1 }; + f_time_simples_t datas_array[] = { datas }; + + { + will_return(__wrap_f_memory_array_adjust, true); + will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure)); + + const f_status_t status = f_time_simpless_destroy_callback(0, 1, (void *) datas_array); + + assert_int_equal(status, F_status_set_error(F_failure)); + } +} + +void test__f_type_array_time_simpless_destroy_callback__works(void **state) { + + mock_unwrap = 1; + mock_unwrap_f_memory = 1; + + const f_number_unsigned_t length = 1; + + f_time_simpless_t datass = f_time_simpless_t_initialize; + + { + f_status_t status = f_memory_array_adjust(length, sizeof(f_time_simples_t), (void **) &datass.array, &datass.used, &datass.size); + assert_int_equal(status, F_okay); + + status = f_memory_array_adjust(1, sizeof(f_time_simple_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size); + assert_int_equal(status, F_okay); + } + + { + const f_status_t status = f_time_simpless_destroy_callback(0, length, (void *) datass.array); + + assert_int_equal(status, F_okay); + assert_int_equal(datass.array[0].size, 0); + } + + free((void *) datass.array); +} + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.h new file mode 100644 index 0000000..db28716 --- /dev/null +++ b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.h @@ -0,0 +1,27 @@ +/** + * FLL - Level 0 + * + * Project: Type + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Test the array types in the type project. + */ +#ifndef _TEST__F_type_array__time_simpless_destroy_callback +#define _TEST__F_type_array__time_simpless_destroy_callback + +/** + * Test that the function fails. + * + * @see f_time_simpless_destroy_callback() + */ +extern void test__f_type_array_time_simpless_destroy_callback__fails(void **state); + +/** + * Test that the function works. + * + * @see f_time_simpless_destroy_callback() + */ +extern void test__f_type_array_time_simpless_destroy_callback__works(void **state); + +#endif // _TEST__F_type_array__time_simpless_destroy_callback diff --git a/level_0/f_type_array/tests/unit/c/test-type_array.c b/level_0/f_type_array/tests/unit/c/test-type_array.c index e1b0ebc..3dbf9f4 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array.c @@ -23,6 +23,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_cellss_destroy_callback__fails), cmocka_unit_test(test__f_type_array_cellss_destroy_callback__works), + cmocka_unit_test(test__f_type_array_date_simpless_delete_callback__fails), + cmocka_unit_test(test__f_type_array_date_simpless_delete_callback__works), + + cmocka_unit_test(test__f_type_array_datess_delete_callback__fails), + cmocka_unit_test(test__f_type_array_datess_delete_callback__works), + cmocka_unit_test(test__f_type_array_filess_delete_callback__fails), cmocka_unit_test(test__f_type_array_filess_delete_callback__works), @@ -126,6 +132,9 @@ int main(void) { cmocka_unit_test(test__f_type_array_statusss_destroy_callback__fails), cmocka_unit_test(test__f_type_array_statusss_destroy_callback__works), + cmocka_unit_test(test__f_type_array_time_simpless_delete_callback__fails), + cmocka_unit_test(test__f_type_array_time_simpless_delete_callback__works), + cmocka_unit_test(test__f_type_array_uint8ss_delete_callback__fails), cmocka_unit_test(test__f_type_array_uint8ss_delete_callback__works), @@ -160,6 +169,12 @@ int main(void) { // f_cellss_destroy_callback() doesn't use parameter checking. // f_cellss_delete_callback() doesn't use parameter checking. + // f_date_simpless_destroy_callback() doesn't use parameter checking. + // f_date_simpless_delete_callback() doesn't use parameter checking. + + // f_datess_destroy_callback() doesn't use parameter checking. + // f_datess_delete_callback() doesn't use parameter checking. + // f_filess_destroy_callback() doesn't use parameter checking. // f_filess_delete_callback() doesn't use parameter checking. @@ -215,6 +230,9 @@ int main(void) { // f_statusss_destroy_callback() doesn't use parameter checking. // f_statusss_delete_callback() doesn't use parameter checking. + // f_time_simpless_destroy_callback() doesn't use parameter checking. + // f_time_simpless_delete_callback() doesn't use parameter checking. + // f_uint8ss_destroy_callback() doesn't use parameter checking. // f_uint8ss_delete_callback() doesn't use parameter checking. diff --git a/level_0/f_type_array/tests/unit/c/test-type_array.h b/level_0/f_type_array/tests/unit/c/test-type_array.h index 4ad3707..338089a 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array.h @@ -32,6 +32,10 @@ // Test includes. #include "test-type_array-cellss_delete_callback.h" #include "test-type_array-cellss_destroy_callback.h" +#include "test-type_array-date_simpless_delete_callback.h" +#include "test-type_array-date_simpless_destroy_callback.h" +#include "test-type_array-datess_delete_callback.h" +#include "test-type_array-datess_destroy_callback.h" #include "test-type_array-filess_delete_callback.h" #include "test-type_array-filess_destroy_callback.h" #include "test-type_array-fll_idss_delete_callback.h" @@ -70,6 +74,8 @@ #include "test-type_array-statess_destroy_callback.h" #include "test-type_array-statusss_delete_callback.h" #include "test-type_array-statusss_destroy_callback.h" +#include "test-type_array-time_simpless_delete_callback.h" +#include "test-type_array-time_simpless_destroy_callback.h" #include "test-type_array-uint8ss_delete_callback.h" #include "test-type_array-uint8ss_destroy_callback.h" #include "test-type_array-uint16ss_delete_callback.h" -- 1.8.3.1