This wraps up the simple memory append all functions with added unit tests.
I anticipate that I need to do the more complex ones as well.
This adds the adjust and resize callbacks for use in more complex memory functions.
The more complex memory functions for adjust and resize are implemented with unit tests.
The unit tests for the type array callbacks are incomplete because I did not get time to finish writing them.
Those unit tests are written but are incomplete and do not yet work.
build_sources_library fss/private-item.c fss/private-named.c fss/private-nest.c fss/private-set.c fss/private-set_quote.c fss/private-simple_packet.c
build_sources_library iki.c iki/common.c iki/data.c private-iki.c iki/private-data.c
build_sources_library limit.c limit/set.c limit/value.c limit/private-set.c limit/private-value.c
-build_sources_library memory.c memory/array.c
+build_sources_library memory.c memory/array.c memory/arrays.c
build_sources_library private-memory.c memory/private-array.c
build_sources_library network.c
build_sources_library parse.c parse/utf.c
build_sources_library status_string.c
build_sources_library string.c
build_sources_library private-string.c string/common.c
-build_sources_library string/private-dynamic.c string/private-dynamics.c string/private-dynamicss.c
+build_sources_library string/private-dynamics.c string/private-dynamicss.c
build_sources_library string/private-maps.c string/private-mapss.c
build_sources_library string/private-map_multis.c string/private-map_multiss.c
build_sources_library string/private-quantitys.c string/private-quantityss.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_unsigned.c type_array/poll.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/private-cell.c type_array/private-file.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-poll.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c
+build_sources_library type_array/private-poll.c type_array/private-state.c type_array/private-status.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
build_sources_headers fss.h fss/common.h fss/item.h fss/named.h fss/nest.h fss/quote.h fss/set.h fss/set_quote.h fss/simple_packet.h
build_sources_headers iki.h iki/common.h iki/data.h
build_sources_headers limit.h limit/set.h limit/value.h
-build_sources_headers memory.h memory/array.h memory/common.h
+build_sources_headers memory.h memory/array.h memory/arrays.h memory/common.h
build_sources_headers network.h network/common.h
build_sources_headers parse.h parse/utf.h
build_sources_headers path.h path/common.h
build_sources_library level_0/fss/private-item.c level_0/fss/private-named.c level_0/fss/private-nest.c level_0/fss/private-set.c level_0/fss/private-set_quote.c level_0/fss/private-simple_packet.c
build_sources_library level_0/iki.c level_0/iki/common.c level_0/iki/data.c level_0/private-iki.c level_0/iki/private-data.c
build_sources_library level_0/limit.c level_0/limit/set.c level_0/limit/value.c level_0/limit/private-set.c level_0/limit/private-value.c
-build_sources_library level_0/memory.c level_0/memory/array.c
+build_sources_library level_0/memory.c level_0/memory/array.c level_0/memory/arrays.c
build_sources_library level_0/private-memory.c level_0/memory/private-array.c
build_sources_library level_0/network.c
build_sources_library level_0/parse.c level_0/parse/utf.c
build_sources_library level_0/status_string.c
build_sources_library level_0/string.c
build_sources_library level_0/private-string.c level_0/string/common.c
-build_sources_library level_0/string/private-dynamic.c level_0/string/private-dynamics.c level_0/string/private-dynamicss.c
+build_sources_library level_0/string/private-dynamics.c level_0/string/private-dynamicss.c
build_sources_library level_0/string/private-maps.c level_0/string/private-mapss.c
build_sources_library level_0/string/private-map_multis.c level_0/string/private-map_multiss.c
build_sources_library level_0/string/private-quantitys.c level_0/string/private-quantityss.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_unsigned.c level_0/type_array/poll.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/private-cell.c level_0/type_array/private-file.c level_0/type_array/private-fll_id.c level_0/type_array/private-int8.c level_0/type_array/private-int16.c level_0/type_array/private-int32.c level_0/type_array/private-int64.c level_0/type_array/private-int128.c level_0/type_array/private-poll.c level_0/type_array/private-state.c level_0/type_array/private-status.c level_0/type_array/private-uint8.c level_0/type_array/private-uint16.c level_0/type_array/private-uint32.c level_0/type_array/private-uint64.c level_0/type_array/private-uint128.c
+build_sources_library level_0/type_array/private-poll.c level_0/type_array/private-state.c level_0/type_array/private-status.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
build_sources_headers level_0/fss.h level_0/fss/common.h level_0/fss/item.h level_0/fss/named.h level_0/fss/nest.h level_0/fss/quote.h level_0/fss/set.h level_0/fss/set_quote.h level_0/fss/simple_packet.h
build_sources_headers level_0/iki.h level_0/iki/common.h level_0/iki/data.h
build_sources_headers level_0/limit.h level_0/limit/set.h level_0/limit/value.h
-build_sources_headers level_0/memory.h level_0/memory/array.h level_0/memory/common.h
+build_sources_headers level_0/memory.h level_0/memory/array.h level_0/memory/arrays.h level_0/memory/common.h
build_sources_headers level_0/network.h level_0/network/common.h
build_sources_headers level_0/parse.h level_0/parse/utf.h
build_sources_headers level_0/path.h level_0/path/common.h
build_sources_program fll/level_0/pipe.c
build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
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 fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/private-dynamic.c fll/level_0/string/private-map.c fll/level_0/string/private-map_multi.c fll/level_0/string/private-quantity.c fll/level_0/string/private-range.c fll/level_0/string/private-triple.c fll/level_0/string/quantity.c fll/level_0/string/range.c fll/level_0/string/static.c fll/level_0/string/triple.c
+build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/private-map.c fll/level_0/string/private-map_multi.c fll/level_0/string/private-quantity.c fll/level_0/string/private-range.c fll/level_0/string/private-triple.c fll/level_0/string/quantity.c fll/level_0/string/range.c fll/level_0/string/static.c fll/level_0/string/triple.c
build_sources_program fll/level_0/type_array/cell.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_unsigned.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/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-uint128.c
+build_sources_program fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.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/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/map_multi.c fll/level_0/utf/static.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/private-dynamic.c fll/level_0/utf/private-map.c fll/level_0/utf/private-map_multi.c fll/level_0/utf/private-triple.c fll/level_0/utf/private-string.c
build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
build_sources_program fll/level_0/rip.c fll/level_0/rip/utf.c fll/level_0/private-rip.c fll/level_0/rip/private-utf.c
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 fll/level_0/string/private-dynamic.c fll/level_0/string/private-dynamics.c fll/level_0/string/private-dynamicss.c fll/level_0/string/private-maps.c fll/level_0/string/private-mapss.c fll/level_0/string/private-map_multis.c fll/level_0/string/private-map_multiss.c fll/level_0/string/private-quantitys.c fll/level_0/string/private-quantityss.c fll/level_0/string/private-ranges.c fll/level_0/string/private-rangess.c fll/level_0/string/private-triples.c fll/level_0/string/private-tripless.c
+build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/private-dynamics.c fll/level_0/string/private-dynamicss.c fll/level_0/string/private-maps.c fll/level_0/string/private-mapss.c fll/level_0/string/private-map_multis.c fll/level_0/string/private-map_multiss.c fll/level_0/string/private-quantitys.c fll/level_0/string/private-quantityss.c fll/level_0/string/private-ranges.c fll/level_0/string/private-rangess.c fll/level_0/string/private-triples.c fll/level_0/string/private-tripless.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/quantity.c fll/level_0/string/quantitys.c fll/level_0/string/quantityss.c fll/level_0/string/range.c fll/level_0/string/ranges.c fll/level_0/string/rangess.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/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_unsigned.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/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-uint128.c
+build_sources_program fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.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-dynamic.c fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-dynamicss.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-mapss.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-map_multiss.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c fll/level_0/utf/private-tripless.c
build_sources_program fll/level_0/pipe.c
build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
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 fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/private-dynamic.c fll/level_0/string/private-map.c fll/level_0/string/private-map_multi.c fll/level_0/string/private-quantity.c fll/level_0/string/private-range.c fll/level_0/string/private-triple.c fll/level_0/string/quantity.c fll/level_0/string/range.c fll/level_0/string/static.c fll/level_0/string/triple.c
+build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/private-map.c fll/level_0/string/private-map_multi.c fll/level_0/string/private-quantity.c fll/level_0/string/private-range.c fll/level_0/string/private-triple.c fll/level_0/string/quantity.c fll/level_0/string/range.c fll/level_0/string/static.c fll/level_0/string/triple.c
build_sources_program fll/level_0/thread.c fll/level_0/private-thread.c fll/level_0/thread/attribute.c fll/level_0/thread/barrier.c fll/level_0/thread/barrier_attribute.c fll/level_0/thread/condition.c fll/level_0/thread/condition_attribute.c fll/level_0/thread/id.c fll/level_0/thread/key.c fll/level_0/thread/lock.c fll/level_0/thread/lock_attribute.c fll/level_0/thread/mutex.c fll/level_0/thread/mutex_attribute.c fll/level_0/thread/once.c fll/level_0/thread/semaphore.c fll/level_0/thread/set.c fll/level_0/thread/spin.c
build_sources_program fll/level_0/type_array/cell.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_unsigned.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/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-uint128.c
+build_sources_program fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.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/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/map_multi.c fll/level_0/utf/static.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/private-dynamic.c fll/level_0/utf/private-map.c fll/level_0/utf/private-map_multi.c fll/level_0/utf/private-triple.c fll/level_0/utf/private-string.c
build_sources_program fll/level_0/pipe.c
build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
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 fll/level_0/string/private-dynamic.c fll/level_0/string/private-dynamics.c fll/level_0/string/private-dynamicss.c fll/level_0/string/private-maps.c fll/level_0/string/private-mapss.c fll/level_0/string/private-map_multis.c fll/level_0/string/private-map_multiss.c fll/level_0/string/private-quantitys.c fll/level_0/string/private-quantityss.c fll/level_0/string/private-ranges.c fll/level_0/string/private-rangess.c fll/level_0/string/private-triples.c fll/level_0/string/private-tripless.c
+build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/private-dynamics.c fll/level_0/string/private-dynamicss.c fll/level_0/string/private-maps.c fll/level_0/string/private-mapss.c fll/level_0/string/private-map_multis.c fll/level_0/string/private-map_multiss.c fll/level_0/string/private-quantitys.c fll/level_0/string/private-quantityss.c fll/level_0/string/private-ranges.c fll/level_0/string/private-rangess.c fll/level_0/string/private-triples.c fll/level_0/string/private-tripless.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/quantity.c fll/level_0/string/quantitys.c fll/level_0/string/quantityss.c fll/level_0/string/range.c fll/level_0/string/ranges.c fll/level_0/string/rangess.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/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_unsigned.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/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-uint128.c
+build_sources_program fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.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-dynamic.c fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-dynamicss.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-mapss.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-map_multiss.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c fll/level_0/utf/private-tripless.c
state->status = f_string_dynamics_increase_by(arguments.argc, ¶meters->arguments);
if (F_status_is_error(state->status)) return;
- state->status = f_number_unsigneds_increase(state->step_small, &process.needs);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &process.needs.array, &process.needs.used, &process.needs.size);
if (F_status_is_error(state->status)) return;
// Append the program name parameter as a static string.
process.location_sub = 1;
process.needs.used = 0;
- state->status = f_number_unsigneds_increase_by(parameters->arguments.array[process.location].used, &process.needs);
+ state->status = f_memory_array_increase_by(parameters->arguments.array[process.location].used, sizeof(f_number_unsigned_t), (void **) &process.needs.array, &process.needs.used, &process.needs.size);
if (F_status_is_error(state->status)) break;
// The process.location_sub is used on a per-increment basis (such as 'tar -xcf', the '-' would have an increment of 1, therefore x, c, and f would all be three separate parameters).
}
if (state->status == F_process) {
- state->status = f_number_unsigneds_increase(state->step_small, ¶meters->array[i].locations);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations.array, ¶meters->array[i].locations.used, ¶meters->array[i].locations.size);
if (F_status_is_error(state->status)) break;
- state->status = f_number_unsigneds_increase(state->step_small, ¶meters->array[i].locations_sub);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations_sub.array, ¶meters->array[i].locations_sub.used, ¶meters->array[i].locations_sub.size);
if (F_status_is_error(state->status)) break;
if (parameters->array[i].location != process.location) {
process.needs.array[process.needs.used++] = i;
} // for
- state->status = f_number_unsigneds_increase_by(process.needs.used, ¶meters->array[i].values);
+ state->status = f_memory_array_increase_by(process.needs.used, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].values.array, ¶meters->array[i].values.used, ¶meters->array[i].values.size);
if (F_status_is_error(state->status)) break;
}
}
if (state->status == F_process && process.found && i < parameters->used) {
- state->status = f_number_unsigneds_increase(state->step_small, ¶meters->array[i].locations);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations.array, ¶meters->array[i].locations.used, ¶meters->array[i].locations.size);
if (F_status_is_error(state->status)) break;
- state->status = f_number_unsigneds_increase(state->step_small, ¶meters->array[i].locations_sub);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations_sub.array, ¶meters->array[i].locations_sub.used, ¶meters->array[i].locations_sub.size);
if (F_status_is_error(state->status)) break;
parameters->array[i].result |= process.result | f_console_result_found_e;
process.needs.array[process.needs.used++] = i;
} // for
- state->status = f_number_unsigneds_increase_by(process.needs.used, ¶meters->array[i].values);
+ state->status = f_memory_array_increase_by(process.needs.used, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].values.array, ¶meters->array[i].values.used, ¶meters->array[i].values.size);
if (F_status_is_error(state->status)) break;
}
}
if (state->status == F_process) {
- state->status = f_number_unsigneds_increase(state->step_small, ¶meters->remaining);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) ¶meters->remaining.array, ¶meters->remaining.used, ¶meters->remaining.size);
if (F_status_is_error(state->status)) break;
parameters->remaining.array[parameters->remaining.used++] = process.location;
* (optional) A variable passed to the callback, if provided.
* Set to NULL to not use.
*
- * Errors (with error bit) from: f_number_unsigneds_increase().
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
+ * Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_string_dynamics_increase_by().
* Errors (with error bit) from: f_utf_char_to_character().
*
- * @see f_number_unsigneds_increase()
- * @see f_number_unsigneds_increase_by()
+ * @see f_memory_array_increase_by()
* @see f_string_dynamics_increase_by()
* @see f_utf_char_to_character()
*/
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8ss_resize()
*/
#ifndef _di_f_fss_nameds_adjust_
extern f_status_t f_fss_nameds_adjust(const f_number_unsigned_t length, f_fss_nameds_t * const nameds);
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8ss_resize()
*/
#ifndef _di_f_fss_nameds_resize_
extern f_status_t f_fss_nameds_resize(const f_number_unsigned_t length, f_fss_nameds_t * const nameds);
status = f_string_rangess_adjust(length, &named->contents);
if (F_status_is_error(status)) return status;
- status = f_uint8ss_adjust(length, &named->quotess);
+ status = f_memory_arrays_adjust(length, sizeof(f_uint8s_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8s_resize_callback);
if (F_status_is_error(status)) return status;
return F_none;
status = f_string_rangess_resize(length, &named->contents);
if (F_status_is_error(status)) return status;
- status = f_uint8ss_resize(length, &named->quotess);
+ status = f_memory_arrays_resize(length, sizeof(f_uint8s_t), (void **) &named->quotess.array, &named->quotess.used, &named->quotess.size, &f_uint8s_resize_callback);
if (F_status_is_error(status)) return status;
return F_none;
* @return
* F_none on success.
*
+ * Errors (with error bit) from: f_memory_arrays_adjust().
* Errors (with error bit) from: macro_f_string_ranges_t_adjust().
* Errors (with error bit) from: macro_f_string_rangess_t_adjust().
- * Errors (with error bit) from: macro_f_uint8ss_t_adjust().
*
+ * @see f_memory_arrays_adjust()
* @see macro_f_string_ranges_t_adjust()
* @see macro_f_string_rangess_t_adjust()
- * @see macro_f_uint8ss_t_adjust()
*
* @see f_fss_nameds_adjust()
* @see f_fss_nameds_decimate_by()
* @return
* F_none on success.
*
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8ss_resize()
*
* @see f_fss_nameds_decrease_by()
* @see f_fss_nameds_resize()
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8ss_resize()
- * @see f_memory_array_adjust()
*
* @see f_fss_nameds_adjust()
* @see f_fss_nameds_decimate_by()
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8ss_resize()
*
* @see f_fss_nameds_decrease_by()
* @see f_fss_nameds_increase()
status = f_string_rangess_adjust(length, &set_quote->contents);
if (F_status_is_error(status)) return status;
- status = f_uint8s_adjust(length, &set_quote->objects_quote);
+ status = f_memory_array_adjust(length, sizeof(uint8_t), (void **) &set_quote->objects_quote.array, &set_quote->objects_quote.used, &set_quote->objects_quote.size);
if (F_status_is_error(status)) return status;
- status = f_uint8ss_adjust(length, &set_quote->contents_quote);
+ status = f_memory_arrays_adjust(length, sizeof(f_uint8s_t), (void **) &set_quote->contents_quote.array, &set_quote->contents_quote.used, &set_quote->contents_quote.size, &f_uint8s_resize_callback);
if (F_status_is_error(status)) return status;
return F_none;
status = f_string_rangess_resize(length, &set_quote->contents);
if (F_status_is_error(status)) return status;
- status = f_uint8s_resize(length, &set_quote->objects_quote);
+ status = f_memory_array_resize(length, sizeof(uint8_t), (void **) &set_quote->objects_quote.array, &set_quote->objects_quote.used, &set_quote->objects_quote.size);
if (F_status_is_error(status)) return status;
- status = f_uint8ss_resize(length, &set_quote->contents_quote);
+ status = f_memory_arrays_resize(length, sizeof(f_uint8s_t), (void **) &set_quote->contents_quote.array, &set_quote->contents_quote.used, &set_quote->contents_quote.size, &f_uint8s_resize_callback);
if (F_status_is_error(status)) return status;
return F_none;
status = f_string_rangess_adjust(0, &set_quotes->array[i].contents);
if (F_status_is_error(status)) return status;
- status = f_uint8s_adjust(0, &set_quotes->array[i].objects_quote);
+ status = f_memory_array_adjust(0, sizeof(uint8_t), (void **) &set_quotes->array[i].objects_quote.array, &set_quotes->array[i].objects_quote.used, &set_quotes->array[i].objects_quote.size);
if (F_status_is_error(status)) return status;
- status = f_uint8ss_adjust(0, &set_quotes->array[i].contents_quote);
+ status = f_memory_arrays_adjust(0, sizeof(f_uint8s_t), (void **) &set_quotes->array[i].contents_quote.array, &set_quotes->array[i].contents_quote.used, &set_quotes->array[i].contents_quote.size, &f_uint8s_resize_callback);
if (F_status_is_error(status)) return status;
} // for
}
status = f_string_rangess_resize(0, &set_quotes->array[i].contents);
if (F_status_is_error(status)) return status;
- status = f_uint8s_resize(0, &set_quotes->array[i].objects_quote);
+ status = f_memory_array_resize(0, sizeof(uint8_t), (void **) &set_quotes->array[i].objects_quote.array, &set_quotes->array[i].objects_quote.used, &set_quotes->array[i].objects_quote.size);
if (F_status_is_error(status)) return status;
- status = f_uint8ss_resize(0, &set_quotes->array[i].contents_quote);
+ status = f_memory_arrays_resize(0, sizeof(f_uint8s_t), (void **) &set_quotes->array[i].contents_quote.array, &set_quotes->array[i].contents_quote.used, &set_quotes->array[i].contents_quote.size, &f_uint8s_resize_callback);
if (F_status_is_error(status)) return status;
} // for
}
* @return
* F_none on success.
*
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_adjust().
* Errors (with error bit) from: f_string_rangess_adjust().
- * Errors (with error bit) from: f_uint8s_adjust().
- * Errors (with error bit) from: f_uint8ss_adjust().
*
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_adjust()
* @see f_string_rangess_adjust()
- * @see f_uint8s_adjust()
- * @see f_uint8ss_adjust()
*
* @see f_fss_set_quote_adjust()
* @see f_fss_set_quote_decimate_by()
* @return
* F_none on success.
*
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8s_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
*
* @see f_fss_set_quote_decrease_by()
* @see f_fss_set_quote_resize()
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_arrays_adjust().
* Errors (with error bit) from: f_string_ranges_adjust().
* Errors (with error bit) from: f_string_rangess_adjust().
- * Errors (with error bit) from: f_uint8s_adjust().
- * Errors (with error bit) from: f_uint8ss_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
* @see f_string_ranges_adjust()
* @see f_string_rangess_adjust()
- * @see f_uint8s_adjust()
- * @see f_uint8ss_adjust()
*
* @see f_fss_set_quotes_decrease_by()
* @see f_fss_set_quotes_adjust()
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_arrays_adjust().
* Errors (with error bit) from: f_string_ranges_adjust().
* Errors (with error bit) from: f_string_rangess_adjust().
- * Errors (with error bit) from: f_uint8s_adjust().
- * Errors (with error bit) from: f_uint8ss_adjust().
*
- * @see f_memory_array_resize()
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
* @see f_string_ranges_adjust()
* @see f_string_rangess_adjust()
- * @see f_uint8s_adjust()
- * @see f_uint8ss_adjust()
*
* @see f_fss_set_quotes_decrease_by()
* @see f_fss_set_quotes_increase()
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_arrays_adjust().
* Errors (with error bit) from: f_string_ranges_adjust().
* Errors (with error bit) from: f_string_rangess_adjust().
- * Errors (with error bit) from: f_uint8s_adjust().
- * Errors (with error bit) from: f_uint8ss_adjust().
*
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
* @see f_string_ranges_adjust()
* @see f_string_rangess_adjust()
- * @see f_uint8s_adjust()
- * @see f_uint8ss_adjust()
*/
#ifndef _di_f_fss_set_quote_adjust_
extern f_status_t f_fss_set_quote_adjust(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote);
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_arrays_adjust().
* Errors (with error bit) from: f_string_ranges_adjust().
* Errors (with error bit) from: f_string_rangess_adjust().
- * Errors (with error bit) from: f_uint8s_adjust().
- * Errors (with error bit) from: f_uint8ss_adjust().
*
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
* @see f_string_ranges_adjust()
* @see f_string_rangess_adjust()
- * @see f_uint8s_adjust()
- * @see f_uint8ss_adjust()
*/
#ifndef _di_f_fss_set_quote_decimate_by_
extern f_status_t f_fss_set_quote_decimate_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8s_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
*/
#ifndef _di_f_fss_set_quote_decrease_by_
extern f_status_t f_fss_set_quote_decrease_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_array_increase().
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8s_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
* @see f_memory_array_increase()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
*/
#ifndef _di_f_fss_set_quote_increase_
extern f_status_t f_fss_set_quote_increase(const f_number_unsigned_t step, f_fss_set_quote_t * const set_quote);
* F_array_too_large (with error bit) if the new array length is too large.
*
* Errors (with error bit) from: f_memory_array_increase_by().
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8s_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
* @see f_memory_array_increase_by()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
*/
#ifndef _di_f_fss_set_quote_increase_by_
extern f_status_t f_fss_set_quote_increase_by(const f_number_unsigned_t amount, f_fss_set_quote_t * const set_quote);
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8s_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
*/
#ifndef _di_f_fss_set_quote_resize_
extern f_status_t f_fss_set_quote_resize(const f_number_unsigned_t length, f_fss_set_quote_t * const set_quote);
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_arrays_adjust().
* Errors (with error bit) from: f_string_ranges_adjust().
* Errors (with error bit) from: f_string_rangess_adjust().
- * Errors (with error bit) from: f_uint8s_adjust().
- * Errors (with error bit) from: f_uint8ss_adjust().
*
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
* @see f_string_ranges_adjust()
* @see f_string_rangess_adjust()
- * @see f_uint8s_adjust()
- * @see f_uint8ss_adjust()
*/
#ifndef _di_f_fss_set_quotes_adjust_
extern f_status_t f_fss_set_quotes_adjust(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes);
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_arrays_adjust().
* Errors (with error bit) from: f_string_ranges_adjust().
* Errors (with error bit) from: f_string_rangess_adjust().
- * Errors (with error bit) from: f_uint8s_adjust().
- * Errors (with error bit) from: f_uint8ss_adjust().
*
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
* @see f_string_ranges_adjust()
* @see f_string_rangess_adjust()
- * @see f_uint8s_adjust()
- * @see f_uint8ss_adjust()
*/
#ifndef _di_f_fss_set_quotes_decimate_by_
extern f_status_t f_fss_set_quotes_decimate_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_adjust().
+ * Errors (with error bit) from: f_memory_arrays_adjust().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8s_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
*/
#ifndef _di_f_fss_set_quotes_decrease_by_
extern f_status_t f_fss_set_quotes_decrease_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_array_increase().
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8s_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
* @see f_memory_array_increase()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
*/
#ifndef _di_f_fss_set_quotes_increase_
extern f_status_t f_fss_set_quotes_increase(const f_number_unsigned_t step, f_fss_set_quotes_t * const set_quotes);
* F_array_too_large (with error bit) if the new array length is too large.
*
* Errors (with error bit) from: f_memory_array_increase_by().
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8s_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
* @see f_memory_array_increase_by()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
*/
#ifndef _di_f_fss_set_quotes_increase_by_
extern f_status_t f_fss_set_quotes_increase_by(const f_number_unsigned_t amount, f_fss_set_quotes_t * const set_quotes);
*
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
* Errors (with error bit) from: f_string_ranges_resize().
* Errors (with error bit) from: f_string_rangess_resize().
- * Errors (with error bit) from: f_uint8s_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
*
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
* @see f_string_ranges_resize()
* @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
*/
#ifndef _di_f_fss_set_quotes_resize_
extern f_status_t f_fss_set_quotes_resize(const f_number_unsigned_t length, f_fss_set_quotes_t * const set_quotes);
// Save delimit for a would-be valid IKI that is now delimited.
if (buffer->string[range->start] == f_iki_syntax_quote_single_s.string[0] || buffer->string[range->start] == f_iki_syntax_quote_double_s.string[0] || buffer->string[range->start] == f_iki_syntax_quote_backtick_s.string[0]) {
- state->status = f_number_unsigneds_increase(state->step_small, &data->delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &data->delimits.array, &data->delimits.used, &data->delimits.size);
if (F_status_is_error(state->status)) break;
data->delimits.array[data->delimits.used++] = vocabulary_slash_first;
++content_slash_delimits;
}
- state->status = f_number_unsigneds_increase_by(content_slash_delimits, &data->delimits);
+ state->status = f_memory_array_increase_by(content_slash_delimits, sizeof(f_number_unsigned_t), (void **) &data->delimits.array, &data->delimits.used, &data->delimits.size);
if (F_status_is_error(state->status)) break;
content_range.start = content_slash_first;
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if a string length is too large to store in the buffer.
+ *
+ * @see f_memory_array_increase_by()
*/
#ifndef _di_f_iki_read_
extern void f_iki_read(f_string_static_t * const buffer, f_string_range_t * const range, f_iki_data_t * const data, f_state_t * const state);
*
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_append_all().
* Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_number_unsigneds_append_all().
* Errors (with error bit) from: f_string_ranges_append_all().
*
+ * @see f_memory_array_append_all()
* @see f_memory_array_increase()
- * @see f_number_unsigneds_append_all()
* @see f_string_ranges_append_all()
*/
#ifndef _di_f_iki_datas_append_
*
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_append_all().
* Errors (with error bit) from: f_memory_array_increase_by().
- * Errors (with error bit) from: f_number_unsigneds_append_all().
* Errors (with error bit) from: f_string_ranges_append_all().
*
+ * @see f_memory_array_append_all()
* @see f_memory_array_increase_by()
- * @see f_number_unsigneds_append_all()
* @see f_string_ranges_append_all()
*/
#ifndef _di_f_iki_datas_append_all_
}
if (source.delimits.used) {
- status = f_number_unsigneds_append_all(source.delimits, &destination->array[destination->used].delimits);
+ status = f_memory_array_append_all((const void *) &source.delimits.array, source.delimits.used, sizeof(f_number_unsigned_t), (void **) &destination->array[destination->used].delimits.array, &destination->array[destination->used].delimits.used, &destination->array[destination->used].delimits.size);
if (F_status_is_error(status)) return status;
}
}
if (source.array[i].delimits.used) {
- status = f_number_unsigneds_append_all(source.array[i].delimits, &destination->array[destination->used].delimits);
+ status = f_memory_array_append_all((const void *) &source.array[i].delimits.array, source.array[i].delimits.used, sizeof(f_number_unsigned_t), (void **) &destination->array[destination->used].delimits.array, &destination->array[destination->used].delimits.used, &destination->array[destination->used].delimits.size);
if (F_status_is_error(status)) return status;
}
* @return
* F_none on success.
*
+ * Errors (with error bit) from: f_memory_array_append_all().
* Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_number_unsigneds_append_all().
* Errors (with error bit) from: f_string_ranges_append_all().
*
+ * @see f_memory_array_append_all()
* @see f_memory_array_increase()
- * @see f_number_unsigneds_append_all()
* @see f_string_ranges_append_all()
*
* @see f_iki_datas_append()
* @return
* F_none on success.
*
+ * Errors (with error bit) from: f_memory_array_append_all().
* Errors (with error bit) from: f_memory_array_increase_by().
- * Errors (with error bit) from: f_number_unsigneds_append_all().
* Errors (with error bit) from: f_string_ranges_append_all().
*
+ * @see f_memory_array_append_all()
* @see f_memory_array_increase_by()
- * @see f_number_unsigneds_append_all()
* @see f_string_ranges_append_all()
*
* @see f_iki_datass_append()
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * Errors (with error bit) from: f_number_unsigneds_resize().
* Errors (with error bit) from: f_memory_adjust().
+ * Errors (with error bit) from: f_memory_array_resize().
* Errors (with error bit) from: f_string_ranges_adjust().
*
- * @see f_number_unsigneds_resize()
* @see f_memory_adjust()
+ * @see f_memory_array_resize()
* @see f_string_ranges_adjust()
*/
#if !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_)
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * Errors (with error bit) from: f_number_unsigneds_resize().
+ * Errors (with error bit) from: f_memory_array_resize().
* Errors (with error bit) from: f_memory_resize().
* Errors (with error bit) from: f_string_ranges_resize().
*
- * @see f_number_unsigneds_resize()
+ * @see f_memory_array_resize()
* @see f_memory_resize()
* @see f_string_ranges_resize()
*/
// FLL-0 memory includes.
#include <fll/level_0/memory/common.h>
#include <fll/level_0/memory/array.h>
+#include <fll/level_0/memory/arrays.h>
#ifdef __cplusplus
extern "C" {
#ifndef _di_f_memory_array_append_
f_status_t f_memory_array_append(const void * const source, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
#ifndef _di_level_0_parameter_checking_
+ if (!source) return F_status_set_error(F_parameter);
if (!width) return F_status_set_error(F_parameter);
if (!array) return F_status_set_error(F_parameter);
if (!used) return F_status_set_error(F_parameter);
}
}
- memcpy((*array) + (*used)++, source, width);
+ // uint8_t * is of a data size size of 1, casting it to bool should result in a single-length increment.
+ // This is done to avoid problems with (void *) having arithmetic issues.
+ memcpy((void *) (((uint8_t *) (*array)) + (*used * width)), source, width);
+
+ ++(*used);
return F_none;
}
#ifndef _di_f_memory_array_append_all_
f_status_t f_memory_array_append_all(const void * const sources, const f_number_unsigned_t amount, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
#ifndef _di_level_0_parameter_checking_
+ if (!sources) return F_status_set_error(F_parameter);
if (!width) return F_status_set_error(F_parameter);
if (!array) return F_status_set_error(F_parameter);
if (!used) return F_status_set_error(F_parameter);
}
}
- memcpy(*array + *used, sources, width * amount);
+ // uint8_t * is of a data size size of 1, casting it to bool should result in a single-length increment.
+ // This is done to avoid problems with (void *) having arithmetic issues.
+ memcpy((void *) (((uint8_t *) (*array)) + (*used * width)), sources, width * amount);
*used += amount;
* Must not be 0.
* @param array
* The structure.array destination.
+ *
+ * A literal array structure cannot be directly passed or this may segfault.
+ * Bad:
+ * {
+ * int arr[5] = { 0 };
+ * ...
+ * f_memory_array_append(source, width, (void **) &arr, used, size);
+ * }
+ * Better:
+ * {
+ * int arr[5] = { 0 };
+ * int *arr_pounter = arr;
+ * ...
+ * f_memory_array_append(source, width, (void **) &arr_pounter, used, size);
+ * }
* @param used
* The structure.used destination.
* @param size
* Must not be 0.
* @param array
* The structure.array destination.
+ *
+ * A literal array structure cannot be directly passed or this may segfault.
+ * Bad:
+ * {
+ * int arr[5] = { 0 };
+ * ...
+ * f_memory_array_append_all(sources, amount, width, (void **) &arr, used, size);
+ * }
+ * Better:
+ * {
+ * int arr[5] = { 0 };
+ * int *arr_pounter = arr;
+ * ...
+ * f_memory_array_append_all(sources, amount, width, (void **) &arr_pounter, used, size);
+ * }
* @param used
* The structure.used destination.
* @param size
--- /dev/null
+#include "../memory.h"
+#include "private-array.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_memory_arrays_adjust_
+ f_status_t f_memory_arrays_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array)) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!width) return F_status_set_error(F_parameter);
+ if (!array) return F_status_set_error(F_parameter);
+ if (!used) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
+ if (!callback) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ if (length < *size) {
+ const f_status_t status = callback(length, *size, *array);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_memory_array_adjust(length, width, array, used, size);
+ }
+#endif // _di_f_memory_arrays_adjust_
+
+#ifndef _di_f_memory_arrays_resize_
+ f_status_t f_memory_arrays_resize(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array)) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!width) return F_status_set_error(F_parameter);
+ if (!array) return F_status_set_error(F_parameter);
+ if (!used) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
+ if (!callback) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+
+ if (length < *size) {
+ const f_status_t status = callback(length, *size, *array);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_memory_array_resize(length, width, array, used, size);
+ }
+#endif // _di_f_memory_arrays_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Memory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines memory array data.
+ *
+ * This is auto-included by memory.h and should not need to be explicitly included.
+ */
+#ifndef _F_memory_arrays_h
+#define _F_memory_arrays_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Resize the memory array of arrays.
+ *
+ * This function is only useful for structures of the form "{ array, used, size }" where the array is a an array of simple types.
+ * If the simple type that is "array" requires additional memory manipulation on allocation or de-allocation, then do not use this function.
+ *
+ * The inner array can be a more complex structure because the callback is expected to know the type.
+ *
+ * @param length
+ * The new size to use.
+ * @param width
+ * The size of the structure represented by array.
+ * The word "width" is used due to conflicts of already using "length" and "size".
+ * Must not be 0.
+ * @param array
+ * The structure.array to resize.
+ * @param used
+ * The structure.used.
+ * @param size
+ * The structure.size.
+ * @param callback
+ * A callback to call on each array value when reducing the length of the array.
+ * This callback is expected to know the appropriate type and will cast the structure parameter to the appropriate type.
+ *
+ * This is only called when the requested length is less than the given size.
+ *
+ * Callback Parameters:
+ * - start: The start position in the array to start deleting.
+ * - stop: The stop in the array to stop deleting.
+ * - array: The array structure to delete all values of.
+ *
+ * Callback Returns:
+ * The standard status codes similar to this function.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_array_too_large (with error bit) if the new array length is too large.
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_memory_arrays_adjust_
+ extern f_status_t f_memory_arrays_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+#endif // _di_f_memory_arrays_adjust_
+
+/**
+ * Resize the memory array of arrays.
+ *
+ * This function is only useful for structures of the form "{ array, used, size }" where the array is a an array of simple types.
+ * If the simple type that is "array" requires additional memory manipulation on allocation or de-allocation, then do not use this function.
+ *
+ * The inner array can be a more complex structure because the callback is expected to know the type.
+ *
+ * @param length
+ * The new size to use.
+ * @param width
+ * The size of the structure represented by array.
+ * The word "width" is used due to conflicts of already using "length" and "size".
+ * Must not be 0.
+ * @param array
+ * The structure.array to resize.
+ * @param used
+ * The structure.used.
+ * @param size
+ * The structure.size.
+ * @param callback
+ * A callback to call on each array value when reducing the length of the array.
+ * This callback is expected to know the appropriate type and will cast the structure parameter to the appropriate type.
+ *
+ * This is only called when the requested length is less than the given size.
+ *
+ * Callback Parameters:
+ * - start: The start position in the array to start deleting.
+ * - stop: The stop in the array to stop deleting.
+ * - array: The array structure to delete all values of.
+ *
+ * Callback Returns:
+ * The standard status codes similar to this function.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_array_too_large (with error bit) if the new array length is too large.
+ * F_memory_not (with error bit) on out of memory.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_f_memory_arrays_resize_
+ extern f_status_t f_memory_arrays_resize(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+#endif // _di_f_memory_arrays_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_memory_arrays_h
build_libraries -lc
-build_sources_library memory.c memory/array.c
+build_sources_library memory.c memory/array.c memory/arrays.c
build_sources_library private-memory.c memory/private-array.c
-build_sources_headers memory.h memory/array.h memory/common.h
+build_sources_headers memory.h memory/array.h memory/arrays.h memory/common.h
build_script yes
build_shared yes
build_libraries-individual -lf_memory
build_sources_program test-memory-adjust.c test-memory-delete.c test-memory-destroy.c test-memory-new_aligned.c test-memory-new.c test-memory-resize.c test-memory.c
-build_sources_program test-memory-array_adjust.c test-memory-array_decimate_by.c test-memory-array_decrease_by.c test-memory-array_increase.c test-memory-array_increase_by.c test-memory-array_resize.c
+build_sources_program test-memory-array_adjust.c test-memory-array_append.c test-memory-array_append_all.c test-memory-array_decimate_by.c test-memory-array_decrease_by.c test-memory-array_increase.c test-memory-array_increase_by.c test-memory-array_resize.c
+build_sources_program test-memory-arrays_adjust.c test-memory-arrays_resize.c
build_script no
build_shared yes
assert_int_equal(data.size, length);
}
- free((void *) data.array);
+ {
+ const f_status_t status = f_memory_array_adjust(0, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
}
#ifdef __cplusplus
*
* Test set quote adjust in the fss project.
*/
-#ifndef _TEST__F_fss__simple_packet_range_adjust
-#define _TEST__F_fss__simple_packet_range_adjust
+#ifndef _TEST__F_memory__array_adjust
+#define _TEST__F_memory__array_adjust
/**
* Test that the function correctly fails on invalid parameter.
*/
extern void test__f_memory_array_adjust__works(void **state);
-#endif // _TEST__F_fss__simple_packet_range_adjust
+#endif // _TEST__F_memory__array_adjust
--- /dev/null
+#include "test-memory.h"
+#include "test-memory-array_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_memory_array_append__parameter_checking(void **state) {
+
+ const int number = 1;
+ test_memory_array_t data = test_memory_array_t_initialize;
+
+ {
+ const f_status_t status = f_memory_array_append((void *) &number, sizeof(int), 0, 0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_array_append((void *) &number, sizeof(int), 0, &data.used, &data.size);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_array_append((void *) &number, sizeof(int), (void **) &data.array, 0, &data.size);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_array_append((void *) &number, sizeof(int), (void **) &data.array, &data.used, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_array_append((void *) &number, 0, (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_array_append(0, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_memory_array_append__returns_array_too_large(void **state) {
+
+ const int number = 1;
+ test_memory_array_t data = test_memory_array_t_initialize;
+
+ data.used = F_number_t_size_unsigned_d;
+
+ {
+ const f_status_t status = f_memory_array_append((void *) &number, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_status_set_error(F_array_too_large));
+ assert_int_equal(data.used, F_number_t_size_unsigned_d);
+ assert_int_equal(data.size, 0);
+ }
+}
+
+void test__f_memory_array_append__works(void **state) {
+
+ const int number = 1;
+ test_memory_array_t data = test_memory_array_t_initialize;
+
+ {
+ const f_status_t status = f_memory_array_append((void *) &number, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 1);
+ assert_int_equal(data.array[0], number);
+ assert_int_not_equal(data.size, 0);
+ }
+
+ const f_number_unsigned_t size = data.size;
+ const int number_next = 2;
+
+ {
+ const f_status_t status = f_memory_array_append((void *) &number_next, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 2);
+ assert_int_equal(data.array[0], number);
+ assert_int_equal(data.array[1], number_next);
+ assert_int_not_equal(data.size, 0);
+ assert_int_not_equal(data.size, size);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Memory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote resize in the fss project.
+ */
+#ifndef _TEST__F_memory__array_append
+#define _TEST__F_memory__array_append
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_memory_array_append()
+ */
+extern void test__f_memory_array_append__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_array_too_large.
+ *
+ * @see f_memory_array_append()
+ */
+extern void test__f_memory_array_append__returns_array_too_large(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_memory_array_append()
+ */
+extern void test__f_memory_array_append__works(void **state);
+
+#endif // _TEST__F_memory__array_append
--- /dev/null
+#include "test-memory.h"
+#include "test-memory-array_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_memory_array_append_all__parameter_checking(void **state) {
+
+ int sources_array[2] = { 1, 2 };
+ test_memory_array_t sources = { .array = sources_array, .used = 2, .size = 0 };
+ test_memory_array_t data = test_memory_array_t_initialize;
+
+ {
+ const f_status_t status = f_memory_array_append_all((void *) sources.array, sources.used, sizeof(int), 0, 0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_array_append_all((void *) sources.array, sources.used, sizeof(int), 0, &data.used, &data.size);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_array_append_all((void *) sources.array, sources.used, sizeof(int), (void **) &data.array, 0, &data.size);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_array_append_all((void *) sources.array, sources.used, sizeof(int), (void **) &data.array, &data.used, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_array_append_all((void *) sources.array, sources.used, 0, (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_array_append_all(0, sources.used, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_memory_array_append_all__returns_array_too_large(void **state) {
+
+ int sources_array[2] = { 1, 2 };
+ test_memory_array_t sources = { .array = sources_array, .used = 2, .size = 0 };
+ test_memory_array_t data = test_memory_array_t_initialize;
+
+ data.used = F_number_t_size_unsigned_d;
+
+ {
+ const f_status_t status = f_memory_array_append_all((void *) sources.array, sources.used, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_status_set_error(F_array_too_large));
+ assert_int_equal(data.used, F_number_t_size_unsigned_d);
+ assert_int_equal(data.size, 0);
+ }
+}
+
+void test__f_memory_array_append_all__returns_data_not(void **state) {
+
+ int sources_array[0] = { };
+ test_memory_array_t sources = { .array = sources_array, .used = 0, .size = 0 };
+ test_memory_array_t data = test_memory_array_t_initialize;
+
+ {
+ const f_status_t status = f_memory_array_append_all((void *) sources.array, sources.used, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+}
+
+void test__f_memory_array_append_all__works(void **state) {
+
+ int sources_array[2] = { 1, 2 };
+ test_memory_array_t sources = { .array = sources_array, .used = 2, .size = 0 };
+ test_memory_array_t data = test_memory_array_t_initialize;
+
+ {
+ const f_status_t status = f_memory_array_append_all((void *) sources.array, sources.used, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 2);
+ assert_int_equal(data.array[0], sources.array[0]);
+ assert_int_equal(data.array[1], sources.array[1]);
+ assert_int_not_equal(data.size, 0);
+ }
+
+ const f_number_unsigned_t size = data.size;
+
+ int source_next_array[1] = { 3 };
+ test_memory_array_t sources_next = { .array = source_next_array, .used = 1, .size = 0 };
+
+ {
+ const f_status_t status = f_memory_array_append_all((void *) sources_next.array, sources_next.used, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 3);
+ assert_int_equal(data.array[0], sources.array[0]);
+ assert_int_equal(data.array[1], sources.array[1]);
+ assert_int_equal(data.array[2], sources_next.array[0]);
+ assert_int_not_equal(data.size, 0);
+ assert_int_not_equal(data.size, size);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Memory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote resize in the fss project.
+ */
+#ifndef _TEST__F_memory__array_append_all
+#define _TEST__F_memory__array_append_all
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_memory_array_append_all()
+ */
+extern void test__f_memory_array_append_all__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_array_too_large.
+ *
+ * @see f_memory_array_append_all()
+ */
+extern void test__f_memory_array_append_all__returns_array_too_large(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_memory_array_append_all()
+ */
+extern void test__f_memory_array_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_memory_array_append_all()
+ */
+extern void test__f_memory_array_append_all__works(void **state);
+
+#endif // _TEST__F_memory__array_append_all
{
const f_status_t status = f_memory_array_decimate_by(length, 0, (void **) &data.array, &data.used, &data.size);
- assert_int_equal(status, F_size_not);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.array, 0);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
/**
* FLL - Level 0
*
- * Project: FSS
+ * Project: Memory
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
* Test set quote decimate by in the fss project.
*/
-#ifndef _TEST__F_fss__simple_packet_range_decimate_by
-#define _TEST__F_fss__simple_packet_range_decimate_by
+#ifndef _TEST__F_memory__array_decimate_by
+#define _TEST__F_memory__array_decimate_by
/**
* Test that the function correctly fails on invalid parameter.
*/
extern void test__f_memory_array_decimate_by__works(void **state);
-#endif // _TEST__F_fss__simple_packet_range_decimate_by
+#endif // _TEST__F_memory__array_decimate_by
{
const f_status_t status = f_memory_array_decrease_by(length, 0, (void **) &data.array, &data.used, &data.size);
- assert_int_equal(status, F_size_not);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.array, 0);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
/**
* FLL - Level 0
*
- * Project: FSS
+ * Project: Memory
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
* Test set quote decrease by in the fss project.
*/
-#ifndef _TEST__F_fss__simple_packet_range_decrease_by
-#define _TEST__F_fss__simple_packet_range_decrease_by
+#ifndef _TEST__F_memory__array_decrease_by
+#define _TEST__F_memory__array_decrease_by
/**
* Test that the function correctly fails on invalid parameter.
*/
extern void test__f_memory_array_decrease_by__works(void **state);
-#endif // _TEST__F_fss__simple_packet_range_decrease_by
+#endif // _TEST__F_memory__array_decrease_by
/**
* FLL - Level 0
*
- * Project: FSS
+ * Project: Memory
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
* Test set quote increase in the fss project.
*/
-#ifndef _TEST__F_fss__simple_packet_range_increase
-#define _TEST__F_fss__simple_packet_range_increase
+#ifndef _TEST__F_memory__array_increase
+#define _TEST__F_memory__array_increase
/**
* Test that the function correctly fails on invalid parameter.
*/
extern void test__f_memory_array_increase__works(void **state);
-#endif // _TEST__F_fss__simple_packet_range_increase
+#endif // _TEST__F_memory__array_increase
assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
/**
* FLL - Level 0
*
- * Project: FSS
+ * Project: Memory
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
* Test set quote increase by in the fss project.
*/
-#ifndef _TEST__F_fss__simple_packet_range_increase_by
-#define _TEST__F_fss__simple_packet_range_increase_by
+#ifndef _TEST__F_memory__array_increase_by
+#define _TEST__F_memory__array_increase_by
/**
* Test that the function correctly fails on invalid parameter.
*/
extern void test__f_memory_array_increase_by__works(void **state);
-#endif // _TEST__F_fss__simple_packet_range_increase_by
+#endif // _TEST__F_memory__array_increase_by
assert_int_equal(data.size, length);
}
- free((void *) data.array);
+ {
+ const f_status_t status = f_memory_array_resize(0, sizeof(int), (void **) &data.array, &data.used, &data.size);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
}
#ifdef __cplusplus
/**
* FLL - Level 0
*
- * Project: FSS
+ * Project: Memory
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
* Test set quote resize in the fss project.
*/
-#ifndef _TEST__F_fss__simple_packet_range_resize
-#define _TEST__F_fss__simple_packet_range_resize
+#ifndef _TEST__F_memory__array_resize
+#define _TEST__F_memory__array_resize
/**
* Test that the function correctly fails on invalid parameter.
*/
extern void test__f_memory_array_resize__works(void **state);
-#endif // _TEST__F_fss__simple_packet_range_resize
+#endif // _TEST__F_memory__array_resize
--- /dev/null
+#include "test-memory.h"
+#include "test-memory-arrays_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_memory_arrays_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ test_memory_arrays_t data = test_memory_arrays_t_initialize;
+
+ {
+ const f_status_t status = f_memory_arrays_adjust(length, sizeof(test_memory_array_t), 0, 0, 0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_adjust(length, sizeof(test_memory_array_t), 0, &data.used, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_adjust(length, sizeof(test_memory_array_t), (void **) &data.array, 0, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_adjust(length, sizeof(test_memory_array_t), (void **) &data.array, &data.used, 0, &test_memory_array_callback);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_adjust(length, sizeof(test_memory_array_t), (void **) &data.array, &data.used, &data.size, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_adjust(length, 0, (void **) &data.array, &data.used, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_memory_arrays_adjust__returns_array_too_large(void **state) {
+
+ const f_number_unsigned_t length = F_number_t_size_unsigned_d + 1;
+ test_memory_arrays_t data = test_memory_arrays_t_initialize;
+
+ {
+ const f_status_t status = f_memory_arrays_adjust(length, sizeof(test_memory_array_t), (void **) &data.array, &data.used, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_status_set_error(F_array_too_large));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+}
+
+void test__f_memory_arrays_adjust__works(void **state) {
+
+ const int length = 5;
+ test_memory_arrays_t data = test_memory_arrays_t_initialize;
+
+ {
+ const f_status_t status = f_memory_arrays_adjust(length, sizeof(test_memory_array_t), (void **) &data.array, &data.used, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ // Allocate an additional location to check that the memory callback gets called and works.
+ {
+ const int length_inner = 2;
+
+ const f_status_t status = f_memory_array_adjust(length_inner, sizeof(int), (void **) &data.array[0].array, &data.array[0].used, &data.array[0].size);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.array[0].used, 0);
+ assert_int_equal(data.array[0].size, length_inner);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_adjust(0, sizeof(test_memory_array_t), (void **) &data.array, &data.used, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Memory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote adjust in the fss project.
+ */
+#ifndef _TEST__F_memory__arrays_adjust
+#define _TEST__F_memory__arrays_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_memory_arrays_adjust()
+ */
+extern void test__f_memory_arrays_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_array_too_large.
+ *
+ * @see f_memory_arrays_adjust()
+ */
+extern void test__f_memory_arrays_adjust__returns_array_too_large(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_memory_arrays_adjust()
+ */
+extern void test__f_memory_arrays_adjust__works(void **state);
+
+#endif // _TEST__F_memory__arrays_adjust
--- /dev/null
+#include "test-memory.h"
+#include "test-memory-arrays_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_memory_arrays_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ test_memory_arrays_t data = test_memory_arrays_t_initialize;
+
+ {
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(test_memory_array_t), 0, 0, 0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(test_memory_array_t), 0, &data.used, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(test_memory_array_t), (void **) &data.array, 0, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(test_memory_array_t), (void **) &data.array, &data.used, 0, &test_memory_array_callback);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(test_memory_array_t), (void **) &data.array, &data.used, &data.size, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_resize(length, 0, (void **) &data.array, &data.used, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_memory_arrays_resize__returns_array_too_large(void **state) {
+
+ const f_number_unsigned_t length = F_number_t_size_unsigned_d + 1;
+ test_memory_arrays_t data = test_memory_arrays_t_initialize;
+
+ {
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(test_memory_array_t), (void **) &data.array, &data.used, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_status_set_error(F_array_too_large));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+}
+
+void test__f_memory_arrays_resize__works(void **state) {
+
+ const int length = 5;
+ test_memory_arrays_t data = test_memory_arrays_t_initialize;
+
+ {
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(test_memory_array_t), (void **) &data.array, &data.used, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ // Allocate an additional location to check that the memory callback gets called and works.
+ {
+ const int length_inner = 2;
+
+ const f_status_t status = f_memory_array_resize(length_inner, sizeof(int), (void **) &data.array[0].array, &data.array[0].used, &data.array[0].size);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.array[0].used, 0);
+ assert_int_equal(data.array[0].size, length_inner);
+ }
+
+ {
+ const f_status_t status = f_memory_arrays_resize(0, sizeof(test_memory_array_t), (void **) &data.array, &data.used, &data.size, &test_memory_array_callback);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Memory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote resize in the fss project.
+ */
+#ifndef _TEST__F_memory__arrays_resize
+#define _TEST__F_memory__arrays_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_memory_arrays_resize()
+ */
+extern void test__f_memory_arrays_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_array_too_large.
+ *
+ * @see f_memory_arrays_resize()
+ */
+extern void test__f_memory_arrays_resize__returns_array_too_large(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_memory_arrays_resize()
+ */
+extern void test__f_memory_arrays_resize__works(void **state);
+
+#endif // _TEST__F_memory__arrays_resize
cmocka_unit_test(test__f_memory_array_increase_by__returns_array_too_large),
cmocka_unit_test(test__f_memory_array_resize__returns_array_too_large),
- cmocka_unit_test(test__f_memory_array_append__returns_data_not),
+ cmocka_unit_test(test__f_memory_arrays_adjust__returns_array_too_large),
+ cmocka_unit_test(test__f_memory_arrays_resize__returns_array_too_large),
+
cmocka_unit_test(test__f_memory_array_append_all__returns_data_not),
cmocka_unit_test(test__f_memory_array_decimate_by__returns_data_not),
cmocka_unit_test(test__f_memory_array_decrease_by__returns_data_not),
cmocka_unit_test(test__f_memory_array_increase_by__works),
cmocka_unit_test(test__f_memory_array_resize__works),
+ cmocka_unit_test(test__f_memory_arrays_adjust__works),
+ cmocka_unit_test(test__f_memory_arrays_resize__works),
+
#ifndef _di_level_0_parameter_checking_
cmocka_unit_test(test__f_memory_adjust__parameter_checking),
cmocka_unit_test(test__f_memory_delete__parameter_checking),
cmocka_unit_test(test__f_memory_array_increase__parameter_checking),
cmocka_unit_test(test__f_memory_array_increase_by__parameter_checking),
cmocka_unit_test(test__f_memory_array_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_memory_arrays_adjust__parameter_checking),
+ cmocka_unit_test(test__f_memory_arrays_resize__parameter_checking),
#endif // _di_level_0_parameter_checking_
};
return cmocka_run_group_tests(tests, setup, setdown);
}
+f_status_t test_memory_array_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
+
+ {
+ test_memory_array_t * const array = (test_memory_array_t *) void_array;
+ f_status_t status = F_none;
+
+ for (f_number_unsigned_t i = start; i < size; ++i) {
+
+ status = f_memory_array_adjust(0, sizeof(int), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
+ }
+
+ return F_none;
+}
+
#ifdef __cplusplus
} // extern "C"
#endif
#include "test-memory-array_increase.h"
#include "test-memory-array_increase_by.h"
#include "test-memory-array_resize.h"
+#include "test-memory-arrays_adjust.h"
+#include "test-memory-arrays_resize.h"
#include "test-memory-delete.h"
#include "test-memory-destroy.h"
#include "test-memory-new.h"
#define test_memory_array_t_initialize { 0, 0, 0 }
/**
+ * A structure used for testing the memory arrays functions.
+ */
+typedef struct {
+ test_memory_array_t *array;
+ f_number_unsigned_t used;
+ f_number_unsigned_t size;
+} test_memory_arrays_t;
+
+#define test_memory_arrays_t_initialize { 0, 0, 0 }
+
+/**
* Perform any setup operations.
*
* @param state
*/
extern int main(void);
+/**
+ * Callback for passing to f_memory_arrays functions.
+ */
+extern f_status_t test_memory_array_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+
#ifdef __cplusplus
} // extern "C"
#endif
#include "string.h"
#include "private-string.h"
-#include "string/private-dynamic.h"
#ifdef __cplusplus
extern "C" {
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#ifdef __cplusplus
extern "C" {
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-dynamics.h"
#ifdef __cplusplus
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-dynamics.h"
#include "private-dynamicss.h"
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#ifdef __cplusplus
extern "C" {
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-dynamics.h"
#include "private-map_multis.h"
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-dynamics.h"
#include "private-map_multis.h"
#include "private-map_multiss.h"
+++ /dev/null
-#include "../string.h"
-#include "../private-string.h"
-#include "private-dynamic.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: String
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_string_dynamic_h
-#define _PRIVATE_F_string_dynamic_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_string_dynamic_h
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-dynamics.h"
#ifdef __cplusplus
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-dynamics.h"
#include "private-dynamicss.h"
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-dynamics.h"
#include "private-map_multis.h"
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-dynamics.h"
#include "private-map_multis.h"
#include "private-map_multiss.h"
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-maps.h"
#ifdef __cplusplus
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-maps.h"
#include "private-mapss.h"
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-triples.h"
#ifdef __cplusplus
#include "../string.h"
#include "../private-string.h"
-#include "private-dynamic.h"
#include "private-triples.h"
#include "private-tripless.h"
build_sources_library string.c
build_sources_library private-string.c string/common.c
-build_sources_library string/private-dynamic.c string/private-dynamics.c string/private-dynamicss.c
+build_sources_library string/private-dynamics.c string/private-dynamicss.c
build_sources_library string/private-maps.c string/private-mapss.c
build_sources_library string/private-map_multis.c string/private-map_multiss.c
build_sources_library string/private-quantitys.c string/private-quantityss.c
#include "../type_array.h"
#include "cell.h"
-#include "private-cell.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_cells_adjust_
- f_status_t f_cells_adjust(const f_number_unsigned_t length, f_cells_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_cells_adjust_callback_
+ f_status_t f_cells_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(f_cell_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_cells_adjust_
-
-#ifndef _di_f_cells_append_
- f_status_t f_cells_append(const f_cell_t source, f_cells_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_cells_append(source, destination);
- }
-#endif // _di_f_cells_append_
-
-#ifndef _di_f_cells_append_all_
- f_status_t f_cells_append_all(const f_cells_t source, f_cells_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_cells_append_all(source, destination);
- }
-#endif // _di_f_cells_append_all_
-
-#ifndef _di_f_cells_decimate_by_
- f_status_t f_cells_decimate_by(const f_number_unsigned_t amount, f_cells_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(f_cell_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_cells_decimate_by_
-
-#ifndef _di_f_cells_decrease_by_
- f_status_t f_cells_decrease_by(const f_number_unsigned_t amount, f_cells_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(f_cell_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_cells_decrease_by_
-
-#ifndef _di_f_cells_increase_
- f_status_t f_cells_increase(const f_number_unsigned_t step, f_cells_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(f_cell_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_cells_increase_
-
-#ifndef _di_f_cells_increase_by_
- f_status_t f_cells_increase_by(const f_number_unsigned_t amount, f_cells_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(f_cell_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_cells_increase_by_
-
-#ifndef _di_f_cells_resize_
- f_status_t f_cells_resize(const f_number_unsigned_t length, f_cells_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(f_cell_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_cells_resize_
-
-#ifndef _di_f_cellss_adjust_
- f_status_t f_cellss_adjust(const f_number_unsigned_t length, f_cellss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_cellss_adjust(length, structure);
- }
-#endif // _di_f_cellss_adjust_
-
-#ifndef _di_f_cellss_append_
- f_status_t f_cellss_append(const f_cells_t source, f_cellss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_cells_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_cells_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_cells_t * const array = (f_cells_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_cellss_append_
-
-#ifndef _di_f_cellss_append_all_
- f_status_t f_cellss_append_all(const f_cellss_t source, f_cellss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_cells_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_cells_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(f_cell_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_cellss_append_all_
-
-#ifndef _di_f_cellss_decimate_by_
- f_status_t f_cellss_decimate_by(const f_number_unsigned_t amount, f_cellss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_cellss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_cellss_decimate_by_
-
-#ifndef _di_f_cellss_decrease_by_
- f_status_t f_cellss_decrease_by(const f_number_unsigned_t amount, f_cellss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_cellss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_cellss_decrease_by_
-
-#ifndef _di_f_cellss_increase_
- f_status_t f_cellss_increase(const f_number_unsigned_t step, f_cellss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_cellss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_cellss_increase_
-
-#ifndef _di_f_cellss_increase_by_
- f_status_t f_cellss_increase_by(const f_number_unsigned_t amount, f_cellss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_cells_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_cells_resize_callback_
+ f_status_t f_cells_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_cells_t * const array = (f_cells_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_cellss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(f_cell_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_cellss_increase_by_
-
-#ifndef _di_f_cellss_resize_
- f_status_t f_cellss_resize(const f_number_unsigned_t length, f_cellss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_cellss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_cellss_resize_
+#endif // _di_f_cells_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string cells array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_cellss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string cells array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_cells_adjust_
- extern f_status_t f_cells_adjust(const f_number_unsigned_t length, f_cells_t * const structure);
-#endif // _di_f_cells_adjust_
-
-/**
- * Append the single source cell onto the destination.
- *
- * @param source
- * The source cell to append.
- * @param destination
- * The destination cells the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_cells_append_
- extern f_status_t f_cells_append(const f_cell_t source, f_cells_t * const destination);
-#endif // _di_f_cells_append_
-
-/**
- * Append the source cells onto the destination.
- *
- * @param source
- * The source cells to append.
- * @param destination
- * The destination cells the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_cells_append_all_
- extern f_status_t f_cells_append_all(const f_cells_t source, f_cells_t * const destination);
-#endif // _di_f_cells_append_all_
-
-/**
- * Resize the string cells array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string cells array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_cells_decimate_by_
- extern f_status_t f_cells_decimate_by(const f_number_unsigned_t amount, f_cells_t * const structure);
-#endif // _di_f_cells_decimate_by_
-
-/**
- * Resize the string cells array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string cells array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_cells_decrease_by_
- extern f_status_t f_cells_decrease_by(const f_number_unsigned_t amount, f_cells_t * const structure);
-#endif // _di_f_cells_decrease_by_
-
-/**
- * Increase the size of the string cells array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string cells array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_cells_increase_
- extern f_status_t f_cells_increase(const f_number_unsigned_t step, f_cells_t * const structure);
-#endif // _di_f_cells_increase_
-
-/**
- * Resize the string cells array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string cells array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_cells_increase_by_
- extern f_status_t f_cells_increase_by(const f_number_unsigned_t amount, f_cells_t * const structure);
-#endif // _di_f_cells_increase_by_
-
-/**
- * Resize the string cells array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string cells array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_cells_resize_
- extern f_status_t f_cells_resize(const f_number_unsigned_t length, f_cells_t * const structure);
-#endif // _di_f_cells_resize_
-
-/**
- * Resize the string cellss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string cellss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_cellss_adjust_
- extern f_status_t f_cellss_adjust(const f_number_unsigned_t length, f_cellss_t * const structure);
-#endif // _di_f_cellss_adjust_
-
-/**
- * Append the single source cells onto the destination.
- *
- * @param source
- * The source cells to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_cellss_append_
- extern f_status_t f_cellss_append(const f_cells_t source, f_cellss_t * const destination);
-#endif // _di_f_cellss_append_
-
-/**
- * Append the source cellss onto the destination.
- *
- * @param source
- * The source cellss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_cellss_append_all_
- extern f_status_t f_cellss_append_all(const f_cellss_t source, f_cellss_t * const destination);
-#endif // _di_f_cellss_append_all_
-
-/**
- * Resize the string cellss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string cellss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_cellss_decimate_by_
- extern f_status_t f_cellss_decimate_by(const f_number_unsigned_t amount, f_cellss_t * const structure);
-#endif // _di_f_cellss_decimate_by_
-
-/**
- * Resize the string cellss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string cellss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_cellss_decrease_by_
- extern f_status_t f_cellss_decrease_by(const f_number_unsigned_t amount, f_cellss_t * const structure);
-#endif // _di_f_cellss_decrease_by_
+#ifndef _di_f_cells_adjust_callback_
+ extern f_status_t f_cells_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_cells_adjust_callback_
/**
- * Increase the size of the string cellss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_cellss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string cellss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_cellss_increase_
- extern f_status_t f_cellss_increase(const f_number_unsigned_t step, f_cellss_t * const structure);
-#endif // _di_f_cellss_increase_
-
-/**
- * Resize the string cellss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string cellss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_cellss_increase_by_
- extern f_status_t f_cellss_increase_by(const f_number_unsigned_t amount, f_cellss_t * const structure);
-#endif // _di_f_cellss_increase_by_
-
-/**
- * Resize the string cellss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string cellss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_cellss_resize_
- extern f_status_t f_cellss_resize(const f_number_unsigned_t length, f_cellss_t * const structure);
-#endif // _di_f_cellss_resize_
+#ifndef _di_f_cells_resize_callback_
+ extern f_status_t f_cells_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_cells_resize_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-/**
- * Macros for f_statuss_t, see type.h for typedefs.
- */
-#ifndef _di_f_statuss_t_
- #define macro_f_statuss_t_clear(statuss) macro_f_memory_structures_clear(statuss)
-
- #define macro_f_statuss_t_resize(status, statuss, length) status = f_statuss_resize(length, &statuss);
- #define macro_f_statuss_t_adjust(status, statuss, length) status = f_statuss_adjust(length, &statuss);
-
- #define macro_f_statuss_t_delete_simple(statuss) f_statuss_resize(0, &statuss);
- #define macro_f_statuss_t_destroy_simple(statuss) f_statuss_adjust(0, &statuss);
-
- #define macro_f_statuss_t_increase(status, step, statuss) status = f_statuss_increase(step, &statuss);
- #define macro_f_statuss_t_increase_by(status, statuss, amount) status = f_statuss_increase_by(amount, &statuss);
- #define macro_f_statuss_t_decrease_by(status, statuss, amount) status = f_statuss_decrease_by(amount, &statuss);
- #define macro_f_statuss_t_decimate_by(status, statuss, amount) status = f_statuss_decimate_by(amount, &statuss);
-#endif // _di_f_statuss_t_
-
-/**
- * Macros for f_statusss_t, see type.h for typedefs.
- */
-#ifndef _di_f_statusss_t_
- #define macro_f_statusss_t_clear(statusss) macro_f_memory_structures_clear(statusss)
-
- #define macro_f_statusss_t_resize(status, statusss, length) status = f_statusss_resize(length, &statusss);
- #define macro_f_statusss_t_adjust(status, statusss, length) status = f_statusss_adjust(length, &statusss);
-
- #define macro_f_statusss_t_delete_simple(statusss) f_statusss_resize(0, &statusss);
- #define macro_f_statusss_t_destroy_simple(statusss) f_statusss_adjust(0, &statusss);
-
- #define macro_f_statusss_t_increase(status, step, statusss) status = f_statusss_increase(step, &statusss);
- #define macro_f_statusss_t_increase_by(status, statusss, amount) status = f_statusss_increase_by(amount, &statusss);
- #define macro_f_statusss_t_decrease_by(status, statusss, amount) status = f_statusss_decrease_by(amount, &statusss);
- #define macro_f_statusss_t_decimate_by(status, statusss, amount) status = f_statusss_decimate_by(amount, &statusss);
-#endif // _di_f_statusss_t_
-
-/**
- * Macros for f_states_t, see type.h for typedefs.
- */
-#ifndef _di_f_states_t_
- #define macro_f_states_t_clear(states) macro_f_memory_structures_clear(states)
-
- #define macro_f_states_t_resize(status, states, length) status = f_states_resize(length, &states);
- #define macro_f_states_t_adjust(status, states, length) status = f_states_adjust(length, &states);
-
- #define macro_f_states_t_delete_simple(states) f_states_resize(0, &states);
- #define macro_f_states_t_destroy_simple(states) f_states_adjust(0, &states);
-
- #define macro_f_states_t_increase(status, step, states) status = f_states_increase(step, &states);
- #define macro_f_states_t_increase_by(status, states, amount) status = f_states_increase_by(amount, &states);
- #define macro_f_states_t_decrease_by(status, states, amount) status = f_states_decrease_by(amount, &states);
- #define macro_f_states_t_decimate_by(status, states, amount) status = f_states_decimate_by(amount, &states);
-#endif // _di_f_states_t_
-
-/**
- * Macros for f_statess_t, see type.h for typedefs.
- */
-#ifndef _di_f_statess_t_
- #define macro_f_statess_t_clear(statess) macro_f_memory_structures_clear(statess)
-
- #define macro_f_statess_t_resize(status, statess, length) status = f_statess_resize(length, &statess);
- #define macro_f_statess_t_adjust(status, statess, length) status = f_statess_adjust(length, &statess);
-
- #define macro_f_statess_t_delete_simple(statess) f_statess_resize(0, &statess);
- #define macro_f_statess_t_destroy_simple(statess) f_statess_adjust(0, &statess);
-
- #define macro_f_statess_t_increase(status, step, statess) status = f_statess_increase(step, &statess);
- #define macro_f_statess_t_increase_by(status, statess, amount) status = f_statess_increase_by(amount, &statess);
- #define macro_f_statess_t_decrease_by(status, statess, amount) status = f_statess_decrease_by(amount, &statess);
- #define macro_f_statess_t_decimate_by(status, statess, amount) status = f_statess_decimate_by(amount, &statess);
-#endif // _di_f_statess_t_
-
-/**
- * Macros for f_cells_t, see type.h for typedefs.
- */
-#ifndef _di_f_cells_t_
- #define macro_f_cells_t_clear(cells) macro_f_memory_structures_clear(cells)
-
- #define macro_f_cells_t_resize(status, cells, length) status = f_cells_resize(length, &cells);
- #define macro_f_cells_t_adjust(status, cells, length) status = f_cells_adjust(length, &cells);
-
- #define macro_f_cells_t_delete_simple(cells) f_cells_resize(0, &cells);
- #define macro_f_cells_t_destroy_simple(cells) f_cells_adjust(0, &cells);
-
- #define macro_f_cells_t_increase(status, step, cells) status = f_cells_increase(step, &cells);
- #define macro_f_cells_t_increase_by(status, cells, amount) status = f_cells_increase_by(amount, &cells);
- #define macro_f_cells_t_decrease_by(status, cells, amount) status = f_cells_decrease_by(amount, &cells);
- #define macro_f_cells_t_decimate_by(status, cells, amount) status = f_cells_decimate_by(amount, &cells);
-#endif // _di_f_cells_t_
-
-/**
- * Macros for f_cellss_t, see type.h for typedefs.
- */
-#ifndef _di_f_cellss_t_
- #define macro_f_cellss_t_clear(cellss) macro_f_memory_structures_clear(cellss)
-
- #define macro_f_cellss_t_resize(status, cellss, length) status = f_cellss_resize(length, &cellss);
- #define macro_f_cellss_t_adjust(status, cellss, length) status = f_cellss_adjust(length, &cellss);
-
- #define macro_f_cellss_t_delete_simple(cellss) f_cellss_resize(0, &cellss);
- #define macro_f_cellss_t_destroy_simple(cellss) f_cellss_adjust(0, &cellss);
-
- #define macro_f_cellss_t_increase(status, step, cellss) status = f_cellss_increase(step, &cellss);
- #define macro_f_cellss_t_increase_by(status, cellss, amount) status = f_cellss_increase_by(amount, &cellss);
- #define macro_f_cellss_t_decrease_by(status, cellss, amount) status = f_cellss_decrease_by(amount, &cellss);
- #define macro_f_cellss_t_decimate_by(status, cellss, amount) status = f_cellss_decimate_by(amount, &cellss);
-#endif // _di_f_cellss_t_
-
-/**
- * Macros for f_fll_ids_t, see type.h for typedefs.
- */
-#ifndef _di_f_fll_ids_t_
- #define macro_f_fll_ids_t_clear(fll_ids) macro_f_memory_structures_clear(fll_ids)
-
- #define macro_f_fll_ids_t_resize(status, fll_ids, length) status = f_fll_ids_resize(length, &fll_ids);
- #define macro_f_fll_ids_t_adjust(status, fll_ids, length) status = f_fll_ids_adjust(length, &fll_ids);
-
- #define macro_f_fll_ids_t_delete_simple(fll_ids) f_fll_ids_resize(0, &fll_ids);
- #define macro_f_fll_ids_t_destroy_simple(fll_ids) f_fll_ids_adjust(0, &fll_ids);
-
- #define macro_f_fll_ids_t_increase(status, step, fll_ids) status = f_fll_ids_increase(step, &fll_ids);
- #define macro_f_fll_ids_t_increase_by(status, fll_ids, amount) status = f_fll_ids_increase_by(amount, &fll_ids);
- #define macro_f_fll_ids_t_decrease_by(status, fll_ids, amount) status = f_fll_ids_decrease_by(amount, &fll_ids);
- #define macro_f_fll_ids_t_decimate_by(status, fll_ids, amount) status = f_fll_ids_decimate_by(amount, &fll_ids);
-#endif // _di_f_fll_ids_t_
-
-/**
- * Macros for f_fll_idss_t, see type.h for typedefs.
- */
-#ifndef _di_f_fll_idss_t_
- #define macro_f_fll_idss_t_clear(fll_idss) macro_f_memory_structures_clear(fll_idss)
-
- #define macro_f_fll_idss_t_resize(status, fll_idss, length) status = f_fll_idss_resize(length, &fll_idss);
- #define macro_f_fll_idss_t_adjust(status, fll_idss, length) status = f_fll_idss_adjust(length, &fll_idss);
-
- #define macro_f_fll_idss_t_delete_simple(fll_idss) f_fll_idss_resize(0, &fll_idss);
- #define macro_f_fll_idss_t_destroy_simple(fll_idss) f_fll_idss_adjust(0, &fll_idss);
-
- #define macro_f_fll_idss_t_increase(status, step, fll_idss) status = f_fll_idss_increase(step, &fll_idss);
- #define macro_f_fll_idss_t_increase_by(status, fll_idss, amount) status = f_fll_idss_increase_by(amount, &fll_idss);
- #define macro_f_fll_idss_t_decrease_by(status, fll_idss, amount) status = f_fll_idss_decrease_by(amount, &fll_idss);
- #define macro_f_fll_idss_t_decimate_by(status, fll_idss, amount) status = f_fll_idss_decimate_by(amount, &fll_idss);
-#endif // _di_f_fll_idss_t_
-
-/**
- * Macros for f_number_unsigneds_t, see type.h for typedefs.
- */
-#ifndef _di_f_number_unsignedss_t_
- #define macro_f_number_unsignedss_t_clear(lengthss) macro_f_memory_structures_clear(lengthss)
-
- #define macro_f_number_unsignedss_t_resize(status, lengths, length) status = f_number_unsignedss_resize(length, &lengths);
- #define macro_f_number_unsignedss_t_adjust(status, lengths, length) status = f_number_unsignedss_adjust(length, &lengths);
-
- #define macro_f_number_unsignedss_t_delete_simple(lengths) f_number_unsignedss_resize(0, &lengths);
- #define macro_f_number_unsignedss_t_destroy_simple(lengths) f_number_unsignedss_adjust(0, &lengths);
-
- #define macro_f_number_unsignedss_t_increase(status, step, lengths) status = f_number_unsignedss_increase(step, &lengths);
- #define macro_f_number_unsignedss_t_increase_by(status, lengths, amount) status = f_number_unsignedss_increase_by(amount, &lengths);
- #define macro_f_number_unsignedss_t_decrease_by(status, lengths, amount) status = f_number_unsignedss_decrease_by(amount, &lengths);
- #define macro_f_number_unsignedss_t_decimate_by(status, lengths, amount) status = f_number_unsignedss_decimate_by(amount, &lengths);
-#endif // _di_f_number_unsignedss_t_
-
-/**
- * Macros for int8_t, see type.h for typedefs.
- */
-#ifndef _di_f_int8_t_
- #define macro_f_int8s_t_clear(int8s) macro_f_memory_structures_clear(int8s)
-
- #define macro_f_int8s_t_resize(status, int8s, length) status = f_int8s_resize(length, &int8s);
- #define macro_f_int8s_t_adjust(status, int8s, length) status = f_int8s_adjust(length, &int8s);
-
- #define macro_f_int8s_t_increase(status, step, int8s) status = f_int8s_increase(step, &int8s);
- #define macro_f_int8s_t_increase_by(status, int8s, amount) status = f_int8s_increase_by(amount, &int8s);
- #define macro_f_int8s_t_decrease_by(status, int8s, amount) status = f_int8s_decrease_by(amount, &int8s);
- #define macro_f_int8s_t_decimate_by(status, int8s, amount) status = f_int8s_decimate_by(amount, &int8s);
-
- #define macro_f_int8s_t_delete_simple(int8s) f_int8s_resize(0, &int8s);
- #define macro_f_int8s_t_destroy_simple(int8s) f_int8s_adjust(0, &int8s);
-#endif // _di_f_int8_t_
-
-/**
- * Macros for f_int8s_t, see type.h for typedefs.
- */
-#ifndef _di_f_int8ss_t_
- #define macro_f_int8ss_t_clear(int8ss) macro_f_memory_structures_clear(int8ss)
-
- #define macro_f_int8ss_t_resize(status, int8ss, length) status = f_int8ss_resize(length, &int8ss);
- #define macro_f_int8ss_t_adjust(status, int8ss, length) status = f_int8ss_adjust(length, &int8ss);
-
- #define macro_f_int8ss_t_increase(status, step, int8ss) status = f_int8ss_increase(step, &int8ss);
- #define macro_f_int8ss_t_increase_by(status, int8ss, amount) status = f_int8ss_increase_by(amount, &int8ss);
- #define macro_f_int8ss_t_decrease_by(status, int8ss, amount) status = f_int8ss_decrease_by(amount, &int8ss);
- #define macro_f_int8ss_t_decimate_by(status, int8ss, amount) status = f_int8ss_decimate_by(amount, &int8ss);
-
- #define macro_f_int8ss_t_delete_simple(int8ss) f_int8ss_resize(0, &int8ss);
- #define macro_f_int8ss_t_destroy_simple(int8ss) f_int8ss_adjust(0, &int8ss);
-#endif // _di_f_int8ss_t_
-
-/**
- * Macros for f_uint8s_t, see type.h for typedefs.
- */
-#ifndef _di_f_uint8s_t_
- #define macro_f_uint8s_t_clear(uint8s) macro_f_memory_structures_clear(uint8s)
-
- #define macro_f_uint8s_t_resize(status, uint8s, length) status = f_uint8s_resize(length, &uint8s);
- #define macro_f_uint8s_t_adjust(status, uint8s, length) status = f_uint8s_adjust(length, &uint8s);
-
- #define macro_f_uint8s_t_delete_simple(uint8s) f_uint8s_resize(0, &uint8s);
- #define macro_f_uint8s_t_destroy_simple(uint8s) f_uint8s_adjust(0, &uint8s);
-
- #define macro_f_uint8s_t_increase(status, step, uint8s) status = f_uint8s_increase(step, &uint8s);
- #define macro_f_uint8s_t_increase_by(status, uint8s, amount) status = f_uint8s_increase_by(amount, &uint8s);
- #define macro_f_uint8s_t_decrease_by(status, uint8s, amount) status = f_uint8s_decrease_by(amount, &uint8s);
- #define macro_f_uint8s_t_decimate_by(status, uint8s, amount) status = f_uint8s_decimate_by(amount, &uint8s);
-#endif // _di_f_uint8s_t_
-
-/**
- * Macros for f_uint8ss_t, see type.h for typedefs.
- */
-#ifndef _di_f_uint8ss_t_
- #define macro_f_uint8ss_t_clear(uint8ss) macro_f_memory_structures_clear(uint8ss)
-
- #define macro_f_uint8ss_t_resize(status, uint8ss, length) status = f_uint8ss_resize(length, &uint8ss);
- #define macro_f_uint8ss_t_adjust(status, uint8ss, length) status = f_uint8ss_adjust(length, &uint8ss);
-
- #define macro_f_uint8ss_t_delete_simple(uint8ss) f_uint8ss_resize(0, &uint8ss);
- #define macro_f_uint8ss_t_destroy_simple(uint8ss) f_uint8ss_adjust(0, &uint8ss);
-
- #define macro_f_uint8ss_t_increase(status, step, uint8ss) status = f_uint8ss_increase(step, &uint8ss);
- #define macro_f_uint8ss_t_increase_by(status, uint8ss, amount) status = f_uint8ss_increase_by(amount, &uint8ss);
- #define macro_f_uint8ss_t_decrease_by(status, uint8ss, amount) status = f_uint8ss_decrease_by(amount, &uint8ss);
- #define macro_f_uint8ss_t_decimate_by(status, uint8ss, amount) status = f_uint8ss_decimate_by(amount, &uint8ss);
-#endif // _di_f_uint8ss_t_
-
-/**
- * Macros for f_int16s_t, see type.h for typedefs.
- */
-#ifndef _di_f_int16s_t_
- #define macro_f_int16s_t_clear(int16s) macro_f_memory_structures_clear(int16s)
-
- #define macro_f_int16s_t_resize(status, int16s, length) status = f_int16s_resize(length, &int16s);
- #define macro_f_int16s_t_adjust(status, int16s, length) status = f_int16s_adjust(length, &int16s);
-
- #define macro_f_int16s_t_increase(status, step, int16s) status = f_int16s_increase(step, &int16s);
- #define macro_f_int16s_t_increase_by(status, int16s, amount) status = f_int16s_increase_by(amount, &int16s);
- #define macro_f_int16s_t_decrease_by(status, int16s, amount) status = f_int16s_decrease_by(amount, &int16s);
- #define macro_f_int16s_t_decimate_by(status, int16s, amount) status = f_int16s_decimate_by(amount, &int16s);
-
- #define macro_f_int16s_t_delete_simple(int16s) f_int16s_resize(0, &int16s);
- #define macro_f_int16s_t_destroy_simple(int16s) f_int16s_adjust(0, &int16s);
-#endif // _di_f_int16s_t_
-
-/**
- * Macros for f_int16ss_t, see type.h for typedefs.
- */
-#ifndef _di_f_int16ss_t_
- #define macro_f_int16ss_t_clear(int16ss) macro_f_memory_structures_clear(int16ss)
-
- #define macro_f_int16ss_t_resize(status, int16ss, length) status = f_int16ss_resize(length, &int16ss);
- #define macro_f_int16ss_t_adjust(status, int16ss, length) status = f_int16ss_adjust(length, &int16ss);
-
- #define macro_f_int16ss_t_increase(status, step, int16ss) status = f_int16ss_increase(step, &int16ss);
- #define macro_f_int16ss_t_increase_by(status, int16ss, amount) status = f_int16ss_increase_by(amount, &int16ss);
- #define macro_f_int16ss_t_decrease_by(status, int16ss, amount) status = f_int16ss_decrease_by(amount, &int16ss);
- #define macro_f_int16ss_t_decimate_by(status, int16ss, amount) status = f_int16ss_decimate_by(amount, &int16ss);
-
- #define macro_f_int16ss_t_delete_simple(int16ss) f_int16ss_resize(0, &int16ss);
- #define macro_f_int16ss_t_destroy_simple(int16ss) f_int16ss_adjust(0, &int16ss);
-#endif // _di_f_int16ss_t_
-
-/**
- * Macros for f_uint16s_t, see type.h for typedefs.
- */
-#ifndef _di_f_uint16s_t_
- #define macro_f_uint16s_t_clear(uint16s) macro_f_memory_structures_clear(uint16s)
-
- #define macro_f_uint16s_t_resize(status, uint16s, length) status = f_uint16s_resize(length, &uint16s);
- #define macro_f_uint16s_t_adjust(status, uint16s, length) status = f_uint16s_adjust(length, &uint16s);
-
- #define macro_f_uint16s_t_delete_simple(uint16s) f_uint16s_resize(0, &uint16s);
- #define macro_f_uint16s_t_destroy_simple(uint16s) f_uint16s_adjust(0, &uint16s);
-
- #define macro_f_uint16s_t_increase(status, step, uint16s) status = f_uint16s_increase(step, &uint16s);
- #define macro_f_uint16s_t_increase_by(status, uint16s, amount) status = f_uint16s_increase_by(amount, &uint16s);
- #define macro_f_uint16s_t_decrease_by(status, uint16s, amount) status = f_uint16s_decrease_by(amount, &uint16s);
- #define macro_f_uint16s_t_decimate_by(status, uint16s, amount) status = f_uint16s_decimate_by(amount, &uint16s);
-#endif // _di_f_uint16s_t_
-
-/**
- * Macros for f_uint16ss_t, see type.h for typedefs.
- */
-#ifndef _di_f_uint16ss_t_
- #define macro_f_uint16ss_t_clear(uint16ss) macro_f_memory_structures_clear(uint16ss)
-
- #define macro_f_uint16ss_t_resize(status, uint16ss, length) status = f_uint16ss_resize(length, &uint16ss);
- #define macro_f_uint16ss_t_adjust(status, uint16ss, length) status = f_uint16ss_adjust(length, &uint16ss);
-
- #define macro_f_uint16ss_t_delete_simple(uint16ss) f_uint16ss_resize(0, &uint16ss);
- #define macro_f_uint16ss_t_destroy_simple(uint16ss) f_uint16ss_adjust(0, &uint16ss);
-
- #define macro_f_uint16ss_t_increase(status, step, uint16ss) status = f_uint16ss_increase(step, &uint16ss);
- #define macro_f_uint16ss_t_increase_by(status, uint16ss, amount) status = f_uint16ss_increase_by(amount, &uint16ss);
- #define macro_f_uint16ss_t_decrease_by(status, uint16ss, amount) status = f_uint16ss_decrease_by(amount, &uint16ss);
- #define macro_f_uint16ss_t_decimate_by(status, uint16ss, amount) status = f_uint16ss_decimate_by(amount, &uint16ss);
-#endif // _di_f_uint16ss_t_
-
-/**
- * Macros for f_int32s_t, see type.h for typedefs.
- */
-#ifndef _di_f_int32s_t_
- #define macro_f_int32s_t_clear(int32s) macro_f_memory_structures_clear(int32s)
-
- #define macro_f_int32s_t_resize(status, int32s, length) status = f_int32s_resize(length, &int32s);
- #define macro_f_int32s_t_adjust(status, int32s, length) status = f_int32s_adjust(length, &int32s);
-
- #define macro_f_int32s_t_delete_simple(int32s) f_int32s_resize(0, &int32s);
- #define macro_f_int32s_t_destroy_simple(int32s) f_int32s_adjust(0, &int32s);
-
- #define macro_f_int32s_t_increase(status, step, int32s) status = f_int32s_increase(step, &int32s);
- #define macro_f_int32s_t_increase_by(status, int32s, amount) status = f_int32s_increase_by(amount, &int32s);
- #define macro_f_int32s_t_decrease_by(status, int32s, amount) status = f_int32s_decrease_by(amount, &int32s);
- #define macro_f_int32s_t_decimate_by(status, int32s, amount) status = f_int32s_decimate_by(amount, &int32s);
-#endif // _di_f_int32s_t_
-
-/**
- * Macros for f_number_unsigneds_t, see type.h for typedefs.
- */
-#ifndef _di_f_int32ss_t_
- #define macro_f_int32ss_t_clear(int32ss) macro_f_memory_structures_clear(int32ss)
-
- #define macro_f_int32ss_t_resize(status, int32ss, length) status = f_int32ss_resize(length, &int32ss);
- #define macro_f_int32ss_t_adjust(status, int32ss, length) status = f_int32ss_adjust(length, &int32ss);
-
- #define macro_f_int32ss_t_delete_simple(int32ss) f_int32ss_resize(0, &int32ss);
- #define macro_f_int32ss_t_destroy_simple(int32ss) f_int32ss_adjust(0, &int32ss);
-
- #define macro_f_int32ss_t_increase(status, step, int32ss) status = f_int32ss_increase(step, &int32ss);
- #define macro_f_int32ss_t_increase_by(status, int32ss, amount) status = f_int32ss_increase_by(amount, &int32ss);
- #define macro_f_int32ss_t_decrease_by(status, int32ss, amount) status = f_int32ss_decrease_by(amount, &int32ss);
- #define macro_f_int32ss_t_decimate_by(status, int32ss, amount) status = f_int32ss_decimate_by(amount, &int32ss);
-#endif // _di_f_int32ss_t_
-
-/**
- * Macros for f_uint32s_t, see type.h for typedefs.
- */
-#ifndef _di_f_uint32s_t_
- #define macro_f_uint32s_t_clear(uint32s) macro_f_memory_structures_clear(uint32s)
-
- #define macro_f_uint32s_t_resize(status, uint32s, length) status = f_uint32s_resize(length, &uint32s);
- #define macro_f_uint32s_t_adjust(status, uint32s, length) status = f_uint32s_adjust(length, &uint32s);
-
- #define macro_f_uint32s_t_delete_simple(uint32s) f_uint32s_resize(0, &uint32s);
- #define macro_f_uint32s_t_destroy_simple(uint32s) f_uint32s_adjust(0, &uint32s);
-
- #define macro_f_uint32s_t_increase(status, step, uint32s) status = f_uint32s_increase(step, &uint32s);
- #define macro_f_uint32s_t_increase_by(status, uint32s, amount) status = f_uint32s_increase_by(amount, &uint32s);
- #define macro_f_uint32s_t_decrease_by(status, uint32s, amount) status = f_uint32s_decrease_by(amount, &uint32s);
- #define macro_f_uint32s_t_decimate_by(status, uint32s, amount) status = f_uint32s_decimate_by(amount, &uint32s);
-#endif // _di_f_uint32s_t_
-
-/**
- * Macros for f_uint32ss_t, see type.h for typedefs.
- */
-#ifndef _di_f_uint32ss_t_
- #define macro_f_uint32ss_t_clear(uint32ss) macro_f_memory_structures_clear(uint32ss)
-
- #define macro_f_uint32ss_t_resize(status, uint32ss, length) status = f_uint32ss_resize(length, &uint32ss);
- #define macro_f_uint32ss_t_adjust(status, uint32ss, length) status = f_uint32ss_adjust(length, &uint32ss);
-
- #define macro_f_uint32ss_t_delete_simple(uint32ss) f_uint32ss_resize(0, &uint32ss);
- #define macro_f_uint32ss_t_destroy_simple(uint32ss) f_uint32ss_adjust(0, &uint32ss);
-
- #define macro_f_uint32ss_t_increase(status, step, uint32ss) status = f_uint32ss_increase(step, &uint32ss);
- #define macro_f_uint32ss_t_increase_by(status, uint32ss, amount) status = f_uint32ss_increase_by(amount, &uint32ss);
- #define macro_f_uint32ss_t_decrease_by(status, uint32ss, amount) status = f_uint32ss_decrease_by(amount, &uint32ss);
- #define macro_f_uint32ss_t_decimate_by(status, uint32ss, amount) status = f_uint32ss_decimate_by(amount, &uint32ss);
-#endif // _di_f_uint32ss_t_
-
-/**
- * Macros for f_int64s_t, see type.h for typedefs.
- */
-#ifndef _di_f_int64s_t_
- #define macro_f_int64s_t_clear(int64s) macro_f_memory_structures_clear(int64s)
-
- #define macro_f_int64s_t_resize(status, int64s, length) status = f_int64s_resize(length, &int64s);
- #define macro_f_int64s_t_adjust(status, int64s, length) status = f_int64s_adjust(length, &int64s);
-
- #define macro_f_int64s_t_increase(status, step, int64s) status = f_int64s_increase(step, &int64s);
- #define macro_f_int64s_t_increase_by(status, int64s, amount) status = f_int64s_increase_by(amount, &int64s);
- #define macro_f_int64s_t_decrease_by(status, int64s, amount) status = f_int64s_decrease_by(amount, &int64s);
- #define macro_f_int64s_t_decimate_by(status, int64s, amount) status = f_int64s_decimate_by(amount, &int64s);
-
- #define macro_f_int64s_t_delete_simple(int64s) f_int64s_resize(0, &int64s);
- #define macro_f_int64s_t_destroy_simple(int64s) f_int64s_adjust(0, &int64s);
-#endif // _di_f_int64s_t_
-
-/**
- * Macros for f_int64ss_t, see type.h for typedefs.
- */
-#ifndef _di_f_int64ss_t_
- #define macro_f_int64ss_t_clear(int64ss) macro_f_memory_structures_clear(int64ss)
-
- #define macro_f_int64ss_t_resize(status, int64ss, length) status = f_int64ss_resize(length, &int64ss);
- #define macro_f_int64ss_t_adjust(status, int64ss, length) status = f_int64ss_adjust(length, &int64ss);
-
- #define macro_f_int64ss_t_increase(status, step, int64ss) status = f_int64ss_increase(step, &int64ss);
- #define macro_f_int64ss_t_increase_by(status, int64ss, amount) status = f_int64ss_increase_by(amount, &int64ss);
- #define macro_f_int64ss_t_decrease_by(status, int64ss, amount) status = f_int64ss_decrease_by(amount, &int64ss);
- #define macro_f_int64ss_t_decimate_by(status, int64ss, amount) status = f_int64ss_decimate_by(amount, &int64ss);
-
- #define macro_f_int64ss_t_delete_simple(int64ss) f_int64ss_resize(0, &int64ss);
- #define macro_f_int64ss_t_destroy_simple(int64ss) f_int64ss_adjust(0, &int64ss);
-#endif // _di_f_int64ss_t_
-
-/**
- * Macros for f_uint64s_t, see type.h for typedefs.
- */
-#ifndef _di_f_uint64s_t_
- #define macro_f_uint64s_t_clear(uint64s) macro_f_memory_structures_clear(uint64s)
-
- #define macro_f_uint64s_t_resize(status, uint64s, length) status = f_uint64s_resize(length, &uint64s);
- #define macro_f_uint64s_t_adjust(status, uint64s, length) status = f_uint64s_adjust(length, &uint64s);
-
- #define macro_f_uint64s_t_increase(status, step, uint64s) status = f_uint64s_increase(step, &uint64s);
- #define macro_f_uint64s_t_increase_by(status, uint64s, amount) status = f_uint64s_increase_by(amount, &uint64s);
- #define macro_f_uint64s_t_decrease_by(status, uint64s, amount) status = f_uint64s_decrease_by(amount, &uint64s);
- #define macro_f_uint64s_t_decimate_by(status, uint64s, amount) status = f_uint64s_decimate_by(amount, &uint64s);
-
- #define macro_f_uint64s_t_delete_simple(uint64s) f_uint64s_resize(0, &uint64s);
- #define macro_f_uint64s_t_destroy_simple(uint64s) f_uint64s_adjust(0, &uint64s);
-#endif // _di_f_uint64s_t_
-
-/**
- * Macros for f_uint64ss_t, see type.h for typedefs.
- */
-#ifndef _di_f_uint64ss_t_
- #define macro_f_uint64ss_t_clear(uint64ss) macro_f_memory_structures_clear(uint64ss)
-
- #define macro_f_uint64ss_t_resize(status, uint64ss, length) status = f_uint64ss_resize(length, &uint64ss);
- #define macro_f_uint64ss_t_adjust(status, uint64ss, length) status = f_uint64ss_adjust(length, &uint64ss);
-
- #define macro_f_uint64ss_t_increase(status, step, uint64ss) status = f_uint64ss_increase(step, &uint64ss);
- #define macro_f_uint64ss_t_increase_by(status, uint64ss, amount) status = f_uint64ss_increase_by(amount, &uint64ss);
- #define macro_f_uint64ss_t_decrease_by(status, uint64ss, amount) status = f_uint64ss_decrease_by(amount, &uint64ss);
- #define macro_f_uint64ss_t_decimate_by(status, uint64ss, amount) status = f_uint64ss_decimate_by(amount, &uint64ss);
-
- #define macro_f_uint64ss_t_delete_simple(uint64ss) f_uint64ss_resize(0, &uint64ss);
- #define macro_f_uint64ss_t_destroy_simple(uint64ss) f_uint64ss_adjust(0, &uint64ss);
-#endif // _di_f_uint64ss_t_
-
-/**
- * Macros for f_int128s_t, see type.h for typedefs.
- */
-#ifndef _di_f_int128s_t_
- #define macro_f_int128s_t_clear(int128s) macro_f_memory_structures_clear(int128s)
-
- #define macro_f_int128s_t_resize(status, int128s, length) status = f_int128s_resize(length, &int128s);
- #define macro_f_int128s_t_adjust(status, int128s, length) status = f_int128s_adjust(length, &int128s);
-
- #define macro_f_int128s_t_delete_simple(int128s) f_int128s_resize(0, &int128s);
- #define macro_f_int128s_t_destroy_simple(int128s) f_int128s_adjust(0, &int128s);
-
- #define macro_f_int128s_t_increase(status, step, int128s) status = f_int128s_increase(step, &int128s);
- #define macro_f_int128s_t_increase_by(status, int128s, amount) status = f_int128s_increase_by(amount, &int128s);
- #define macro_f_int128s_t_decrease_by(status, int128s, amount) status = f_int128s_decrease_by(amount, &int128s);
- #define macro_f_int128s_t_decimate_by(status, int128s, amount) status = f_int128s_decimate_by(amount, &int128s);
-#endif // _di_f_int128s_t_
-
-/**
- * Macros for f_int128ss_t, see type.h for typedefs.
- */
-#ifndef _di_f_int128ss_t_
- #define macro_f_int128ss_t_clear(int128ss) macro_f_memory_structures_clear(int128ss)
-
- #define macro_f_int128ss_t_resize(status, int128ss, length) status = f_int128ss_resize(length, &int128ss);
- #define macro_f_int128ss_t_adjust(status, int128ss, length) status = f_int128ss_adjust(length, &int128ss);
-
- #define macro_f_int128ss_t_delete_simple(int128ss) f_int128ss_resize(0, &int128ss);
- #define macro_f_int128ss_t_destroy_simple(int128ss) f_int128ss_adjust(0, &int128ss);
-
- #define macro_f_int128ss_t_increase(status, step, int128ss) status = f_int128ss_increase(step, &int128ss);
- #define macro_f_int128ss_t_increase_by(status, int128ss, amount) status = f_int128ss_increase_by(amount, &int128ss);
- #define macro_f_int128ss_t_decrease_by(status, int128ss, amount) status = f_int128ss_decrease_by(amount, &int128ss);
- #define macro_f_int128ss_t_decimate_by(status, int128ss, amount) status = f_int128ss_decimate_by(amount, &int128ss);
-#endif // _di_f_int128ss_t_
-
-/**
- * Macros for f_uint128s_t, see type.h for typedefs.
- */
-#ifndef _di_f_uint128s_t_
- #define macro_f_uint128s_t_clear(uint128s) macro_f_memory_structures_clear(uint128s)
-
- #define macro_f_uint128s_t_resize(status, uint128s, length) status = f_uint128s_resize(length, &uint128s);
- #define macro_f_uint128s_t_adjust(status, uint128s, length) status = f_uint128s_adjust(length, &uint128s);
-
- #define macro_f_uint128s_t_delete_simple(uint128s) f_uint128s_resize(0, &uint128s);
- #define macro_f_uint128s_t_destroy_simple(uint128s) f_uint128s_adjust(0, &uint128s);
-
- #define macro_f_uint128s_t_increase(status, step, uint128s) status = f_uint128s_increase(step, &uint128s);
- #define macro_f_uint128s_t_increase_by(status, uint128s, amount) status = f_uint128s_increase_by(amount, &uint128s);
- #define macro_f_uint128s_t_decrease_by(status, uint128s, amount) status = f_uint128s_decrease_by(amount, &uint128s);
- #define macro_f_uint128s_t_decimate_by(status, uint128s, amount) status = f_uint128s_decimate_by(amount, &uint128s);
-#endif // _di_f_uint128s_t_
-
-/**
- * Macros for f_uint128ss_t, see type.h for typedefs.
- */
-#ifndef _di_f_uint128ss_t_
- #define macro_f_uint128ss_t_clear(uint128ss) macro_f_memory_structures_clear(uint128ss)
-
- #define macro_f_uint128ss_t_resize(status, uint128ss, length) status = f_uint128ss_resize(length, &uint128ss);
- #define macro_f_uint128ss_t_adjust(status, uint128ss, length) status = f_uint128ss_adjust(length, &uint128ss);
-
- #define macro_f_uint128ss_t_delete_simple(uint128ss) f_uint128ss_resize(0, &uint128ss);
- #define macro_f_uint128ss_t_destroy_simple(uint128ss) f_uint128ss_adjust(0, &uint128ss);
-
- #define macro_f_uint128ss_t_increase(status, step, uint128ss) status = f_uint128ss_increase(step, &uint128ss);
- #define macro_f_uint128ss_t_increase_by(status, uint128ss, amount) status = f_uint128ss_increase_by(amount, &uint128ss);
- #define macro_f_uint128ss_t_decrease_by(status, uint128ss, amount) status = f_uint128ss_decrease_by(amount, &uint128ss);
- #define macro_f_uint128ss_t_decimate_by(status, uint128ss, amount) status = f_uint128ss_decimate_by(amount, &uint128ss);
-#endif // _di_f_uint128ss_t_
-
#ifdef __cplusplus
} // extern "C"
#endif
#include "../type_array.h"
#include "../type_array_file.h"
#include "file.h"
-#include "private-file.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_files_adjust_
- f_status_t f_files_adjust(const f_number_unsigned_t length, f_files_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_adjust(length, sizeof(f_file_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_files_adjust_
-
-#ifndef _di_f_files_append_
- f_status_t f_files_append(const f_file_t source, f_files_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_files_append(source, destination);
- }
-#endif // _di_f_files_append_
-
-#ifndef _di_f_files_append_all_
- f_status_t f_files_append_all(const f_files_t source, f_files_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_files_append_all(source, destination);
- }
-#endif // _di_f_files_append_all_
-
-#ifndef _di_f_files_decimate_by_
- f_status_t f_files_decimate_by(const f_number_unsigned_t amount, f_files_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(f_file_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_files_decimate_by_
-
-#ifndef _di_f_files_decrease_by_
- f_status_t f_files_decrease_by(const f_number_unsigned_t amount, f_files_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(f_file_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_files_decrease_by_
-
-#ifndef _di_f_files_increase_
- f_status_t f_files_increase(const f_number_unsigned_t step, f_files_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(f_file_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_files_increase_
-
-#ifndef _di_f_files_increase_by_
- f_status_t f_files_increase_by(const f_number_unsigned_t amount, f_files_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(f_file_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_files_increase_by_
-
-#ifndef _di_f_files_resize_
- f_status_t f_files_resize(const f_number_unsigned_t length, f_files_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(f_file_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_files_resize_
-
-#ifndef _di_f_filess_adjust_
- f_status_t f_filess_adjust(const f_number_unsigned_t length, f_filess_t * const filess) {
- #ifndef _di_level_0_parameter_checking_
- if (!filess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_filess_adjust(length, filess);
- }
-#endif // _di_f_filess_adjust_
-
-#ifndef _di_f_filess_append_
- f_status_t f_filess_append(const f_files_t source, f_filess_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_files_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_files_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
-
- return F_none;
- }
-#endif // _di_f_filess_append_
-
-#ifndef _di_f_filess_append_all_
- f_status_t f_filess_append_all(const f_filess_t source, f_filess_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = F_none;
+#ifndef _di_f_files_adjust_callback_
+ f_status_t f_files_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
{
- status = f_memory_array_increase_by(source.used, sizeof(f_files_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
+ f_files_t * const array = (f_files_t *) void_array;
+ f_status_t status = F_none;
- destination->array[destination->used].used = 0;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- if (source.array[i].used) {
- status = private_f_files_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(f_file_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_filess_append_all_
-
-#ifndef _di_f_filess_decimate_by_
- f_status_t f_filess_decimate_by(const f_number_unsigned_t amount, f_filess_t * const filess) {
- #ifndef _di_level_0_parameter_checking_
- if (!filess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_filess_adjust((filess->size - amount > 0) ? filess->size - amount : 0, filess);
- }
-#endif // _di_f_filess_decimate_by_
-
-#ifndef _di_f_filess_decrease_by_
- f_status_t f_filess_decrease_by(const f_number_unsigned_t amount, f_filess_t * const filess) {
- #ifndef _di_level_0_parameter_checking_
- if (!filess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_filess_resize((filess->size - amount > 0) ? filess->size - amount : 0, filess);
- }
-#endif // _di_f_filess_decrease_by_
-
-#ifndef _di_f_filess_increase_
- f_status_t f_filess_increase(const f_number_unsigned_t step, f_filess_t * const filess) {
- #ifndef _di_level_0_parameter_checking_
- if (!filess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && filess->used + 1 > filess->size) {
- f_number_unsigned_t length = filess->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (filess->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_filess_resize(length, filess);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_filess_increase_
+#endif // _di_f_files_adjust_callback_
-#ifndef _di_f_filess_increase_by_
- f_status_t f_filess_increase_by(const f_number_unsigned_t amount, f_filess_t * const filess) {
- #ifndef _di_level_0_parameter_checking_
- if (!filess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_files_resize_callback_
+ f_status_t f_files_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- if (!amount) return F_data_not;
+ {
+ f_files_t * const array = (f_files_t *) void_array;
+ f_status_t status = F_none;
- if (filess->used + amount > filess->size) {
- if (filess->used + amount > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_filess_resize(filess->used + amount, filess);
+ status = f_memory_array_resize(0, sizeof(f_file_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_filess_increase_by_
-
-#ifndef _di_f_filess_resize_
- f_status_t f_filess_resize(const f_number_unsigned_t length, f_filess_t * const filess) {
- #ifndef _di_level_0_parameter_checking_
- if (!filess) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_filess_resize(length, filess);
+ return F_none;
}
-#endif // _di_f_filess_resize_
+#endif // _di_f_files_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the files array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_filess_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The files array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_files_adjust_
- extern f_status_t f_files_adjust(const f_number_unsigned_t length, f_files_t * const structure);
-#endif // _di_f_files_adjust_
-
-/**
- * Append the single source file onto the destination.
- *
- * @param source
- * The source file to append.
- * @param destination
- * The destination files the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_files_append_
- extern f_status_t f_files_append(const f_file_t source, f_files_t * const destination);
-#endif // _di_f_files_append_
-
-/**
- * Append the source files onto the destination.
- *
- * @param source
- * The source files to append.
- * @param destination
- * The destination files the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_files_append_all_
- extern f_status_t f_files_append_all(const f_files_t source, f_files_t * const destination);
-#endif // _di_f_files_append_all_
-
-/**
- * Resize the files array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param files
- * The files array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_adjust().
- *
- * @see f_memory_array_adjust()
- */
-#ifndef _di_f_files_decimate_by_
- extern f_status_t f_files_decimate_by(const f_number_unsigned_t amount, f_files_t * const structure);
-#endif // _di_f_files_decimate_by_
-
-/**
- * Resize the files array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param files
- * The files array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_files_decrease_by_
- extern f_status_t f_files_decrease_by(const f_number_unsigned_t amount, f_files_t * const files);
-#endif // _di_f_files_decrease_by_
-
-/**
- * Increase the size of the files array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param files
- * The files array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_files_increase_
- extern f_status_t f_files_increase(const f_number_unsigned_t step, f_files_t * const files);
-#endif // _di_f_files_increase_
-
-/**
- * Resize the files array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param files
- * The files array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_files_increase_by_
- extern f_status_t f_files_increase_by(const f_number_unsigned_t amount, f_files_t * const files);
-#endif // _di_f_files_increase_by_
-
-/**
- * Resize the files array.
- *
- * @param length
- * The new size to use.
- * @param files
- * The files array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_files_resize_
- extern f_status_t f_files_resize(const f_number_unsigned_t length, f_files_t * const files);
-#endif // _di_f_files_resize_
-
-/**
- * Resize the filess array.
- *
- * @param length
- * The new size to use.
- * @param filess
- * The filess array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_filess_adjust_
- extern f_status_t f_filess_adjust(const f_number_unsigned_t length, f_filess_t * const filess);
-#endif // _di_f_filess_adjust_
-
-/**
- * Append the single source files onto the destination.
- *
- * @param source
- * The source files to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_filess_append_
- extern f_status_t f_filess_append(const f_files_t source, f_filess_t * const destination);
-#endif // _di_f_filess_append_
-
-/**
- * Append the source filess onto the destination.
- *
- * @param source
- * The source filess to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_filess_append_all_
- extern f_status_t f_filess_append_all(const f_filess_t source, f_filess_t * const destination);
-#endif // _di_f_filess_append_all_
-
-/**
- * Resize the filess array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param filess
- * The filess array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not if amount is 0.
*
* 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_filess_decimate_by_
- extern f_status_t f_filess_decimate_by(const f_number_unsigned_t amount, f_filess_t * const filess);
-#endif // _di_f_filess_decimate_by_
-
-/**
- * Resize the filess array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param filess
- * The filess array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_filess_decrease_by_
- extern f_status_t f_filess_decrease_by(const f_number_unsigned_t amount, f_filess_t * const filess);
-#endif // _di_f_filess_decrease_by_
-
-/**
- * Increase the size of the filess array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param filess
- * The filess array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_filess_increase_
- extern f_status_t f_filess_increase(const f_number_unsigned_t step, f_filess_t * const filess);
-#endif // _di_f_filess_increase_
+#ifndef _di_f_files_adjust_callback_
+ extern f_status_t f_files_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_files_adjust_callback_
/**
- * Resize the filess array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param filess
- * The filess array to resize.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_filess_t structure.
*
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_filess_increase_by_
- extern f_status_t f_filess_increase_by(const f_number_unsigned_t amount, f_filess_t * const filess);
-#endif // _di_f_filess_increase_by_
-
-/**
- * Resize the filess array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param filess
- * The filess array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_filess_resize_
- extern f_status_t f_filess_resize(const f_number_unsigned_t length, f_filess_t * const filess);
-#endif // _di_f_filess_resize_
+#ifndef _di_f_files_resize_callback_
+ extern f_status_t f_files_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_files_resize_callback_
#ifdef __cplusplus
} // extern "C"
#include "../type_array.h"
#include "fll_id.h"
-#include "private-fll_id.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_fll_ids_adjust_
- f_status_t f_fll_ids_adjust(const f_number_unsigned_t length, f_fll_ids_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_fll_ids_adjust_callback_
+ f_status_t f_fll_ids_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(f_fll_id_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_fll_ids_adjust_
-
-#ifndef _di_f_fll_ids_append_
- f_status_t f_fll_ids_append(const f_fll_id_t source, f_fll_ids_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fll_ids_append(source, destination);
- }
-#endif // _di_f_fll_ids_append_
-
-#ifndef _di_f_fll_ids_append_all_
- f_status_t f_fll_ids_append_all(const f_fll_ids_t source, f_fll_ids_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_fll_ids_append_all(source, destination);
- }
-#endif // _di_f_fll_ids_append_all_
-
-#ifndef _di_f_fll_ids_decimate_by_
- f_status_t f_fll_ids_decimate_by(const f_number_unsigned_t amount, f_fll_ids_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(f_fll_id_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_fll_ids_decimate_by_
-
-#ifndef _di_f_fll_ids_decrease_by_
- f_status_t f_fll_ids_decrease_by(const f_number_unsigned_t amount, f_fll_ids_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(f_fll_id_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_fll_ids_decrease_by_
-
-#ifndef _di_f_fll_ids_increase_
- f_status_t f_fll_ids_increase(const f_number_unsigned_t step, f_fll_ids_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(f_fll_id_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_fll_ids_increase_
-
-#ifndef _di_f_fll_ids_increase_by_
- f_status_t f_fll_ids_increase_by(const f_number_unsigned_t amount, f_fll_ids_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(f_fll_id_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_fll_ids_increase_by_
-
-#ifndef _di_f_fll_ids_resize_
- f_status_t f_fll_ids_resize(const f_number_unsigned_t length, f_fll_ids_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(f_fll_id_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_fll_ids_resize_
-
-#ifndef _di_f_fll_idss_adjust_
- f_status_t f_fll_idss_adjust(const f_number_unsigned_t length, f_fll_idss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fll_idss_adjust(length, structure);
- }
-#endif // _di_f_fll_idss_adjust_
-
-#ifndef _di_f_fll_idss_append_
- f_status_t f_fll_idss_append(const f_fll_ids_t source, f_fll_idss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_fll_ids_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_fll_ids_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_fll_ids_t * const array = (f_fll_ids_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_fll_idss_append_
-
-#ifndef _di_f_fll_idss_append_all_
- f_status_t f_fll_idss_append_all(const f_fll_idss_t source, f_fll_idss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_fll_ids_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_fll_ids_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(f_fll_id_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_fll_idss_append_all_
-
-#ifndef _di_f_fll_idss_decimate_by_
- f_status_t f_fll_idss_decimate_by(const f_number_unsigned_t amount, f_fll_idss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_fll_idss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_fll_idss_decimate_by_
-
-#ifndef _di_f_fll_idss_decrease_by_
- f_status_t f_fll_idss_decrease_by(const f_number_unsigned_t amount, f_fll_idss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_fll_idss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_fll_idss_decrease_by_
-
-#ifndef _di_f_fll_idss_increase_
- f_status_t f_fll_idss_increase(const f_number_unsigned_t step, f_fll_idss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_fll_idss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_fll_idss_increase_
-
-#ifndef _di_f_fll_idss_increase_by_
- f_status_t f_fll_idss_increase_by(const f_number_unsigned_t amount, f_fll_idss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_fll_ids_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_fll_ids_resize_callback_
+ f_status_t f_fll_ids_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_fll_ids_t * const array = (f_fll_ids_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_fll_idss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(f_fll_id_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_fll_idss_increase_by_
-
-#ifndef _di_f_fll_idss_resize_
- f_status_t f_fll_idss_resize(const f_number_unsigned_t length, f_fll_idss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_fll_idss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_fll_idss_resize_
+#endif // _di_f_fll_ids_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string fll_ids array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_fll_idss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string fll_ids array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_fll_ids_adjust_
- extern f_status_t f_fll_ids_adjust(const f_number_unsigned_t length, f_fll_ids_t * const structure);
-#endif // _di_f_fll_ids_adjust_
-
-/**
- * Append the single source fll_id onto the destination.
- *
- * @param source
- * The source fll_id to append.
- * @param destination
- * The destination fll_ids the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_fll_ids_append_
- extern f_status_t f_fll_ids_append(const f_fll_id_t source, f_fll_ids_t * const destination);
-#endif // _di_f_fll_ids_append_
-
-/**
- * Append the source fll_ids onto the destination.
- *
- * @param source
- * The source fll_ids to append.
- * @param destination
- * The destination fll_ids the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fll_ids_append_all_
- extern f_status_t f_fll_ids_append_all(const f_fll_ids_t source, f_fll_ids_t * const destination);
-#endif // _di_f_fll_ids_append_all_
-
-/**
- * Resize the string fll_ids array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string fll_ids array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_fll_ids_decimate_by_
- extern f_status_t f_fll_ids_decimate_by(const f_number_unsigned_t amount, f_fll_ids_t * const structure);
-#endif // _di_f_fll_ids_decimate_by_
-
-/**
- * Resize the string fll_ids array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string fll_ids array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_fll_ids_decrease_by_
- extern f_status_t f_fll_ids_decrease_by(const f_number_unsigned_t amount, f_fll_ids_t * const structure);
-#endif // _di_f_fll_ids_decrease_by_
-
-/**
- * Increase the size of the string fll_ids array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string fll_ids array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_fll_ids_increase_
- extern f_status_t f_fll_ids_increase(const f_number_unsigned_t step, f_fll_ids_t * const structure);
-#endif // _di_f_fll_ids_increase_
-
-/**
- * Resize the string fll_ids array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string fll_ids array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fll_ids_increase_by_
- extern f_status_t f_fll_ids_increase_by(const f_number_unsigned_t amount, f_fll_ids_t * const structure);
-#endif // _di_f_fll_ids_increase_by_
-
-/**
- * Resize the string fll_ids array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string fll_ids array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_fll_ids_resize_
- extern f_status_t f_fll_ids_resize(const f_number_unsigned_t length, f_fll_ids_t * const structure);
-#endif // _di_f_fll_ids_resize_
-
-/**
- * Resize the string fll_idss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string fll_idss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_fll_idss_adjust_
- extern f_status_t f_fll_idss_adjust(const f_number_unsigned_t length, f_fll_idss_t * const structure);
-#endif // _di_f_fll_idss_adjust_
-
-/**
- * Append the single source fll_ids onto the destination.
- *
- * @param source
- * The source fll_ids to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fll_idss_append_
- extern f_status_t f_fll_idss_append(const f_fll_ids_t source, f_fll_idss_t * const destination);
-#endif // _di_f_fll_idss_append_
-
-/**
- * Append the source fll_idss onto the destination.
- *
- * @param source
- * The source fll_idss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_fll_idss_append_all_
- extern f_status_t f_fll_idss_append_all(const f_fll_idss_t source, f_fll_idss_t * const destination);
-#endif // _di_f_fll_idss_append_all_
-
-/**
- * Resize the string fll_idss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string fll_idss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_fll_idss_decimate_by_
- extern f_status_t f_fll_idss_decimate_by(const f_number_unsigned_t amount, f_fll_idss_t * const structure);
-#endif // _di_f_fll_idss_decimate_by_
-
-/**
- * Resize the string fll_idss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string fll_idss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_fll_idss_decrease_by_
- extern f_status_t f_fll_idss_decrease_by(const f_number_unsigned_t amount, f_fll_idss_t * const structure);
-#endif // _di_f_fll_idss_decrease_by_
+#ifndef _di_f_fll_ids_adjust_callback_
+ extern f_status_t f_fll_ids_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_fll_ids_adjust_callback_
/**
- * Increase the size of the string fll_idss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_fll_idss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string fll_idss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fll_idss_increase_
- extern f_status_t f_fll_idss_increase(const f_number_unsigned_t step, f_fll_idss_t * const structure);
-#endif // _di_f_fll_idss_increase_
-
-/**
- * Resize the string fll_idss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string fll_idss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_fll_idss_increase_by_
- extern f_status_t f_fll_idss_increase_by(const f_number_unsigned_t amount, f_fll_idss_t * const structure);
-#endif // _di_f_fll_idss_increase_by_
-
-/**
- * Resize the string fll_idss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string fll_idss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_fll_idss_resize_
- extern f_status_t f_fll_idss_resize(const f_number_unsigned_t length, f_fll_idss_t * const structure);
-#endif // _di_f_fll_idss_resize_
+#ifndef _di_f_fll_ids_resize_callback_
+ extern f_status_t f_fll_ids_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_fll_ids_resize_callback_
#ifdef __cplusplus
} // extern "C"
#include "../type_array.h"
#include "int128.h"
-#include "private-int128.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_int128s_adjust_
- f_status_t f_int128s_adjust(const f_number_unsigned_t length, f_int128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_int128s_adjust_callback_
+ f_status_t f_int128s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(int128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int128s_adjust_
-
-#ifndef _di_f_int128s_append_
- f_status_t f_int128s_append(const int128_t source, f_int128s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int128s_append(source, destination);
- }
-#endif // _di_f_int128s_append_
-
-#ifndef _di_f_int128s_append_all_
- f_status_t f_int128s_append_all(const f_int128s_t source, f_int128s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_int128s_append_all(source, destination);
- }
-#endif // _di_f_int128s_append_all_
-
-#ifndef _di_f_int128s_decimate_by_
- f_status_t f_int128s_decimate_by(const f_number_unsigned_t amount, f_int128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(int128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int128s_decimate_by_
-
-#ifndef _di_f_int128s_decrease_by_
- f_status_t f_int128s_decrease_by(const f_number_unsigned_t amount, f_int128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(int128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int128s_decrease_by_
-
-#ifndef _di_f_int128s_increase_
- f_status_t f_int128s_increase(const f_number_unsigned_t step, f_int128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(int128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int128s_increase_
-
-#ifndef _di_f_int128s_increase_by_
- f_status_t f_int128s_increase_by(const f_number_unsigned_t amount, f_int128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(int128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int128s_increase_by_
-
-#ifndef _di_f_int128s_resize_
- f_status_t f_int128s_resize(const f_number_unsigned_t length, f_int128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(int128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int128s_resize_
-
-#ifndef _di_f_int128ss_adjust_
- f_status_t f_int128ss_adjust(const f_number_unsigned_t length, f_int128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int128ss_adjust(length, structure);
- }
-#endif // _di_f_int128ss_adjust_
-
-#ifndef _di_f_int128ss_append_
- f_status_t f_int128ss_append(const f_int128s_t source, f_int128ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_int128s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_int128s_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_int128s_t * const array = (f_int128s_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_int128ss_append_
-
-#ifndef _di_f_int128ss_append_all_
- f_status_t f_int128ss_append_all(const f_int128ss_t source, f_int128ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_int128s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_int128s_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(f_int128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_int128ss_append_all_
-
-#ifndef _di_f_int128ss_decimate_by_
- f_status_t f_int128ss_decimate_by(const f_number_unsigned_t amount, f_int128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_int128ss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_int128ss_decimate_by_
-
-#ifndef _di_f_int128ss_decrease_by_
- f_status_t f_int128ss_decrease_by(const f_number_unsigned_t amount, f_int128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_int128ss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_int128ss_decrease_by_
-
-#ifndef _di_f_int128ss_increase_
- f_status_t f_int128ss_increase(const f_number_unsigned_t step, f_int128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_int128ss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_int128ss_increase_
-
-#ifndef _di_f_int128ss_increase_by_
- f_status_t f_int128ss_increase_by(const f_number_unsigned_t amount, f_int128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_int128s_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_int128s_resize_callback_
+ f_status_t f_int128s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_int128s_t * const array = (f_int128s_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_int128ss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(f_int128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_int128ss_increase_by_
-
-#ifndef _di_f_int128ss_resize_
- f_status_t f_int128ss_resize(const f_number_unsigned_t length, f_int128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int128ss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_int128ss_resize_
+#endif // _di_f_int128s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string int128s array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_int128ss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string int128s array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int128s_adjust_
- extern f_status_t f_int128s_adjust(const f_number_unsigned_t length, f_int128s_t * const structure);
-#endif // _di_f_int128s_adjust_
-
-/**
- * Append the single source int128 onto the destination.
- *
- * @param source
- * The source int128 to append.
- * @param destination
- * The destination int128s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_int128s_append_
- extern f_status_t f_int128s_append(const int128_t source, f_int128s_t * const destination);
-#endif // _di_f_int128s_append_
-
-/**
- * Append the source int128s onto the destination.
- *
- * @param source
- * The source int128s to append.
- * @param destination
- * The destination int128s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int128s_append_all_
- extern f_status_t f_int128s_append_all(const f_int128s_t source, f_int128s_t * const destination);
-#endif // _di_f_int128s_append_all_
-
-/**
- * Resize the string int128s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string int128s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_int128s_decimate_by_
- extern f_status_t f_int128s_decimate_by(const f_number_unsigned_t amount, f_int128s_t * const structure);
-#endif // _di_f_int128s_decimate_by_
-
-/**
- * Resize the string int128s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string int128s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_int128s_decrease_by_
- extern f_status_t f_int128s_decrease_by(const f_number_unsigned_t amount, f_int128s_t * const structure);
-#endif // _di_f_int128s_decrease_by_
-
-/**
- * Increase the size of the string int128s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string int128s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_int128s_increase_
- extern f_status_t f_int128s_increase(const f_number_unsigned_t step, f_int128s_t * const structure);
-#endif // _di_f_int128s_increase_
-
-/**
- * Resize the string int128s array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string int128s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int128s_increase_by_
- extern f_status_t f_int128s_increase_by(const f_number_unsigned_t amount, f_int128s_t * const structure);
-#endif // _di_f_int128s_increase_by_
-
-/**
- * Resize the string int128s array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int128s array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int128s_resize_
- extern f_status_t f_int128s_resize(const f_number_unsigned_t length, f_int128s_t * const structure);
-#endif // _di_f_int128s_resize_
-
-/**
- * Resize the string int128ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int128ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int128ss_adjust_
- extern f_status_t f_int128ss_adjust(const f_number_unsigned_t length, f_int128ss_t * const structure);
-#endif // _di_f_int128ss_adjust_
-
-/**
- * Append the single source int128s onto the destination.
- *
- * @param source
- * The source int128s to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int128ss_append_
- extern f_status_t f_int128ss_append(const f_int128s_t source, f_int128ss_t * const destination);
-#endif // _di_f_int128ss_append_
-
-/**
- * Append the source int128ss onto the destination.
- *
- * @param source
- * The source int128ss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int128ss_append_all_
- extern f_status_t f_int128ss_append_all(const f_int128ss_t source, f_int128ss_t * const destination);
-#endif // _di_f_int128ss_append_all_
-
-/**
- * Resize the string int128ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string int128ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_int128ss_decimate_by_
- extern f_status_t f_int128ss_decimate_by(const f_number_unsigned_t amount, f_int128ss_t * const structure);
-#endif // _di_f_int128ss_decimate_by_
-
-/**
- * Resize the string int128ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string int128ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int128ss_decrease_by_
- extern f_status_t f_int128ss_decrease_by(const f_number_unsigned_t amount, f_int128ss_t * const structure);
-#endif // _di_f_int128ss_decrease_by_
+#ifndef _di_f_int128s_adjust_callback_
+ extern f_status_t f_int128s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_int128s_adjust_callback_
/**
- * Increase the size of the string int128ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_int128ss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string int128ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_int128ss_increase_
- extern f_status_t f_int128ss_increase(const f_number_unsigned_t step, f_int128ss_t * const structure);
-#endif // _di_f_int128ss_increase_
-
-/**
- * Resize the string int128ss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string int128ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_int128ss_increase_by_
- extern f_status_t f_int128ss_increase_by(const f_number_unsigned_t amount, f_int128ss_t * const structure);
-#endif // _di_f_int128ss_increase_by_
-
-/**
- * Resize the string int128ss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string int128ss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_int128ss_resize_
- extern f_status_t f_int128ss_resize(const f_number_unsigned_t length, f_int128ss_t * const structure);
-#endif // _di_f_int128ss_resize_
+#ifndef _di_f_int128s_resize_callback_
+ extern f_status_t f_int128s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_int128s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#include "../type_array.h"
#include "int16.h"
-#include "private-int16.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_int16s_adjust_
- f_status_t f_int16s_adjust(const f_number_unsigned_t length, f_int16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_int16s_adjust_callback_
+ f_status_t f_int16s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(int16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int16s_adjust_
-
-#ifndef _di_f_int16s_append_
- f_status_t f_int16s_append(const int16_t source, f_int16s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int16s_append(source, destination);
- }
-#endif // _di_f_int16s_append_
-
-#ifndef _di_f_int16s_append_all_
- f_status_t f_int16s_append_all(const f_int16s_t source, f_int16s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_int16s_append_all(source, destination);
- }
-#endif // _di_f_int16s_append_all_
-
-#ifndef _di_f_int16s_decimate_by_
- f_status_t f_int16s_decimate_by(const f_number_unsigned_t amount, f_int16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(int16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int16s_decimate_by_
-
-#ifndef _di_f_int16s_decrease_by_
- f_status_t f_int16s_decrease_by(const f_number_unsigned_t amount, f_int16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(int16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int16s_decrease_by_
-
-#ifndef _di_f_int16s_increase_
- f_status_t f_int16s_increase(const f_number_unsigned_t step, f_int16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(int16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int16s_increase_
-
-#ifndef _di_f_int16s_increase_by_
- f_status_t f_int16s_increase_by(const f_number_unsigned_t amount, f_int16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(int16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int16s_increase_by_
-
-#ifndef _di_f_int16s_resize_
- f_status_t f_int16s_resize(const f_number_unsigned_t length, f_int16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(int16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int16s_resize_
-
-#ifndef _di_f_int16ss_adjust_
- f_status_t f_int16ss_adjust(const f_number_unsigned_t length, f_int16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int16ss_adjust(length, structure);
- }
-#endif // _di_f_int16ss_adjust_
-
-#ifndef _di_f_int16ss_append_
- f_status_t f_int16ss_append(const f_int16s_t source, f_int16ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_int16s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_int16s_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_int16s_t * const array = (f_int16s_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_int16ss_append_
-
-#ifndef _di_f_int16ss_append_all_
- f_status_t f_int16ss_append_all(const f_int16ss_t source, f_int16ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_int16s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_int16s_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(int16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_int16ss_append_all_
-
-#ifndef _di_f_int16ss_decimate_by_
- f_status_t f_int16ss_decimate_by(const f_number_unsigned_t amount, f_int16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_int16ss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_int16ss_decimate_by_
-
-#ifndef _di_f_int16ss_decrease_by_
- f_status_t f_int16ss_decrease_by(const f_number_unsigned_t amount, f_int16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_int16ss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_int16ss_decrease_by_
-
-#ifndef _di_f_int16ss_increase_
- f_status_t f_int16ss_increase(const f_number_unsigned_t step, f_int16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_int16ss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_int16ss_increase_
-
-#ifndef _di_f_int16ss_increase_by_
- f_status_t f_int16ss_increase_by(const f_number_unsigned_t amount, f_int16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_int16s_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_int16s_resize_callback_
+ f_status_t f_int16s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_int16s_t * const array = (f_int16s_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_int16ss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(int16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_int16ss_increase_by_
-
-#ifndef _di_f_int16ss_resize_
- f_status_t f_int16ss_resize(const f_number_unsigned_t length, f_int16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int16ss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_int16ss_resize_
+#endif // _di_f_int16s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string int16s array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_int16ss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string int16s array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int16s_adjust_
- extern f_status_t f_int16s_adjust(const f_number_unsigned_t length, f_int16s_t * const structure);
-#endif // _di_f_int16s_adjust_
-
-/**
- * Append the single source int16 onto the destination.
- *
- * @param source
- * The source int16 to append.
- * @param destination
- * The destination int16s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_int16s_append_
- extern f_status_t f_int16s_append(const int16_t source, f_int16s_t * const destination);
-#endif // _di_f_int16s_append_
-
-/**
- * Append the source int16s onto the destination.
- *
- * @param source
- * The source int16s to append.
- * @param destination
- * The destination int16s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int16s_append_all_
- extern f_status_t f_int16s_append_all(const f_int16s_t source, f_int16s_t * const destination);
-#endif // _di_f_int16s_append_all_
-
-/**
- * Resize the string int16s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string int16s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_int16s_decimate_by_
- extern f_status_t f_int16s_decimate_by(const f_number_unsigned_t amount, f_int16s_t * const structure);
-#endif // _di_f_int16s_decimate_by_
-
-/**
- * Resize the string int16s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string int16s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_int16s_decrease_by_
- extern f_status_t f_int16s_decrease_by(const f_number_unsigned_t amount, f_int16s_t * const structure);
-#endif // _di_f_int16s_decrease_by_
-
-/**
- * Increase the size of the string int16s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string int16s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_int16s_increase_
- extern f_status_t f_int16s_increase(const f_number_unsigned_t step, f_int16s_t * const structure);
-#endif // _di_f_int16s_increase_
-
-/**
- * Resize the string int16s array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string int16s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int16s_increase_by_
- extern f_status_t f_int16s_increase_by(const f_number_unsigned_t amount, f_int16s_t * const structure);
-#endif // _di_f_int16s_increase_by_
-
-/**
- * Resize the string int16s array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int16s array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int16s_resize_
- extern f_status_t f_int16s_resize(const f_number_unsigned_t length, f_int16s_t * const structure);
-#endif // _di_f_int16s_resize_
-
-/**
- * Resize the string int16ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int16ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int16ss_adjust_
- extern f_status_t f_int16ss_adjust(const f_number_unsigned_t length, f_int16ss_t * const structure);
-#endif // _di_f_int16ss_adjust_
-
-/**
- * Append the single source int16s onto the destination.
- *
- * @param source
- * The source int16s to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int16ss_append_
- extern f_status_t f_int16ss_append(const f_int16s_t source, f_int16ss_t * const destination);
-#endif // _di_f_int16ss_append_
-
-/**
- * Append the source int16ss onto the destination.
- *
- * @param source
- * The source int16ss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int16ss_append_all_
- extern f_status_t f_int16ss_append_all(const f_int16ss_t source, f_int16ss_t * const destination);
-#endif // _di_f_int16ss_append_all_
-
-/**
- * Resize the string int16ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string int16ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_int16ss_decimate_by_
- extern f_status_t f_int16ss_decimate_by(const f_number_unsigned_t amount, f_int16ss_t * const structure);
-#endif // _di_f_int16ss_decimate_by_
-
-/**
- * Resize the string int16ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string int16ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int16ss_decrease_by_
- extern f_status_t f_int16ss_decrease_by(const f_number_unsigned_t amount, f_int16ss_t * const structure);
-#endif // _di_f_int16ss_decrease_by_
+#ifndef _di_f_int16s_adjust_callback_
+ extern f_status_t f_int16s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_int16s_adjust_callback_
/**
- * Increase the size of the string int16ss array, but only if necessary.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_int16ss_t structure.
*
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * This does not do parameter checking.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string int16ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * F_array_too_large (with error bit) if the new array length is too large.
* 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_int16ss_increase_
- extern f_status_t f_int16ss_increase(const f_number_unsigned_t step, f_int16ss_t * const structure);
-#endif // _di_f_int16ss_increase_
-
-/**
- * Resize the string int16ss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string int16ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_int16ss_increase_by_
- extern f_status_t f_int16ss_increase_by(const f_number_unsigned_t amount, f_int16ss_t * const structure);
-#endif // _di_f_int16ss_increase_by_
-
-/**
- * Resize the string int16ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int16ss array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int16ss_resize_
- extern f_status_t f_int16ss_resize(const f_number_unsigned_t length, f_int16ss_t * const structure);
-#endif // _di_f_int16ss_resize_
-
+#ifndef _di_f_int16s_resize_callback_
+ extern f_status_t f_int16s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_int16s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
#include "../type_array.h"
#include "int32.h"
-#include "private-int32.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_int32s_adjust_
- f_status_t f_int32s_adjust(const f_number_unsigned_t length, f_int32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_int32s_adjust_callback_
+ f_status_t f_int32s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(int32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int32s_adjust_
-
-#ifndef _di_f_int32s_append_
- f_status_t f_int32s_append(const int32_t source, f_int32s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int32s_append(source, destination);
- }
-#endif // _di_f_int32s_append_
-
-#ifndef _di_f_int32s_append_all_
- f_status_t f_int32s_append_all(const f_int32s_t source, f_int32s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_int32s_append_all(source, destination);
- }
-#endif // _di_f_int32s_append_all_
-
-#ifndef _di_f_int32s_decimate_by_
- f_status_t f_int32s_decimate_by(const f_number_unsigned_t amount, f_int32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(int32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int32s_decimate_by_
-
-#ifndef _di_f_int32s_decrease_by_
- f_status_t f_int32s_decrease_by(const f_number_unsigned_t amount, f_int32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(int32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int32s_decrease_by_
-
-#ifndef _di_f_int32s_increase_
- f_status_t f_int32s_increase(const f_number_unsigned_t step, f_int32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(int32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int32s_increase_
-
-#ifndef _di_f_int32s_increase_by_
- f_status_t f_int32s_increase_by(const f_number_unsigned_t amount, f_int32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(int32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int32s_increase_by_
-
-#ifndef _di_f_int32s_resize_
- f_status_t f_int32s_resize(const f_number_unsigned_t length, f_int32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(int32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int32s_resize_
-
-#ifndef _di_f_int32ss_adjust_
- f_status_t f_int32ss_adjust(const f_number_unsigned_t length, f_int32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int32ss_adjust(length, structure);
- }
-#endif // _di_f_int32ss_adjust_
-
-#ifndef _di_f_int32ss_append_
- f_status_t f_int32ss_append(const f_int32s_t source, f_int32ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_int32s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_int32s_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_int32s_t * const array = (f_int32s_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_int32ss_append_
-
-#ifndef _di_f_int32ss_append_all_
- f_status_t f_int32ss_append_all(const f_int32ss_t source, f_int32ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_int32s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_int32s_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(int32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_int32ss_append_all_
-
-#ifndef _di_f_int32ss_decimate_by_
- f_status_t f_int32ss_decimate_by(const f_number_unsigned_t amount, f_int32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_int32ss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_int32ss_decimate_by_
-
-#ifndef _di_f_int32ss_decrease_by_
- f_status_t f_int32ss_decrease_by(const f_number_unsigned_t amount, f_int32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_int32ss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_int32ss_decrease_by_
-
-#ifndef _di_f_int32ss_increase_
- f_status_t f_int32ss_increase(const f_number_unsigned_t step, f_int32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_int32ss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_int32ss_increase_
-
-#ifndef _di_f_int32ss_increase_by_
- f_status_t f_int32ss_increase_by(const f_number_unsigned_t amount, f_int32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_int32s_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_int32s_resize_callback_
+ f_status_t f_int32s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_int32s_t * const array = (f_int32s_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_int32ss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(int32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_int32ss_increase_by_
-
-#ifndef _di_f_int32ss_resize_
- f_status_t f_int32ss_resize(const f_number_unsigned_t length, f_int32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int32ss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_int32ss_resize_
+#endif // _di_f_int32s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string int32s array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_int32ss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string int32s array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int32s_adjust_
- extern f_status_t f_int32s_adjust(const f_number_unsigned_t length, f_int32s_t * const structure);
-#endif // _di_f_int32s_adjust_
-
-/**
- * Append the single source int32 onto the destination.
- *
- * @param source
- * The source int32 to append.
- * @param destination
- * The destination int32s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_int32s_append_
- extern f_status_t f_int32s_append(const int32_t source, f_int32s_t * const destination);
-#endif // _di_f_int32s_append_
-
-/**
- * Append the source int32s onto the destination.
- *
- * @param source
- * The source int32s to append.
- * @param destination
- * The destination int32s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int32s_append_all_
- extern f_status_t f_int32s_append_all(const f_int32s_t source, f_int32s_t * const destination);
-#endif // _di_f_int32s_append_all_
-
-/**
- * Resize the string int32s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string int32s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_int32s_decimate_by_
- extern f_status_t f_int32s_decimate_by(const f_number_unsigned_t amount, f_int32s_t * const structure);
-#endif // _di_f_int32s_decimate_by_
-
-/**
- * Resize the string int32s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string int32s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_int32s_decrease_by_
- extern f_status_t f_int32s_decrease_by(const f_number_unsigned_t amount, f_int32s_t * const structure);
-#endif // _di_f_int32s_decrease_by_
-
-/**
- * Increase the size of the string int32s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string int32s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_int32s_increase_
- extern f_status_t f_int32s_increase(const f_number_unsigned_t step, f_int32s_t * const structure);
-#endif // _di_f_int32s_increase_
-
-/**
- * Resize the string int32s array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string int32s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int32s_increase_by_
- extern f_status_t f_int32s_increase_by(const f_number_unsigned_t amount, f_int32s_t * const structure);
-#endif // _di_f_int32s_increase_by_
-
-/**
- * Resize the string int32s array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int32s array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int32s_resize_
- extern f_status_t f_int32s_resize(const f_number_unsigned_t length, f_int32s_t * const structure);
-#endif // _di_f_int32s_resize_
-
-/**
- * Resize the string int32ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int32ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int32ss_adjust_
- extern f_status_t f_int32ss_adjust(const f_number_unsigned_t length, f_int32ss_t * const structure);
-#endif // _di_f_int32ss_adjust_
-
-/**
- * Append the single source int32s onto the destination.
- *
- * @param source
- * The source int32s to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int32ss_append_
- extern f_status_t f_int32ss_append(const f_int32s_t source, f_int32ss_t * const destination);
-#endif // _di_f_int32ss_append_
-
-/**
- * Append the source int32ss onto the destination.
- *
- * @param source
- * The source int32ss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int32ss_append_all_
- extern f_status_t f_int32ss_append_all(const f_int32ss_t source, f_int32ss_t * const destination);
-#endif // _di_f_int32ss_append_all_
-
-/**
- * Resize the string int32ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string int32ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_int32ss_decimate_by_
- extern f_status_t f_int32ss_decimate_by(const f_number_unsigned_t amount, f_int32ss_t * const structure);
-#endif // _di_f_int32ss_decimate_by_
-
-/**
- * Resize the string int32ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string int32ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int32ss_decrease_by_
- extern f_status_t f_int32ss_decrease_by(const f_number_unsigned_t amount, f_int32ss_t * const structure);
-#endif // _di_f_int32ss_decrease_by_
+#ifndef _di_f_int32s_adjust_callback_
+ extern f_status_t f_int32s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_int32s_adjust_callback_
/**
- * Increase the size of the string int32ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_int32ss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string int32ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_int32ss_increase_
- extern f_status_t f_int32ss_increase(const f_number_unsigned_t step, f_int32ss_t * const structure);
-#endif // _di_f_int32ss_increase_
-
-/**
- * Resize the string int32ss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string int32ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_int32ss_increase_by_
- extern f_status_t f_int32ss_increase_by(const f_number_unsigned_t amount, f_int32ss_t * const structure);
-#endif // _di_f_int32ss_increase_by_
-
-/**
- * Resize the string int32ss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string int32ss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_int32ss_resize_
- extern f_status_t f_int32ss_resize(const f_number_unsigned_t length, f_int32ss_t * const structure);
-#endif // _di_f_int32ss_resize_
+#ifndef _di_f_int32s_resize_callback_
+ extern f_status_t f_int32s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_int32s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#include "../type_array.h"
#include "int64.h"
-#include "private-int64.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_int64s_adjust_
- f_status_t f_int64s_adjust(const f_number_unsigned_t length, f_int64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_int64s_adjust_callback_
+ f_status_t f_int64s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(int64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int64s_adjust_
-
-#ifndef _di_f_int64s_append_
- f_status_t f_int64s_append(const int64_t source, f_int64s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int64s_append(source, destination);
- }
-#endif // _di_f_int64s_append_
-
-#ifndef _di_f_int64s_append_all_
- f_status_t f_int64s_append_all(const f_int64s_t source, f_int64s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_int64s_append_all(source, destination);
- }
-#endif // _di_f_int64s_append_all_
-
-#ifndef _di_f_int64s_decimate_by_
- f_status_t f_int64s_decimate_by(const f_number_unsigned_t amount, f_int64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(int64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int64s_decimate_by_
-
-#ifndef _di_f_int64s_decrease_by_
- f_status_t f_int64s_decrease_by(const f_number_unsigned_t amount, f_int64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(int64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int64s_decrease_by_
-
-#ifndef _di_f_int64s_increase_
- f_status_t f_int64s_increase(const f_number_unsigned_t step, f_int64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(int64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int64s_increase_
-
-#ifndef _di_f_int64s_increase_by_
- f_status_t f_int64s_increase_by(const f_number_unsigned_t amount, f_int64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(int64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int64s_increase_by_
-
-#ifndef _di_f_int64s_resize_
- f_status_t f_int64s_resize(const f_number_unsigned_t length, f_int64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(int64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int64s_resize_
-
-#ifndef _di_f_int64ss_adjust_
- f_status_t f_int64ss_adjust(const f_number_unsigned_t length, f_int64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int64ss_adjust(length, structure);
- }
-#endif // _di_f_int64ss_adjust_
-
-#ifndef _di_f_int64ss_append_
- f_status_t f_int64ss_append(const f_int64s_t source, f_int64ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_int64s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_int64s_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_int64s_t * const array = (f_int64s_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_int64ss_append_
-
-#ifndef _di_f_int64ss_append_all_
- f_status_t f_int64ss_append_all(const f_int64ss_t source, f_int64ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_int64s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_int64s_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(int64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_int64ss_append_all_
-
-#ifndef _di_f_int64ss_decimate_by_
- f_status_t f_int64ss_decimate_by(const f_number_unsigned_t amount, f_int64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_int64ss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_int64ss_decimate_by_
-
-#ifndef _di_f_int64ss_decrease_by_
- f_status_t f_int64ss_decrease_by(const f_number_unsigned_t amount, f_int64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_int64ss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_int64ss_decrease_by_
-
-#ifndef _di_f_int64ss_increase_
- f_status_t f_int64ss_increase(const f_number_unsigned_t step, f_int64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_int64ss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_int64ss_increase_
-
-#ifndef _di_f_int64ss_increase_by_
- f_status_t f_int64ss_increase_by(const f_number_unsigned_t amount, f_int64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_int64s_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_int64s_resize_callback_
+ f_status_t f_int64s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_int64s_t * const array = (f_int64s_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_int64ss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(int64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_int64ss_increase_by_
-
-#ifndef _di_f_int64ss_resize_
- f_status_t f_int64ss_resize(const f_number_unsigned_t length, f_int64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int64ss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_int64ss_resize_
+#endif // _di_f_int64s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string int64s array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_int64ss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string int64s array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int64s_adjust_
- extern f_status_t f_int64s_adjust(const f_number_unsigned_t length, f_int64s_t * const structure);
-#endif // _di_f_int64s_adjust_
-
-/**
- * Append the single source int64 onto the destination.
- *
- * @param source
- * The source int64 to append.
- * @param destination
- * The destination int64s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_int64s_append_
- extern f_status_t f_int64s_append(const int64_t source, f_int64s_t * const destination);
-#endif // _di_f_int64s_append_
-
-/**
- * Append the source int64s onto the destination.
- *
- * @param source
- * The source int64s to append.
- * @param destination
- * The destination int64s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int64s_append_all_
- extern f_status_t f_int64s_append_all(const f_int64s_t source, f_int64s_t * const destination);
-#endif // _di_f_int64s_append_all_
-
-/**
- * Resize the string int64s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string int64s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_int64s_decimate_by_
- extern f_status_t f_int64s_decimate_by(const f_number_unsigned_t amount, f_int64s_t * const structure);
-#endif // _di_f_int64s_decimate_by_
-
-/**
- * Resize the string int64s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string int64s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_int64s_decrease_by_
- extern f_status_t f_int64s_decrease_by(const f_number_unsigned_t amount, f_int64s_t * const structure);
-#endif // _di_f_int64s_decrease_by_
-
-/**
- * Increase the size of the string int64s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string int64s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_int64s_increase_
- extern f_status_t f_int64s_increase(const f_number_unsigned_t step, f_int64s_t * const structure);
-#endif // _di_f_int64s_increase_
-
-/**
- * Resize the string int64s array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string int64s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int64s_increase_by_
- extern f_status_t f_int64s_increase_by(const f_number_unsigned_t amount, f_int64s_t * const structure);
-#endif // _di_f_int64s_increase_by_
-
-/**
- * Resize the string int64s array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int64s array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int64s_resize_
- extern f_status_t f_int64s_resize(const f_number_unsigned_t length, f_int64s_t * const structure);
-#endif // _di_f_int64s_resize_
-
-/**
- * Resize the string int64ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int64ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int64ss_adjust_
- extern f_status_t f_int64ss_adjust(const f_number_unsigned_t length, f_int64ss_t * const structure);
-#endif // _di_f_int64ss_adjust_
-
-/**
- * Append the single source int64s onto the destination.
- *
- * @param source
- * The source int64s to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int64ss_append_
- extern f_status_t f_int64ss_append(const f_int64s_t source, f_int64ss_t * const destination);
-#endif // _di_f_int64ss_append_
-
-/**
- * Append the source int64ss onto the destination.
- *
- * @param source
- * The source int64ss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int64ss_append_all_
- extern f_status_t f_int64ss_append_all(const f_int64ss_t source, f_int64ss_t * const destination);
-#endif // _di_f_int64ss_append_all_
-
-/**
- * Resize the string int64ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string int64ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_int64ss_decimate_by_
- extern f_status_t f_int64ss_decimate_by(const f_number_unsigned_t amount, f_int64ss_t * const structure);
-#endif // _di_f_int64ss_decimate_by_
-
-/**
- * Resize the string int64ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string int64ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int64ss_decrease_by_
- extern f_status_t f_int64ss_decrease_by(const f_number_unsigned_t amount, f_int64ss_t * const structure);
-#endif // _di_f_int64ss_decrease_by_
+#ifndef _di_f_int64s_adjust_callback_
+ extern f_status_t f_int64s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_int64s_adjust_callback_
/**
- * Increase the size of the string int64ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_int64ss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string int64ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_int64ss_increase_
- extern f_status_t f_int64ss_increase(const f_number_unsigned_t step, f_int64ss_t * const structure);
-#endif // _di_f_int64ss_increase_
-
-/**
- * Resize the string int64ss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string int64ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_int64ss_increase_by_
- extern f_status_t f_int64ss_increase_by(const f_number_unsigned_t amount, f_int64ss_t * const structure);
-#endif // _di_f_int64ss_increase_by_
-
-/**
- * Resize the string int64ss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string int64ss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_int64ss_resize_
- extern f_status_t f_int64ss_resize(const f_number_unsigned_t length, f_int64ss_t * const structure);
-#endif // _di_f_int64ss_resize_
+#ifndef _di_f_int64s_resize_callback_
+ extern f_status_t f_int64s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_int64s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#include "../type_array.h"
#include "int8.h"
-#include "private-int8.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_int8s_adjust_
- f_status_t f_int8s_adjust(const f_number_unsigned_t length, f_int8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_int8s_adjust_callback_
+ f_status_t f_int8s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(int8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int8s_adjust_
-
-#ifndef _di_f_int8s_append_
- f_status_t f_int8s_append(const int8_t source, f_int8s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int8s_append(source, destination);
- }
-#endif // _di_f_int8s_append_
-
-#ifndef _di_f_int8s_append_all_
- f_status_t f_int8s_append_all(const f_int8s_t source, f_int8s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_int8s_append_all(source, destination);
- }
-#endif // _di_f_int8s_append_all_
-
-#ifndef _di_f_int8s_decimate_by_
- f_status_t f_int8s_decimate_by(const f_number_unsigned_t amount, f_int8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(int8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int8s_decimate_by_
-
-#ifndef _di_f_int8s_decrease_by_
- f_status_t f_int8s_decrease_by(const f_number_unsigned_t amount, f_int8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(int8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int8s_decrease_by_
-
-#ifndef _di_f_int8s_increase_
- f_status_t f_int8s_increase(const f_number_unsigned_t step, f_int8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(int8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int8s_increase_
-
-#ifndef _di_f_int8s_increase_by_
- f_status_t f_int8s_increase_by(const f_number_unsigned_t amount, f_int8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(int8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int8s_increase_by_
-
-#ifndef _di_f_int8s_resize_
- f_status_t f_int8s_resize(const f_number_unsigned_t length, f_int8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(int8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_int8s_resize_
-
-#ifndef _di_f_int8ss_adjust_
- f_status_t f_int8ss_adjust(const f_number_unsigned_t length, f_int8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int8ss_adjust(length, structure);
- }
-#endif // _di_f_int8ss_adjust_
-
-#ifndef _di_f_int8ss_append_
- f_status_t f_int8ss_append(const f_int8s_t source, f_int8ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_int8s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_int8s_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_int8s_t * const array = (f_int8s_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_int8ss_append_
-
-#ifndef _di_f_int8ss_append_all_
- f_status_t f_int8ss_append_all(const f_int8ss_t source, f_int8ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_int8s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_int8s_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(int8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_int8ss_append_all_
-
-#ifndef _di_f_int8ss_decimate_by_
- f_status_t f_int8ss_decimate_by(const f_number_unsigned_t amount, f_int8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_int8ss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_int8ss_decimate_by_
-
-#ifndef _di_f_int8ss_decrease_by_
- f_status_t f_int8ss_decrease_by(const f_number_unsigned_t amount, f_int8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_int8ss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_int8ss_decrease_by_
-
-#ifndef _di_f_int8ss_increase_
- f_status_t f_int8ss_increase(const f_number_unsigned_t step, f_int8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_int8ss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_int8ss_increase_
-
-#ifndef _di_f_int8ss_increase_by_
- f_status_t f_int8ss_increase_by(const f_number_unsigned_t amount, f_int8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_int8s_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_int8s_resize_callback_
+ f_status_t f_int8s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_int8s_t * const array = (f_int8s_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_int8ss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(int8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_int8ss_increase_by_
-
-#ifndef _di_f_int8ss_resize_
- f_status_t f_int8ss_resize(const f_number_unsigned_t length, f_int8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_int8ss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_int8ss_resize_
+#endif // _di_f_int8s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string int8s array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_int8ss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string int8s array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int8s_adjust_
- extern f_status_t f_int8s_adjust(const f_number_unsigned_t length, f_int8s_t * const structure);
-#endif // _di_f_int8s_adjust_
-
-/**
- * Append the single source int8 onto the destination.
- *
- * @param source
- * The source int8 to append.
- * @param destination
- * The destination int8s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_int8s_append_
- extern f_status_t f_int8s_append(const int8_t source, f_int8s_t * const destination);
-#endif // _di_f_int8s_append_
-
-/**
- * Append the source int8s onto the destination.
- *
- * @param source
- * The source int8s to append.
- * @param destination
- * The destination int8s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int8s_append_all_
- extern f_status_t f_int8s_append_all(const f_int8s_t source, f_int8s_t * const destination);
-#endif // _di_f_int8s_append_all_
-
-/**
- * Resize the string int8s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string int8s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_int8s_decimate_by_
- extern f_status_t f_int8s_decimate_by(const f_number_unsigned_t amount, f_int8s_t * const structure);
-#endif // _di_f_int8s_decimate_by_
-
-/**
- * Resize the string int8s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string int8s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_int8s_decrease_by_
- extern f_status_t f_int8s_decrease_by(const f_number_unsigned_t amount, f_int8s_t * const structure);
-#endif // _di_f_int8s_decrease_by_
-
-/**
- * Increase the size of the string int8s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string int8s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_int8s_increase_
- extern f_status_t f_int8s_increase(const f_number_unsigned_t step, f_int8s_t * const structure);
-#endif // _di_f_int8s_increase_
-
-/**
- * Resize the string int8s array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string int8s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int8s_increase_by_
- extern f_status_t f_int8s_increase_by(const f_number_unsigned_t amount, f_int8s_t * const structure);
-#endif // _di_f_int8s_increase_by_
-
-/**
- * Resize the string int8s array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int8s array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int8s_resize_
- extern f_status_t f_int8s_resize(const f_number_unsigned_t length, f_int8s_t * const structure);
-#endif // _di_f_int8s_resize_
-
-/**
- * Resize the string int8ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string int8ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int8ss_adjust_
- extern f_status_t f_int8ss_adjust(const f_number_unsigned_t length, f_int8ss_t * const structure);
-#endif // _di_f_int8ss_adjust_
-
-/**
- * Append the single source int8s onto the destination.
- *
- * @param source
- * The source int8s to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int8ss_append_
- extern f_status_t f_int8ss_append(const f_int8s_t source, f_int8ss_t * const destination);
-#endif // _di_f_int8ss_append_
-
-/**
- * Append the source int8ss onto the destination.
- *
- * @param source
- * The source int8ss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_int8ss_append_all_
- extern f_status_t f_int8ss_append_all(const f_int8ss_t source, f_int8ss_t * const destination);
-#endif // _di_f_int8ss_append_all_
-
-/**
- * Resize the string int8ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string int8ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_int8ss_decimate_by_
- extern f_status_t f_int8ss_decimate_by(const f_number_unsigned_t amount, f_int8ss_t * const structure);
-#endif // _di_f_int8ss_decimate_by_
-
-/**
- * Resize the string int8ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string int8ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_int8ss_decrease_by_
- extern f_status_t f_int8ss_decrease_by(const f_number_unsigned_t amount, f_int8ss_t * const structure);
-#endif // _di_f_int8ss_decrease_by_
+#ifndef _di_f_int8s_adjust_callback_
+ extern f_status_t f_int8s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_int8s_adjust_callback_
/**
- * Increase the size of the string int8ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_int8ss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string int8ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_int8ss_increase_
- extern f_status_t f_int8ss_increase(const f_number_unsigned_t step, f_int8ss_t * const structure);
-#endif // _di_f_int8ss_increase_
-
-/**
- * Resize the string int8ss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string int8ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_int8ss_increase_by_
- extern f_status_t f_int8ss_increase_by(const f_number_unsigned_t amount, f_int8ss_t * const structure);
-#endif // _di_f_int8ss_increase_by_
-
-/**
- * Resize the string int8ss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string int8ss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_int8ss_resize_
- extern f_status_t f_int8ss_resize(const f_number_unsigned_t length, f_int8ss_t * const structure);
-#endif // _di_f_int8ss_resize_
+#ifndef _di_f_int8s_resize_callback_
+ extern f_status_t f_int8s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_int8s_resize_callback_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_f_number_unsigneds_append_
- f_status_t f_number_unsigneds_append(const f_number_unsigned_t source, f_number_unsigneds_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_append((const void *) &source, sizeof(f_number_unsigned_t), (void **) &destination->array, &destination->used, &destination->size);
- }
-#endif // _di_f_number_unsigneds_append_
-
-#ifndef _di_f_number_unsigneds_append_all_
- f_status_t f_number_unsigneds_append_all(const f_number_unsigneds_t source, f_number_unsigneds_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return f_memory_array_append_all((const void *) &source.array, source.used, sizeof(f_number_unsigned_t), (void **) &destination->array, &destination->used, &destination->size);
- }
-#endif // _di_f_number_unsigneds_append_all_
-
-#ifndef _di_f_number_unsigneds_decimate_by_
- f_status_t f_number_unsigneds_decimate_by(const f_number_unsigned_t amount, f_number_unsigneds_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(f_number_unsigned_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_number_unsigneds_decimate_by_
-
-#ifndef _di_f_number_unsigneds_decrease_by_
- f_status_t f_number_unsigneds_decrease_by(const f_number_unsigned_t amount, f_number_unsigneds_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(f_number_unsigned_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_number_unsigneds_decrease_by_
-
-#ifndef _di_f_number_unsigneds_increase_
- f_status_t f_number_unsigneds_increase(const f_number_unsigned_t step, f_number_unsigneds_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(f_number_unsigned_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_number_unsigneds_increase_
-
-#ifndef _di_f_number_unsigneds_increase_by_
- f_status_t f_number_unsigneds_increase_by(const f_number_unsigned_t amount, f_number_unsigneds_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(f_number_unsigned_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_number_unsigneds_increase_by_
-
-#ifndef _di_f_number_unsignedss_adjust_
- f_status_t f_number_unsignedss_adjust(const f_number_unsigned_t length, f_number_unsignedss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_number_unsignedss_adjust_
-
-#ifndef _di_f_number_unsignedss_append_
- f_status_t f_number_unsignedss_append(const f_number_unsigneds_t source, f_number_unsignedss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_number_unsigneds_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = f_memory_array_append_all((const void *) &source.array, source.used, sizeof(f_number_unsigned_t), (void **) &destination->array[destination->used].array, &destination->array[destination->used].used, &destination->array[destination->used].size);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
-
- return F_none;
- }
-#endif // _di_f_number_unsignedss_append_
-
-#ifndef _di_f_number_unsignedss_append_all_
- f_status_t f_number_unsignedss_append_all(const f_number_unsignedss_t source, f_number_unsignedss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_number_unsigneds_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = f_memory_array_append_all((const void *) &source.array[i].array, source.array[i].used, sizeof(f_number_unsigned_t), (void **) &destination->array[destination->used].array, &destination->array[destination->used].used, &destination->array[destination->used].size);
- if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_number_unsignedss_append_all_
-
-#ifndef _di_f_number_unsignedss_decimate_by_
- f_status_t f_number_unsignedss_decimate_by(const f_number_unsigned_t amount, f_number_unsignedss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- const f_number_unsigned_t length = (structure->size - amount > 0) ? structure->size - amount : 0;
+#ifndef _di_f_number_unsigneds_adjust_callback_
+ f_status_t f_number_unsigneds_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
{
+ f_number_unsigneds_t * const array = (f_number_unsigneds_t *) void_array;
f_status_t status = F_none;
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
+ status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
} // for
}
- return f_memory_array_adjust(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_number_unsignedss_decimate_by_
-
-#ifndef _di_f_number_unsignedss_decrease_by_
- f_status_t f_number_unsignedss_decrease_by(const f_number_unsigned_t amount, f_number_unsignedss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- const f_number_unsigned_t length = (structure->size - amount > 0) ? structure->size - amount : 0;
-
- {
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
- }
-
- return f_memory_array_resize(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_number_unsignedss_decrease_by_
-
-#ifndef _di_f_number_unsignedss_increase_
- f_status_t f_number_unsignedss_increase(const f_number_unsigned_t step, f_number_unsignedss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- {
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
- }
-
- return f_memory_array_resize(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-
- return F_data_not;
- }
-#endif // _di_f_number_unsignedss_increase_
-
-#ifndef _di_f_number_unsignedss_increase_by_
- f_status_t f_number_unsignedss_increase_by(const f_number_unsigned_t amount, f_number_unsignedss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- const f_number_unsigned_t length = structure->used + amount;
-
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- {
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
- }
-
- return f_memory_array_resize(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size);
- }
- }
-
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_number_unsignedss_increase_by_
+#endif // _di_f_number_unsigneds_adjust_callback_
-#ifndef _di_f_number_unsignedss_resize_
- f_status_t f_number_unsignedss_resize(const f_number_unsigned_t length, f_number_unsignedss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_number_unsigneds_resize_callback_
+ f_status_t f_number_unsigneds_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
{
+ f_number_unsigneds_t * const array = (f_number_unsigneds_t *) void_array;
f_status_t status = F_none;
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
+ status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
} // for
}
- return f_memory_array_resize(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size);
+ return F_none;
}
-#endif // _di_f_number_unsignedss_resize_
+#endif // _di_f_number_unsigneds_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Append the single source number_unsigned onto the destination.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_number_unsignedss_t structure.
*
- * @param source
- * The source number_unsigned to append.
- * @param destination
- * The destination number_unsigneds the source is appended onto.
+ * This does not do parameter checking.
*
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_number_unsigneds_append_
- extern f_status_t f_number_unsigneds_append(const f_number_unsigned_t source, f_number_unsigneds_t * const destination);
-#endif // _di_f_number_unsigneds_append_
-
-/**
- * Append the source number_unsigneds onto the destination.
- *
- * @param source
- * The source number_unsigneds to append.
- * @param destination
- * The destination number_unsigneds the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_number_unsigneds_append_all_
- extern f_status_t f_number_unsigneds_append_all(const f_number_unsigneds_t source, f_number_unsigneds_t * const destination);
-#endif // _di_f_number_unsigneds_append_all_
-
-/**
- * Resize the string number_unsigneds array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string number_unsigneds array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_number_unsigneds_decimate_by_
- extern f_status_t f_number_unsigneds_decimate_by(const f_number_unsigned_t amount, f_number_unsigneds_t * const structure);
-#endif // _di_f_number_unsigneds_decimate_by_
-
-/**
- * Resize the string number_unsigneds array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string number_unsigneds array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_number_unsigneds_decrease_by_
- extern f_status_t f_number_unsigneds_decrease_by(const f_number_unsigned_t amount, f_number_unsigneds_t * const structure);
-#endif // _di_f_number_unsigneds_decrease_by_
-
-/**
- * Increase the size of the string number_unsigneds array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string number_unsigneds array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_number_unsigneds_increase_
- extern f_status_t f_number_unsigneds_increase(const f_number_unsigned_t step, f_number_unsigneds_t * const structure);
-#endif // _di_f_number_unsigneds_increase_
-
-/**
- * Resize the string number_unsigneds array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string number_unsigneds array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_number_unsigneds_increase_by_
- extern f_status_t f_number_unsigneds_increase_by(const f_number_unsigned_t amount, f_number_unsigneds_t * const structure);
-#endif // _di_f_number_unsigneds_increase_by_
-
-/**
- * Resize the string number_unsignedss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string number_unsignedss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_number_unsignedss_adjust_
- extern f_status_t f_number_unsignedss_adjust(const f_number_unsigned_t length, f_number_unsignedss_t * const structure);
-#endif // _di_f_number_unsignedss_adjust_
-
-/**
- * Append the single source number_unsigneds onto the destination.
- *
- * @param source
- * The source number_unsigneds to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_number_unsignedss_append_
- extern f_status_t f_number_unsignedss_append(const f_number_unsigneds_t source, f_number_unsignedss_t * const destination);
-#endif // _di_f_number_unsignedss_append_
-
-/**
- * Append the source number_unsignedss onto the destination.
- *
- * @param source
- * The source number_unsignedss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_number_unsignedss_append_all_
- extern f_status_t f_number_unsignedss_append_all(const f_number_unsignedss_t source, f_number_unsignedss_t * const destination);
-#endif // _di_f_number_unsignedss_append_all_
-
-/**
- * Resize the string number_unsignedss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string number_unsignedss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_number_unsignedss_decimate_by_
- extern f_status_t f_number_unsignedss_decimate_by(const f_number_unsigned_t amount, f_number_unsignedss_t * const structure);
-#endif // _di_f_number_unsignedss_decimate_by_
+#ifndef _di_f_number_unsigneds_adjust_callback_
+ extern f_status_t f_number_unsigneds_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_number_unsigneds_adjust_callback_
/**
- * Resize the string number_unsignedss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string number_unsignedss array to resize.
- *
- * @return
- * F_none on success.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_number_unsignedss_t structure.
*
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_number_unsignedss_decrease_by_
- extern f_status_t f_number_unsignedss_decrease_by(const f_number_unsigned_t amount, f_number_unsignedss_t * const structure);
-#endif // _di_f_number_unsignedss_decrease_by_
-
-/**
- * Increase the size of the string number_unsignedss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string number_unsignedss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_number_unsignedss_increase_
- extern f_status_t f_number_unsignedss_increase(const f_number_unsigned_t step, f_number_unsignedss_t * const structure);
-#endif // _di_f_number_unsignedss_increase_
-
-/**
- * Resize the string number_unsignedss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string number_unsignedss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_number_unsignedss_increase_by_
- extern f_status_t f_number_unsignedss_increase_by(const f_number_unsigned_t amount, f_number_unsignedss_t * const structure);
-#endif // _di_f_number_unsignedss_increase_by_
-
-/**
- * Resize the string number_unsignedss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string number_unsignedss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_number_unsignedss_resize_
- extern f_status_t f_number_unsignedss_resize(const f_number_unsigned_t length, f_number_unsignedss_t * const structure);
-#endif // _di_f_number_unsignedss_resize_
+#ifndef _di_f_number_unsigneds_resize_callback_
+ extern f_status_t f_number_unsigneds_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_number_unsigneds_resize_callback_
#ifdef __cplusplus
} // extern "C"
+++ /dev/null
-#include "../type_array.h"
-#include "private-cell.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_cells_append_) || !defined(_di_f_cellss_append_)
- extern f_status_t private_f_cells_append(const f_cell_t source, f_cells_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_cell_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_cells_append_) || !defined(_di_f_cellss_append_)
-
-#if !defined(_di_f_cells_append_) || !defined(_di_f_cells_append_all_) || !defined(_di_f_cellss_append_all_)
- extern f_status_t private_f_cells_append_all(const f_cells_t source, f_cells_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_cell_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
-
- destination->array[destination->used].row = source.array[i].row;
- destination->array[destination->used++].column = source.array[i].column;
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_cells_append_) || !defined(_di_f_cells_append_all_) || !defined(_di_f_cellss_append_all_)
-
-#if !defined(_di_f_cellss_adjust_) || !defined(_di_f_cellss_decimate_by_)
- f_status_t private_f_cellss_adjust(const f_number_unsigned_t length, f_cellss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(f_cell_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_cells_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_cellss_adjust_) || !defined(_di_f_cellss_decimate_by_)
-
-#if !defined(_di_f_cellss_decrease_by_) || !defined(_di_f_cellss_increase_) || !defined(_di_f_cellss_increase_by_) || !defined(_di_f_cellss_resize_)
- f_status_t private_f_cellss_resize(const f_number_unsigned_t length, f_cellss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(f_cell_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_cells_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_cellss_decrease_by_) || !defined(_di_f_cellss_increase_) || !defined(_di_f_cellss_increase_by_) || !defined(_di_f_cellss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_cell_h
-#define _PRIVATE_F_type_array_cell_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the cell array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source cell to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_cells_append()
- * @see f_cellss_append()
- */
-#if !defined(_di_f_cells_append_) || !defined(_di_f_cellss_append_)
- extern f_status_t private_f_cells_append(const f_cell_t source, f_cells_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_cells_append_) || !defined(_di_f_cellss_append_)
-
-/**
- * Private implementation for appending the cell array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source cells to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_cells_append_all()
- * @see f_cellss_append()
- * @see f_cellss_append_all()
- */
-#if !defined(_di_f_cells_append_) || !defined(_di_f_cells_append_all_) || !defined(_di_f_cellss_append_all_)
- extern f_status_t private_f_cells_append_all(const f_cells_t source, f_cells_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_cells_append_) || !defined(_di_f_cells_append_all_) || !defined(_di_f_cellss_append_all_)
-
-/**
- * Private implementation for resizing the cellss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The cellss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_cellss_adjust()
- * @see f_cellss_decimate_by()
- */
-#if !defined(_di_f_cellss_adjust_) || !defined(_di_f_cellss_decimate_by_)
- extern f_status_t private_f_cellss_adjust(const f_number_unsigned_t length, f_cellss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_cellss_adjust_) || !defined(_di_f_cellss_decimate_by_)
-
-/**
- * Private implementation for resizing the cellss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The cellss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_cellss_decrease_by()
- * @see f_cellss_increase()
- * @see f_cellss_increase_by()
- * @see f_cellss_resize()
- */
-#if !defined(_di_f_cellss_decrease_by_) || !defined(_di_f_cellss_increase_) || !defined(_di_f_cellss_increase_by_) || !defined(_di_f_cellss_resize_)
- extern f_status_t private_f_cellss_resize(const f_number_unsigned_t length, f_cellss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_cellss_decrease_by_) || !defined(_di_f_cellss_increase_) || !defined(_di_f_cellss_increase_by_) || !defined(_di_f_cellss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_cell_h
+++ /dev/null
-#include "../type_array.h"
-#include "../type_array_file.h"
-#include "private-file.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_files_append_) || !defined(_di_f_filess_append_)
- extern f_status_t private_f_files_append(const f_file_t source, f_files_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_file_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_files_append_) || !defined(_di_f_filess_append_)
-
-#if !defined(_di_f_files_append_) || !defined(_di_f_files_append_all_) || !defined(_di_f_filess_append_all_)
- extern f_status_t private_f_files_append_all(const f_files_t source, f_files_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_file_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_files_append_) || !defined(_di_f_files_append_all_) || !defined(_di_f_filess_append_all_)
-
-#if !defined(_di_f_filess_adjust_) || !defined(_di_f_filess_decimate_by_)
- f_status_t private_f_filess_adjust(const f_number_unsigned_t length, f_filess_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(f_file_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_files_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_filess_adjust_) || !defined(_di_f_filess_decimate_by_)
-
-#if !defined(_di_f_filess_decrease_by_) || !defined(_di_f_filess_increase_) || !defined(_di_f_filess_increase_by_) || !defined(_di_f_filess_resize_)
- f_status_t private_f_filess_resize(const f_number_unsigned_t length, f_filess_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(f_file_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_files_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_filess_decrease_by_) || !defined(_di_f_filess_increase_) || !defined(_di_f_filess_increase_by_) || !defined(_di_f_filess_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_file_h
-#define _PRIVATE_F_type_array_file_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for resizing the files array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The files array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_files_adjust()
- * @see f_files_decimate_by()
- */
-#if !defined(_di_f_files_adjust_) || !defined(_di_f_files_decimate_by_)
- extern f_status_t private_f_files_adjust(const f_number_unsigned_t length, f_files_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_files_adjust_) || !defined(_di_f_files_decimate_by_)
-
-/**
- * Private implementation for appending the file array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source file to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_files_append()
- * @see f_filess_append()
- */
-#if !defined(_di_f_files_append_) || !defined(_di_f_filess_append_)
- extern f_status_t private_f_files_append(const f_file_t source, f_files_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_files_append_) || !defined(_di_f_filess_append_)
-
-/**
- * Private implementation for appending the file array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source files to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- * @see f_files_append_all()
- * @see f_filess_append()
- * @see f_filess_append_all()
- */
-#if !defined(_di_f_files_append_) || !defined(_di_f_files_append_all_) || !defined(_di_f_filess_append_all_)
- extern f_status_t private_f_files_append_all(const f_files_t source, f_files_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_files_append_) || !defined(_di_f_files_append_all_) || !defined(_di_f_filess_append_all_)
-
-/**
- * Private implementation for resizing the files array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The files array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * Errors (with error bit) from: f_memory_resize().
- *
- * @see f_files_append()
- * @see f_files_append_all()
- * @see f_files_decrease_by()
- * @see f_files_increase()
- * @see f_files_increase_by()
- * @see f_files_resize()
- * @see f_filess_append()
- * @see f_filess_append_all()
- *
- */
-#if !defined(_di_f_files_append_) || !defined(_di_f_files_append_all_) || !defined(_di_f_files_decrease_by_) || !defined(_di_f_files_increase_) || !defined(_di_f_files_increase_by_) || !defined(_di_f_files_resize_) || !defined(_di_f_filess_append_) || !defined(_di_f_filess_append_all_)
- extern f_status_t private_f_files_resize(const f_number_unsigned_t length, f_files_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_files_append_) || !defined(_di_f_files_append_all_) || !defined(_di_f_files_decrease_by_) || !defined(_di_f_files_increase_) || !defined(_di_f_files_increase_by_) || !defined(_di_f_files_resize_) || !defined(_di_f_filess_append_) || !defined(_di_f_filess_append_all_)
-
-/**
- * Private implementation for resizing the filess array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The filess array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: f_memory_destroy().
- *
- * @see f_filess_adjust()
- * @see f_filess_decimate_by()
- */
-#if !defined(_di_f_filess_adjust_) || !defined(_di_f_filess_decimate_by_)
- extern f_status_t private_f_filess_adjust(const f_number_unsigned_t length, f_filess_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_filess_adjust_) || !defined(_di_f_filess_decimate_by_)
-
-/**
- * Private implementation for resizing the filess array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The filess array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_delete().
- * Errors (with error bit) from: f_memory_resize().
- *
- * @see f_filess_decrease_by()
- * @see f_filess_increase()
- * @see f_filess_increase_by()
- * @see f_filess_resize()
- */
-#if !defined(_di_f_filess_decrease_by_) || !defined(_di_f_filess_increase_) || !defined(_di_f_filess_increase_by_) || !defined(_di_f_filess_resize_)
- extern f_status_t private_f_filess_resize(const f_number_unsigned_t length, f_filess_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_filess_decrease_by_) || !defined(_di_f_filess_increase_) || !defined(_di_f_filess_increase_by_) || !defined(_di_f_filess_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_file_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-fll_id.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_idss_append_)
- extern f_status_t private_f_fll_ids_append(const f_fll_id_t source, f_fll_ids_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_fll_id_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- memcpy(destination->array[destination->used].name, source.name, sizeof(char) * f_fll_id_name_length_d);
-
- destination->array[destination->used].type = source.type;
- destination->array[destination->used++].used = source.used;
-
- return F_none;
- }
-#endif // !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_idss_append_)
-
-#if !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_ids_append_all_) || !defined(_di_f_fll_idss_append_all_)
- extern f_status_t private_f_fll_ids_append_all(const f_fll_ids_t source, f_fll_ids_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_fll_id_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
-
- memcpy(destination->array[destination->used].name, source.array[i].name, sizeof(char) * f_fll_id_name_length_d);
-
- destination->array[destination->used].type = source.array[i].type;
- destination->array[destination->used++].used = source.array[i].used;
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_ids_append_all_) || !defined(_di_f_fll_idss_append_all_)
-
-#if !defined(_di_f_fll_idss_adjust_) || !defined(_di_f_fll_idss_decimate_by_)
- f_status_t private_f_fll_idss_adjust(const f_number_unsigned_t length, f_fll_idss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(f_fll_id_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_fll_ids_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_fll_idss_adjust_) || !defined(_di_f_fll_idss_decimate_by_)
-
-#if !defined(_di_f_fll_idss_decrease_by_) || !defined(_di_f_fll_idss_increase_) || !defined(_di_f_fll_idss_increase_by_) || !defined(_di_f_fll_idss_resize_)
- f_status_t private_f_fll_idss_resize(const f_number_unsigned_t length, f_fll_idss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(f_fll_id_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_fll_ids_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_fll_idss_decrease_by_) || !defined(_di_f_fll_idss_increase_) || !defined(_di_f_fll_idss_increase_by_) || !defined(_di_f_fll_idss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_cell_h
-#define _PRIVATE_F_type_array_cell_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the fll_id array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source fll_id to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_fll_ids_append()
- * @see f_fll_idss_append()
- */
-#if !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_idss_append_)
- extern f_status_t private_f_fll_ids_append(const f_fll_id_t source, f_fll_ids_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_idss_append_)
-
-/**
- * Private implementation for appending the fll_id array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source fll_ids to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_fll_ids_append_all()
- * @see f_fll_idss_append()
- * @see f_fll_idss_append_all()
- */
-#if !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_ids_append_all_) || !defined(_di_f_fll_idss_append_all_)
- extern f_status_t private_f_fll_ids_append_all(const f_fll_ids_t source, f_fll_ids_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_ids_append_all_) || !defined(_di_f_fll_idss_append_all_)
-
-/**
- * Private implementation for resizing the fll_idss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The fll_idss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_fll_idss_adjust()
- * @see f_fll_idss_decimate_by()
- */
-#if !defined(_di_f_fll_idss_adjust_) || !defined(_di_f_fll_idss_decimate_by_)
- extern f_status_t private_f_fll_idss_adjust(const f_number_unsigned_t length, f_fll_idss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fll_idss_adjust_) || !defined(_di_f_fll_idss_decimate_by_)
-
-/**
- * Private implementation for resizing the fll_idss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The fll_idss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_fll_idss_decrease_by()
- * @see f_fll_idss_increase()
- * @see f_fll_idss_increase_by()
- * @see f_fll_idss_resize()
- */
-#if !defined(_di_f_fll_idss_decrease_by_) || !defined(_di_f_fll_idss_increase_) || !defined(_di_f_fll_idss_increase_by_) || !defined(_di_f_fll_idss_resize_)
- extern f_status_t private_f_fll_idss_resize(const f_number_unsigned_t length, f_fll_idss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_fll_idss_decrease_by_) || !defined(_di_f_fll_idss_increase_) || !defined(_di_f_fll_idss_increase_by_) || !defined(_di_f_fll_idss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_cell_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-int128.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_int128s_append_) || !defined(_di_f_int128ss_append_)
- extern f_status_t private_f_int128s_append(const int128_t source, f_int128s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(int128_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_int128s_append_) || !defined(_di_f_int128ss_append_)
-
-#if !defined(_di_f_int128s_append_) || !defined(_di_f_int128s_append_all_) || !defined(_di_f_int128ss_append_all_)
- extern f_status_t private_f_int128s_append_all(const f_int128s_t source, f_int128s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(int128_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_int128s_append_) || !defined(_di_f_int128s_append_all_) || !defined(_di_f_int128ss_append_all_)
-
-#if !defined(_di_f_int128ss_adjust_) || !defined(_di_f_int128ss_decimate_by_)
- f_status_t private_f_int128ss_adjust(const f_number_unsigned_t length, f_int128ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(int128_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_int128s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_int128ss_adjust_) || !defined(_di_f_int128ss_decimate_by_)
-
-#if !defined(_di_f_int128ss_decrease_by_) || !defined(_di_f_int128ss_increase_) || !defined(_di_f_int128ss_increase_by_) || !defined(_di_f_int128ss_resize_)
- f_status_t private_f_int128ss_resize(const f_number_unsigned_t length, f_int128ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(int128_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_int128s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_int128ss_decrease_by_) || !defined(_di_f_int128ss_increase_) || !defined(_di_f_int128ss_increase_by_) || !defined(_di_f_int128ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_int128_h
-#define _PRIVATE_F_type_array_int128_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the int128 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source int128 to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_int128s_append()
- * @see f_int128ss_append()
- */
-#if !defined(_di_f_int128s_append_) || !defined(_di_f_int128ss_append_)
- extern f_status_t private_f_int128s_append(const int128_t source, f_int128s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int128s_append_) || !defined(_di_f_int128ss_append_)
-
-/**
- * Private implementation for appending the int128 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source int128s to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_int128s_append_all()
- * @see f_int128ss_append()
- * @see f_int128ss_append_all()
- */
-#if !defined(_di_f_int128s_append_) || !defined(_di_f_int128s_append_all_) || !defined(_di_f_int128ss_append_all_)
- extern f_status_t private_f_int128s_append_all(const f_int128s_t source, f_int128s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int128s_append_) || !defined(_di_f_int128s_append_all_) || !defined(_di_f_int128ss_append_all_)
-
-/**
- * Private implementation for resizing the int128ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The int128ss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_int128ss_adjust()
- * @see f_int128ss_decimate_by()
- */
-#if !defined(_di_f_int128ss_adjust_) || !defined(_di_f_int128ss_decimate_by_)
- extern f_status_t private_f_int128ss_adjust(const f_number_unsigned_t length, f_int128ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int128ss_adjust_) || !defined(_di_f_int128ss_decimate_by_)
-
-/**
- * Private implementation for resizing the int128ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The int128ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_int128ss_decrease_by()
- * @see f_int128ss_increase()
- * @see f_int128ss_increase_by()
- * @see f_int128ss_resize()
- */
-#if !defined(_di_f_int128ss_decrease_by_) || !defined(_di_f_int128ss_increase_) || !defined(_di_f_int128ss_increase_by_) || !defined(_di_f_int128ss_resize_)
- extern f_status_t private_f_int128ss_resize(const f_number_unsigned_t length, f_int128ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int128ss_decrease_by_) || !defined(_di_f_int128ss_increase_) || !defined(_di_f_int128ss_increase_by_) || !defined(_di_f_int128ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_int128_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-int16.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_int16s_append_) || !defined(_di_f_int16ss_append_)
- extern f_status_t private_f_int16s_append(const int16_t source, f_int16s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(int16_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_int16s_append_) || !defined(_di_f_int16ss_append_)
-
-#if !defined(_di_f_int16s_append_) || !defined(_di_f_int16s_append_all_) || !defined(_di_f_int16ss_append_all_)
- extern f_status_t private_f_int16s_append_all(const f_int16s_t source, f_int16s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(int16_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_int16s_append_) || !defined(_di_f_int16s_append_all_) || !defined(_di_f_int16ss_append_all_)
-
-#if !defined(_di_f_int16ss_adjust_) || !defined(_di_f_int16ss_decimate_by_)
- f_status_t private_f_int16ss_adjust(const f_number_unsigned_t length, f_int16ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(int16_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_int16s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_int16ss_adjust_) || !defined(_di_f_int16ss_decimate_by_)
-
-#if !defined(_di_f_int16ss_decrease_by_) || !defined(_di_f_int16ss_increase_) || !defined(_di_f_int16ss_increase_by_) || !defined(_di_f_int16ss_resize_)
- f_status_t private_f_int16ss_resize(const f_number_unsigned_t length, f_int16ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(int16_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_int16s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_int16ss_decrease_by_) || !defined(_di_f_int16ss_increase_) || !defined(_di_f_int16ss_increase_by_) || !defined(_di_f_int16ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_int16_h
-#define _PRIVATE_F_type_array_int16_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the int16 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source int16 to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_int16s_append()
- * @see f_int16ss_append()
- */
-#if !defined(_di_f_int16s_append_) || !defined(_di_f_int16ss_append_)
- extern f_status_t private_f_int16s_append(const int16_t source, f_int16s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int16s_append_) || !defined(_di_f_int16ss_append_)
-
-/**
- * Private implementation for appending the int16 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source int16s to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_int16s_append_all()
- * @see f_int16ss_append()
- * @see f_int16ss_append_all()
- */
-#if !defined(_di_f_int16s_append_) || !defined(_di_f_int16s_append_all_) || !defined(_di_f_int16ss_append_all_)
- extern f_status_t private_f_int16s_append_all(const f_int16s_t source, f_int16s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int16s_append_) || !defined(_di_f_int16s_append_all_) || !defined(_di_f_int16ss_append_all_)
-
-/**
- * Private implementation for resizing the int16ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The int16ss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_int16ss_adjust()
- * @see f_int16ss_decimate_by()
- */
-#if !defined(_di_f_int16ss_adjust_) || !defined(_di_f_int16ss_decimate_by_)
- extern f_status_t private_f_int16ss_adjust(const f_number_unsigned_t length, f_int16ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int16ss_adjust_) || !defined(_di_f_int16ss_decimate_by_)
-
-/**
- * Private implementation for resizing the int16ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The int16ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_int16ss_decrease_by()
- * @see f_int16ss_increase()
- * @see f_int16ss_increase_by()
- * @see f_int16ss_resize()
- */
-#if !defined(_di_f_int16ss_decrease_by_) || !defined(_di_f_int16ss_increase_) || !defined(_di_f_int16ss_increase_by_) || !defined(_di_f_int16ss_resize_)
- extern f_status_t private_f_int16ss_resize(const f_number_unsigned_t length, f_int16ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int16ss_decrease_by_) || !defined(_di_f_int16ss_increase_) || !defined(_di_f_int16ss_increase_by_) || !defined(_di_f_int16ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_int16_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-int32.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_int32s_append_) || !defined(_di_f_int32ss_append_)
- extern f_status_t private_f_int32s_append(const int32_t source, f_int32s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(int32_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_int32s_append_) || !defined(_di_f_int32ss_append_)
-
-#if !defined(_di_f_int32s_append_) || !defined(_di_f_int32s_append_all_) || !defined(_di_f_int32ss_append_all_)
- extern f_status_t private_f_int32s_append_all(const f_int32s_t source, f_int32s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(int32_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_int32s_append_) || !defined(_di_f_int32s_append_all_) || !defined(_di_f_int32ss_append_all_)
-
-#if !defined(_di_f_int32ss_adjust_) || !defined(_di_f_int32ss_decimate_by_)
- f_status_t private_f_int32ss_adjust(const f_number_unsigned_t length, f_int32ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(int32_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_int32s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_int32ss_adjust_) || !defined(_di_f_int32ss_decimate_by_)
-
-#if !defined(_di_f_int32ss_decrease_by_) || !defined(_di_f_int32ss_increase_) || !defined(_di_f_int32ss_increase_by_) || !defined(_di_f_int32ss_resize_)
- f_status_t private_f_int32ss_resize(const f_number_unsigned_t length, f_int32ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(int32_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_int32s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_int32ss_decrease_by_) || !defined(_di_f_int32ss_increase_) || !defined(_di_f_int32ss_increase_by_) || !defined(_di_f_int32ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_int32_h
-#define _PRIVATE_F_type_array_int32_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the int32 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source int32 to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_int32s_append()
- * @see f_int32ss_append()
- */
-#if !defined(_di_f_int32s_append_) || !defined(_di_f_int32ss_append_)
- extern f_status_t private_f_int32s_append(const int32_t source, f_int32s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int32s_append_) || !defined(_di_f_int32ss_append_)
-
-/**
- * Private implementation for appending the int32 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source int32s to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_int32s_append_all()
- * @see f_int32ss_append()
- * @see f_int32ss_append_all()
- */
-#if !defined(_di_f_int32s_append_) || !defined(_di_f_int32s_append_all_) || !defined(_di_f_int32ss_append_all_)
- extern f_status_t private_f_int32s_append_all(const f_int32s_t source, f_int32s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int32s_append_) || !defined(_di_f_int32s_append_all_) || !defined(_di_f_int32ss_append_all_)
-
-/**
- * Private implementation for resizing the int32ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The int32ss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_int32ss_adjust()
- * @see f_int32ss_decimate_by()
- */
-#if !defined(_di_f_int32ss_adjust_) || !defined(_di_f_int32ss_decimate_by_)
- extern f_status_t private_f_int32ss_adjust(const f_number_unsigned_t length, f_int32ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int32ss_adjust_) || !defined(_di_f_int32ss_decimate_by_)
-
-/**
- * Private implementation for resizing the int32ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The int32ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_int32ss_decrease_by()
- * @see f_int32ss_increase()
- * @see f_int32ss_increase_by()
- * @see f_int32ss_resize()
- */
-#if !defined(_di_f_int32ss_decrease_by_) || !defined(_di_f_int32ss_increase_) || !defined(_di_f_int32ss_increase_by_) || !defined(_di_f_int32ss_resize_)
- extern f_status_t private_f_int32ss_resize(const f_number_unsigned_t length, f_int32ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int32ss_decrease_by_) || !defined(_di_f_int32ss_increase_) || !defined(_di_f_int32ss_increase_by_) || !defined(_di_f_int32ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_int32_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-int64.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_int64s_append_) || !defined(_di_f_int64ss_append_)
- extern f_status_t private_f_int64s_append(const int64_t source, f_int64s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(int64_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_int64s_append_) || !defined(_di_f_int64ss_append_)
-
-#if !defined(_di_f_int64s_append_) || !defined(_di_f_int64s_append_all_) || !defined(_di_f_int64ss_append_all_)
- extern f_status_t private_f_int64s_append_all(const f_int64s_t source, f_int64s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(int64_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_int64s_append_) || !defined(_di_f_int64s_append_all_) || !defined(_di_f_int64ss_append_all_)
-
-#if !defined(_di_f_int64ss_adjust_) || !defined(_di_f_int64ss_decimate_by_)
- f_status_t private_f_int64ss_adjust(const f_number_unsigned_t length, f_int64ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(int64_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_int64s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_int64ss_adjust_) || !defined(_di_f_int64ss_decimate_by_)
-
-#if !defined(_di_f_int64ss_decrease_by_) || !defined(_di_f_int64ss_increase_) || !defined(_di_f_int64ss_increase_by_) || !defined(_di_f_int64ss_resize_)
- f_status_t private_f_int64ss_resize(const f_number_unsigned_t length, f_int64ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(int64_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_int64s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_int64ss_decrease_by_) || !defined(_di_f_int64ss_increase_) || !defined(_di_f_int64ss_increase_by_) || !defined(_di_f_int64ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_int64_h
-#define _PRIVATE_F_type_array_int64_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the int64 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source int64 to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_int64s_append()
- * @see f_int64ss_append()
- */
-#if !defined(_di_f_int64s_append_) || !defined(_di_f_int64ss_append_)
- extern f_status_t private_f_int64s_append(const int64_t source, f_int64s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int64s_append_) || !defined(_di_f_int64ss_append_)
-
-/**
- * Private implementation for appending the int64 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source int64s to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_int64s_append_all()
- * @see f_int64ss_append()
- * @see f_int64ss_append_all()
- */
-#if !defined(_di_f_int64s_append_) || !defined(_di_f_int64s_append_all_) || !defined(_di_f_int64ss_append_all_)
- extern f_status_t private_f_int64s_append_all(const f_int64s_t source, f_int64s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int64s_append_) || !defined(_di_f_int64s_append_all_) || !defined(_di_f_int64ss_append_all_)
-
-/**
- * Private implementation for resizing the int64ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The int64ss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_int64ss_adjust()
- * @see f_int64ss_decimate_by()
- */
-#if !defined(_di_f_int64ss_adjust_) || !defined(_di_f_int64ss_decimate_by_)
- extern f_status_t private_f_int64ss_adjust(const f_number_unsigned_t length, f_int64ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int64ss_adjust_) || !defined(_di_f_int64ss_decimate_by_)
-
-/**
- * Private implementation for resizing the int64ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The int64ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_int64ss_decrease_by()
- * @see f_int64ss_increase()
- * @see f_int64ss_increase_by()
- * @see f_int64ss_resize()
- */
-#if !defined(_di_f_int64ss_decrease_by_) || !defined(_di_f_int64ss_increase_) || !defined(_di_f_int64ss_increase_by_) || !defined(_di_f_int64ss_resize_)
- extern f_status_t private_f_int64ss_resize(const f_number_unsigned_t length, f_int64ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int64ss_decrease_by_) || !defined(_di_f_int64ss_increase_) || !defined(_di_f_int64ss_increase_by_) || !defined(_di_f_int64ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_int64_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-int8.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_int8s_append_) || !defined(_di_f_int8ss_append_)
- extern f_status_t private_f_int8s_append(const int8_t source, f_int8s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(int8_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_int8s_append_) || !defined(_di_f_int8ss_append_)
-
-#if !defined(_di_f_int8s_append_) || !defined(_di_f_int8s_append_all_) || !defined(_di_f_int8ss_append_all_)
- extern f_status_t private_f_int8s_append_all(const f_int8s_t source, f_int8s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(int8_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_int8s_append_) || !defined(_di_f_int8s_append_all_) || !defined(_di_f_int8ss_append_all_)
-
-#if !defined(_di_f_int8ss_adjust_) || !defined(_di_f_int8ss_decimate_by_)
- f_status_t private_f_int8ss_adjust(const f_number_unsigned_t length, f_int8ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(int8_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_int8s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_int8ss_adjust_) || !defined(_di_f_int8ss_decimate_by_)
-
-#if !defined(_di_f_int8ss_decrease_by_) || !defined(_di_f_int8ss_increase_) || !defined(_di_f_int8ss_increase_by_) || !defined(_di_f_int8ss_resize_)
- f_status_t private_f_int8ss_resize(const f_number_unsigned_t length, f_int8ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(int8_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_int8s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_int8ss_decrease_by_) || !defined(_di_f_int8ss_increase_) || !defined(_di_f_int8ss_increase_by_) || !defined(_di_f_int8ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_int8_h
-#define _PRIVATE_F_type_array_int8_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the int8 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source int8 to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_int8s_append()
- * @see f_int8ss_append()
- */
-#if !defined(_di_f_int8s_append_) || !defined(_di_f_int8ss_append_)
- extern f_status_t private_f_int8s_append(const int8_t source, f_int8s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int8s_append_) || !defined(_di_f_int8ss_append_)
-
-/**
- * Private implementation for appending the int8 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source int8s to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_int8s_append_all()
- * @see f_int8ss_append()
- * @see f_int8ss_append_all()
- */
-#if !defined(_di_f_int8s_append_) || !defined(_di_f_int8s_append_all_) || !defined(_di_f_int8ss_append_all_)
- extern f_status_t private_f_int8s_append_all(const f_int8s_t source, f_int8s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int8s_append_) || !defined(_di_f_int8s_append_all_) || !defined(_di_f_int8ss_append_all_)
-
-/**
- * Private implementation for resizing the int8ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The int8ss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_int8ss_adjust()
- * @see f_int8ss_decimate_by()
- */
-#if !defined(_di_f_int8ss_adjust_) || !defined(_di_f_int8ss_decimate_by_)
- extern f_status_t private_f_int8ss_adjust(const f_number_unsigned_t length, f_int8ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int8ss_adjust_) || !defined(_di_f_int8ss_decimate_by_)
-
-/**
- * Private implementation for resizing the int8ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The int8ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_int8ss_decrease_by()
- * @see f_int8ss_increase()
- * @see f_int8ss_increase_by()
- * @see f_int8ss_resize()
- */
-#if !defined(_di_f_int8ss_decrease_by_) || !defined(_di_f_int8ss_increase_) || !defined(_di_f_int8ss_increase_by_) || !defined(_di_f_int8ss_resize_)
- extern f_status_t private_f_int8ss_resize(const f_number_unsigned_t length, f_int8ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_int8ss_decrease_by_) || !defined(_di_f_int8ss_increase_) || !defined(_di_f_int8ss_increase_by_) || !defined(_di_f_int8ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_int8_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-uint128.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
- extern f_status_t private_f_uint128s_append(const uint128_t source, f_uint128s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(uint128_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
-
-#if !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_append_all_) || !defined(_di_f_uint128ss_append_all_)
- extern f_status_t private_f_uint128s_append_all(const f_uint128s_t source, f_uint128s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(uint128_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_append_all_) || !defined(_di_f_uint128ss_append_all_)
-
-#if !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
- f_status_t private_f_uint128ss_adjust(const f_number_unsigned_t length, f_uint128ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(uint128_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_uint128s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
-
-#if !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
- f_status_t private_f_uint128ss_resize(const f_number_unsigned_t length, f_uint128ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(uint128_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_uint128s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_uint128_h
-#define _PRIVATE_F_type_array_uint128_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the uint128 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source uint128 to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_uint128s_append()
- * @see f_uint128ss_append()
- */
-#if !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
- extern f_status_t private_f_uint128s_append(const uint128_t source, f_uint128s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
-
-/**
- * Private implementation for appending the uint128 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source uint128s to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_uint128s_append_all()
- * @see f_uint128ss_append()
- * @see f_uint128ss_append_all()
- */
-#if !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_append_all_) || !defined(_di_f_uint128ss_append_all_)
- extern f_status_t private_f_uint128s_append_all(const f_uint128s_t source, f_uint128s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_append_all_) || !defined(_di_f_uint128ss_append_all_)
-
-/**
- * Private implementation for resizing the uint128ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The uint128ss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_uint128ss_adjust()
- * @see f_uint128ss_decimate_by()
- */
-#if !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
- extern f_status_t private_f_uint128ss_adjust(const f_number_unsigned_t length, f_uint128ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
-
-/**
- * Private implementation for resizing the uint128ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The uint128ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_uint128ss_decrease_by()
- * @see f_uint128ss_increase()
- * @see f_uint128ss_increase_by()
- * @see f_uint128ss_resize()
- */
-#if !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
- extern f_status_t private_f_uint128ss_resize(const f_number_unsigned_t length, f_uint128ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_uint128_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-uint16.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
- extern f_status_t private_f_uint16s_append(const uint16_t source, f_uint16s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(uint16_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
-
-#if !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_append_all_) || !defined(_di_f_uint16ss_append_all_)
- extern f_status_t private_f_uint16s_append_all(const f_uint16s_t source, f_uint16s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(uint16_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_append_all_) || !defined(_di_f_uint16ss_append_all_)
-
-#if !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
- f_status_t private_f_uint16ss_adjust(const f_number_unsigned_t length, f_uint16ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(uint16_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_uint16s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
-
-#if !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
- f_status_t private_f_uint16ss_resize(const f_number_unsigned_t length, f_uint16ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(uint16_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_uint16s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_uint16_h
-#define _PRIVATE_F_type_array_uint16_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the uint16 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source uint16 to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_uint16s_append()
- * @see f_uint16ss_append()
- */
-#if !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
- extern f_status_t private_f_uint16s_append(const uint16_t source, f_uint16s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
-
-/**
- * Private implementation for appending the uint16 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source uint16s to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_uint16s_append_all()
- * @see f_uint16ss_append()
- * @see f_uint16ss_append_all()
- */
-#if !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_append_all_) || !defined(_di_f_uint16ss_append_all_)
- extern f_status_t private_f_uint16s_append_all(const f_uint16s_t source, f_uint16s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_append_all_) || !defined(_di_f_uint16ss_append_all_)
-
-/**
- * Private implementation for resizing the uint16ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The uint16ss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_uint16ss_adjust()
- * @see f_uint16ss_decimate_by()
- */
-#if !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
- extern f_status_t private_f_uint16ss_adjust(const f_number_unsigned_t length, f_uint16ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
-
-/**
- * Private implementation for resizing the uint16ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The uint16ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_uint16ss_decrease_by()
- * @see f_uint16ss_increase()
- * @see f_uint16ss_increase_by()
- * @see f_uint16ss_resize()
- */
-#if !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
- extern f_status_t private_f_uint16ss_resize(const f_number_unsigned_t length, f_uint16ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_uint16_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-uint32.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
- extern f_status_t private_f_uint32s_append(const uint32_t source, f_uint32s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(uint32_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
-
-#if !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_append_all_) || !defined(_di_f_uint32ss_append_all_)
- extern f_status_t private_f_uint32s_append_all(const f_uint32s_t source, f_uint32s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(uint32_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_append_all_) || !defined(_di_f_uint32ss_append_all_)
-
-#if !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
- f_status_t private_f_uint32ss_adjust(const f_number_unsigned_t length, f_uint32ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(uint32_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_uint32s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
-
-#if !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
- f_status_t private_f_uint32ss_resize(const f_number_unsigned_t length, f_uint32ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(uint32_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_uint32s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_uint32_h
-#define _PRIVATE_F_type_array_uint32_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the uint32 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source uint32 to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_uint32s_append()
- * @see f_uint32ss_append()
- */
-#if !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
- extern f_status_t private_f_uint32s_append(const uint32_t source, f_uint32s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
-
-/**
- * Private implementation for appending the uint32 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source uint32s to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_uint32s_append_all()
- * @see f_uint32ss_append()
- * @see f_uint32ss_append_all()
- */
-#if !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_append_all_) || !defined(_di_f_uint32ss_append_all_)
- extern f_status_t private_f_uint32s_append_all(const f_uint32s_t source, f_uint32s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_append_all_) || !defined(_di_f_uint32ss_append_all_)
-
-/**
- * Private implementation for resizing the uint32ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The uint32ss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_uint32ss_adjust()
- * @see f_uint32ss_decimate_by()
- */
-#if !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
- extern f_status_t private_f_uint32ss_adjust(const f_number_unsigned_t length, f_uint32ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
-
-/**
- * Private implementation for resizing the uint32ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The uint32ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_uint32ss_decrease_by()
- * @see f_uint32ss_increase()
- * @see f_uint32ss_increase_by()
- * @see f_uint32ss_resize()
- */
-#if !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
- extern f_status_t private_f_uint32ss_resize(const f_number_unsigned_t length, f_uint32ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_uint32_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-uint64.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
- extern f_status_t private_f_uint64s_append(const uint64_t source, f_uint64s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(uint64_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
-
-#if !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_append_all_) || !defined(_di_f_uint64ss_append_all_)
- extern f_status_t private_f_uint64s_append_all(const f_uint64s_t source, f_uint64s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(uint64_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_append_all_) || !defined(_di_f_uint64ss_append_all_)
-
-#if !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
- f_status_t private_f_uint64ss_adjust(const f_number_unsigned_t length, f_uint64ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(uint64_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_uint64s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
-
-#if !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
- f_status_t private_f_uint64ss_resize(const f_number_unsigned_t length, f_uint64ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(uint64_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_uint64s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_uint64_h
-#define _PRIVATE_F_type_array_uint64_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the uint64 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source uint64 to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_uint64s_append()
- * @see f_uint64ss_append()
- */
-#if !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
- extern f_status_t private_f_uint64s_append(const uint64_t source, f_uint64s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
-
-/**
- * Private implementation for appending the uint64 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source uint64s to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_uint64s_append_all()
- * @see f_uint64ss_append()
- * @see f_uint64ss_append_all()
- */
-#if !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_append_all_) || !defined(_di_f_uint64ss_append_all_)
- extern f_status_t private_f_uint64s_append_all(const f_uint64s_t source, f_uint64s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_append_all_) || !defined(_di_f_uint64ss_append_all_)
-
-/**
- * Private implementation for resizing the uint64ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The uint64ss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_uint64ss_adjust()
- * @see f_uint64ss_decimate_by()
- */
-#if !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
- extern f_status_t private_f_uint64ss_adjust(const f_number_unsigned_t length, f_uint64ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
-
-/**
- * Private implementation for resizing the uint64ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The uint64ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_uint64ss_decrease_by()
- * @see f_uint64ss_increase()
- * @see f_uint64ss_increase_by()
- * @see f_uint64ss_resize()
- */
-#if !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
- extern f_status_t private_f_uint64ss_resize(const f_number_unsigned_t length, f_uint64ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_uint64_h
+++ /dev/null
-#include "../type_array.h"
-#include "private-uint8.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
- extern f_status_t private_f_uint8s_append(const uint8_t source, f_uint8s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(uint8_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- destination->array[destination->used++] = source;
-
- return F_none;
- }
-#endif // !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
-
-#if !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_append_all_) || !defined(_di_f_uint8ss_append_all_)
- extern f_status_t private_f_uint8s_append_all(const f_uint8s_t source, f_uint8s_t * const destination) {
-
- {
- const f_status_t status = f_memory_array_increase_by(source.used, sizeof(uint8_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- destination->array[destination->used++] = source.array[i];
- } // for
-
- return F_none;
- }
-#endif // !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_append_all_) || !defined(_di_f_uint8ss_append_all_)
-
-#if !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
- f_status_t private_f_uint8ss_adjust(const f_number_unsigned_t length, f_uint8ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_adjust(0, sizeof(uint8_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_adjust(length, sizeof(f_uint8s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
-
-#if !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
- f_status_t private_f_uint8ss_resize(const f_number_unsigned_t length, f_uint8ss_t * const structure) {
-
- f_status_t status = F_none;
-
- for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
- status = f_memory_array_resize(0, sizeof(uint8_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size);
- if (F_status_is_error(status)) return status;
- } // for
-
- return f_memory_array_resize(length, sizeof(f_uint8s_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_type_array_uint8_h
-#define _PRIVATE_F_type_array_uint8_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for appending the uint8 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source uint8 to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- *
- * @see f_uint8s_append()
- * @see f_uint8ss_append()
- */
-#if !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
- extern f_status_t private_f_uint8s_append(const uint8_t source, f_uint8s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
-
-/**
- * Private implementation for appending the uint8 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- * The source uint8s to append.
- * @param destination
- * The destination lengths the source is appended onto.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- *
- * @see f_uint8s_append_all()
- * @see f_uint8ss_append()
- * @see f_uint8ss_append_all()
- */
-#if !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_append_all_) || !defined(_di_f_uint8ss_append_all_)
- extern f_status_t private_f_uint8s_append_all(const f_uint8s_t source, f_uint8s_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_append_all_) || !defined(_di_f_uint8ss_append_all_)
-
-/**
- * Private implementation for resizing the uint8ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to adjust to.
- * @param structure
- * The uint8ss array to adjust.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_uint8ss_adjust()
- * @see f_uint8ss_decimate_by()
- */
-#if !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
- extern f_status_t private_f_uint8ss_adjust(const f_number_unsigned_t length, f_uint8ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
-
-/**
- * Private implementation for resizing the uint8ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- * The length to resize to.
- * @param structure
- * The uint8ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if new length is larger than max array length.
- * F_memory_not (with error bit) on out of memory.
- * 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_uint8ss_decrease_by()
- * @see f_uint8ss_increase()
- * @see f_uint8ss_increase_by()
- * @see f_uint8ss_resize()
- */
-#if !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
- extern f_status_t private_f_uint8ss_resize(const f_number_unsigned_t length, f_uint8ss_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_type_array_uint8_h
#include "../type_array.h"
#include "uint128.h"
-#include "private-uint128.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_uint128s_adjust_
- f_status_t f_uint128s_adjust(const f_number_unsigned_t length, f_uint128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_uint128s_adjust_callback_
+ f_status_t f_uint128s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(uint128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint128s_adjust_
-
-#ifndef _di_f_uint128s_append_
- f_status_t f_uint128s_append(const uint128_t source, f_uint128s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint128s_append(source, destination);
- }
-#endif // _di_f_uint128s_append_
-
-#ifndef _di_f_uint128s_append_all_
- f_status_t f_uint128s_append_all(const f_uint128s_t source, f_uint128s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_uint128s_append_all(source, destination);
- }
-#endif // _di_f_uint128s_append_all_
-
-#ifndef _di_f_uint128s_decimate_by_
- f_status_t f_uint128s_decimate_by(const f_number_unsigned_t amount, f_uint128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(uint128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint128s_decimate_by_
-
-#ifndef _di_f_uint128s_decrease_by_
- f_status_t f_uint128s_decrease_by(const f_number_unsigned_t amount, f_uint128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(uint128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint128s_decrease_by_
-
-#ifndef _di_f_uint128s_increase_
- f_status_t f_uint128s_increase(const f_number_unsigned_t step, f_uint128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(uint128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint128s_increase_
-
-#ifndef _di_f_uint128s_increase_by_
- f_status_t f_uint128s_increase_by(const f_number_unsigned_t amount, f_uint128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(uint128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint128s_increase_by_
-
-#ifndef _di_f_uint128s_resize_
- f_status_t f_uint128s_resize(const f_number_unsigned_t length, f_uint128s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(uint128_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint128s_resize_
-
-#ifndef _di_f_uint128ss_adjust_
- f_status_t f_uint128ss_adjust(const f_number_unsigned_t length, f_uint128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint128ss_adjust(length, structure);
- }
-#endif // _di_f_uint128ss_adjust_
-
-#ifndef _di_f_uint128ss_append_
- f_status_t f_uint128ss_append(const f_uint128s_t source, f_uint128ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_uint128s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_uint128s_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_uint128s_t * const array = (f_uint128s_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_uint128ss_append_
-
-#ifndef _di_f_uint128ss_append_all_
- f_status_t f_uint128ss_append_all(const f_uint128ss_t source, f_uint128ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_uint128s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_uint128s_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(f_uint128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_uint128ss_append_all_
-
-#ifndef _di_f_uint128ss_decimate_by_
- f_status_t f_uint128ss_decimate_by(const f_number_unsigned_t amount, f_uint128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_uint128ss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_uint128ss_decimate_by_
-
-#ifndef _di_f_uint128ss_decrease_by_
- f_status_t f_uint128ss_decrease_by(const f_number_unsigned_t amount, f_uint128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_uint128ss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_uint128ss_decrease_by_
-
-#ifndef _di_f_uint128ss_increase_
- f_status_t f_uint128ss_increase(const f_number_unsigned_t step, f_uint128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_uint128ss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_uint128ss_increase_
-
-#ifndef _di_f_uint128ss_increase_by_
- f_status_t f_uint128ss_increase_by(const f_number_unsigned_t amount, f_uint128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_uint128s_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_uint128s_resize_callback_
+ f_status_t f_uint128s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_uint128s_t * const array = (f_uint128s_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_uint128ss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(f_uint128_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_uint128ss_increase_by_
-
-#ifndef _di_f_uint128ss_resize_
- f_status_t f_uint128ss_resize(const f_number_unsigned_t length, f_uint128ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint128ss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_uint128ss_resize_
+#endif // _di_f_uint128s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string uint128s array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint128ss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string uint128s array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint128s_adjust_
- extern f_status_t f_uint128s_adjust(const f_number_unsigned_t length, f_uint128s_t * const structure);
-#endif // _di_f_uint128s_adjust_
-
-/**
- * Append the single source uint128 onto the destination.
- *
- * @param source
- * The source uint128 to append.
- * @param destination
- * The destination uint128s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_uint128s_append_
- extern f_status_t f_uint128s_append(const uint128_t source, f_uint128s_t * const destination);
-#endif // _di_f_uint128s_append_
-
-/**
- * Append the source uint128s onto the destination.
- *
- * @param source
- * The source uint128s to append.
- * @param destination
- * The destination uint128s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint128s_append_all_
- extern f_status_t f_uint128s_append_all(const f_uint128s_t source, f_uint128s_t * const destination);
-#endif // _di_f_uint128s_append_all_
-
-/**
- * Resize the string uint128s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string uint128s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_uint128s_decimate_by_
- extern f_status_t f_uint128s_decimate_by(const f_number_unsigned_t amount, f_uint128s_t * const structure);
-#endif // _di_f_uint128s_decimate_by_
-
-/**
- * Resize the string uint128s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string uint128s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_uint128s_decrease_by_
- extern f_status_t f_uint128s_decrease_by(const f_number_unsigned_t amount, f_uint128s_t * const structure);
-#endif // _di_f_uint128s_decrease_by_
-
-/**
- * Increase the size of the string uint128s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string uint128s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_uint128s_increase_
- extern f_status_t f_uint128s_increase(const f_number_unsigned_t step, f_uint128s_t * const structure);
-#endif // _di_f_uint128s_increase_
-
-/**
- * Resize the string uint128s array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string uint128s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint128s_increase_by_
- extern f_status_t f_uint128s_increase_by(const f_number_unsigned_t amount, f_uint128s_t * const structure);
-#endif // _di_f_uint128s_increase_by_
-
-/**
- * Resize the string uint128s array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string uint128s array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint128s_resize_
- extern f_status_t f_uint128s_resize(const f_number_unsigned_t length, f_uint128s_t * const structure);
-#endif // _di_f_uint128s_resize_
-
-/**
- * Resize the string uint128ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string uint128ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint128ss_adjust_
- extern f_status_t f_uint128ss_adjust(const f_number_unsigned_t length, f_uint128ss_t * const structure);
-#endif // _di_f_uint128ss_adjust_
-
-/**
- * Append the single source uint128s onto the destination.
- *
- * @param source
- * The source uint128s to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint128ss_append_
- extern f_status_t f_uint128ss_append(const f_uint128s_t source, f_uint128ss_t * const destination);
-#endif // _di_f_uint128ss_append_
-
-/**
- * Append the source uint128ss onto the destination.
- *
- * @param source
- * The source uint128ss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint128ss_append_all_
- extern f_status_t f_uint128ss_append_all(const f_uint128ss_t source, f_uint128ss_t * const destination);
-#endif // _di_f_uint128ss_append_all_
-
-/**
- * Resize the string uint128ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string uint128ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_uint128ss_decimate_by_
- extern f_status_t f_uint128ss_decimate_by(const f_number_unsigned_t amount, f_uint128ss_t * const structure);
-#endif // _di_f_uint128ss_decimate_by_
-
-/**
- * Resize the string uint128ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string uint128ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint128ss_decrease_by_
- extern f_status_t f_uint128ss_decrease_by(const f_number_unsigned_t amount, f_uint128ss_t * const structure);
-#endif // _di_f_uint128ss_decrease_by_
+#ifndef _di_f_uint128s_adjust_callback_
+ extern f_status_t f_uint128s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_uint128s_adjust_callback_
/**
- * Increase the size of the string uint128ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_uint128ss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string uint128ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_uint128ss_increase_
- extern f_status_t f_uint128ss_increase(const f_number_unsigned_t step, f_uint128ss_t * const structure);
-#endif // _di_f_uint128ss_increase_
-
-/**
- * Resize the string uint128ss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string uint128ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_uint128ss_increase_by_
- extern f_status_t f_uint128ss_increase_by(const f_number_unsigned_t amount, f_uint128ss_t * const structure);
-#endif // _di_f_uint128ss_increase_by_
-
-/**
- * Resize the string uint128ss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string uint128ss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_uint128ss_resize_
- extern f_status_t f_uint128ss_resize(const f_number_unsigned_t length, f_uint128ss_t * const structure);
-#endif // _di_f_uint128ss_resize_
+#ifndef _di_f_uint128s_resize_callback_
+ extern f_status_t f_uint128s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_uint128s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#include "../type_array.h"
#include "uint16.h"
-#include "private-uint16.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_uint16s_adjust_
- f_status_t f_uint16s_adjust(const f_number_unsigned_t length, f_uint16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_uint16s_adjust_callback_
+ f_status_t f_uint16s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(uint16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint16s_adjust_
-
-#ifndef _di_f_uint16s_append_
- f_status_t f_uint16s_append(const uint16_t source, f_uint16s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint16s_append(source, destination);
- }
-#endif // _di_f_uint16s_append_
-
-#ifndef _di_f_uint16s_append_all_
- f_status_t f_uint16s_append_all(const f_uint16s_t source, f_uint16s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_uint16s_append_all(source, destination);
- }
-#endif // _di_f_uint16s_append_all_
-
-#ifndef _di_f_uint16s_decimate_by_
- f_status_t f_uint16s_decimate_by(const f_number_unsigned_t amount, f_uint16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(uint16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint16s_decimate_by_
-
-#ifndef _di_f_uint16s_decrease_by_
- f_status_t f_uint16s_decrease_by(const f_number_unsigned_t amount, f_uint16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(uint16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint16s_decrease_by_
-
-#ifndef _di_f_uint16s_increase_
- f_status_t f_uint16s_increase(const f_number_unsigned_t step, f_uint16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(uint16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint16s_increase_
-
-#ifndef _di_f_uint16s_increase_by_
- f_status_t f_uint16s_increase_by(const f_number_unsigned_t amount, f_uint16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(uint16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint16s_increase_by_
-
-#ifndef _di_f_uint16s_resize_
- f_status_t f_uint16s_resize(const f_number_unsigned_t length, f_uint16s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(uint16_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint16s_resize_
-
-#ifndef _di_f_uint16ss_adjust_
- f_status_t f_uint16ss_adjust(const f_number_unsigned_t length, f_uint16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint16ss_adjust(length, structure);
- }
-#endif // _di_f_uint16ss_adjust_
-
-#ifndef _di_f_uint16ss_append_
- f_status_t f_uint16ss_append(const f_uint16s_t source, f_uint16ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_uint16s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_uint16s_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_uint16s_t * const array = (f_uint16s_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_uint16ss_append_
-
-#ifndef _di_f_uint16ss_append_all_
- f_status_t f_uint16ss_append_all(const f_uint16ss_t source, f_uint16ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_uint16s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_uint16s_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(uint16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_uint16ss_append_all_
-
-#ifndef _di_f_uint16ss_decimate_by_
- f_status_t f_uint16ss_decimate_by(const f_number_unsigned_t amount, f_uint16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_uint16ss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_uint16ss_decimate_by_
-
-#ifndef _di_f_uint16ss_decrease_by_
- f_status_t f_uint16ss_decrease_by(const f_number_unsigned_t amount, f_uint16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_uint16ss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_uint16ss_decrease_by_
-
-#ifndef _di_f_uint16ss_increase_
- f_status_t f_uint16ss_increase(const f_number_unsigned_t step, f_uint16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_uint16ss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_uint16ss_increase_
-
-#ifndef _di_f_uint16ss_increase_by_
- f_status_t f_uint16ss_increase_by(const f_number_unsigned_t amount, f_uint16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_uint16s_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_uint16s_resize_callback_
+ f_status_t f_uint16s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_uint16s_t * const array = (f_uint16s_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_uint16ss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(uint16_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_uint16ss_increase_by_
-
-#ifndef _di_f_uint16ss_resize_
- f_status_t f_uint16ss_resize(const f_number_unsigned_t length, f_uint16ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint16ss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_uint16ss_resize_
+#endif // _di_f_uint16s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string uint16s array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint16ss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string uint16s array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint16s_adjust_
- extern f_status_t f_uint16s_adjust(const f_number_unsigned_t length, f_uint16s_t * const structure);
-#endif // _di_f_uint16s_adjust_
-
-/**
- * Append the single source uint16 onto the destination.
- *
- * @param source
- * The source uint16 to append.
- * @param destination
- * The destination uint16s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_uint16s_append_
- extern f_status_t f_uint16s_append(const uint16_t source, f_uint16s_t * const destination);
-#endif // _di_f_uint16s_append_
-
-/**
- * Append the source uint16s onto the destination.
- *
- * @param source
- * The source uint16s to append.
- * @param destination
- * The destination uint16s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint16s_append_all_
- extern f_status_t f_uint16s_append_all(const f_uint16s_t source, f_uint16s_t * const destination);
-#endif // _di_f_uint16s_append_all_
-
-/**
- * Resize the string uint16s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string uint16s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_uint16s_decimate_by_
- extern f_status_t f_uint16s_decimate_by(const f_number_unsigned_t amount, f_uint16s_t * const structure);
-#endif // _di_f_uint16s_decimate_by_
-
-/**
- * Resize the string uint16s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string uint16s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_uint16s_decrease_by_
- extern f_status_t f_uint16s_decrease_by(const f_number_unsigned_t amount, f_uint16s_t * const structure);
-#endif // _di_f_uint16s_decrease_by_
-
-/**
- * Increase the size of the string uint16s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string uint16s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_uint16s_increase_
- extern f_status_t f_uint16s_increase(const f_number_unsigned_t step, f_uint16s_t * const structure);
-#endif // _di_f_uint16s_increase_
-
-/**
- * Resize the string uint16s array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string uint16s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint16s_increase_by_
- extern f_status_t f_uint16s_increase_by(const f_number_unsigned_t amount, f_uint16s_t * const structure);
-#endif // _di_f_uint16s_increase_by_
-
-/**
- * Resize the string uint16s array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string uint16s array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint16s_resize_
- extern f_status_t f_uint16s_resize(const f_number_unsigned_t length, f_uint16s_t * const structure);
-#endif // _di_f_uint16s_resize_
-
-/**
- * Resize the string uint16ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string uint16ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint16ss_adjust_
- extern f_status_t f_uint16ss_adjust(const f_number_unsigned_t length, f_uint16ss_t * const structure);
-#endif // _di_f_uint16ss_adjust_
-
-/**
- * Append the single source uint16s onto the destination.
- *
- * @param source
- * The source uint16s to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint16ss_append_
- extern f_status_t f_uint16ss_append(const f_uint16s_t source, f_uint16ss_t * const destination);
-#endif // _di_f_uint16ss_append_
-
-/**
- * Append the source uint16ss onto the destination.
- *
- * @param source
- * The source uint16ss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint16ss_append_all_
- extern f_status_t f_uint16ss_append_all(const f_uint16ss_t source, f_uint16ss_t * const destination);
-#endif // _di_f_uint16ss_append_all_
-
-/**
- * Resize the string uint16ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string uint16ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_uint16ss_decimate_by_
- extern f_status_t f_uint16ss_decimate_by(const f_number_unsigned_t amount, f_uint16ss_t * const structure);
-#endif // _di_f_uint16ss_decimate_by_
-
-/**
- * Resize the string uint16ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string uint16ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint16ss_decrease_by_
- extern f_status_t f_uint16ss_decrease_by(const f_number_unsigned_t amount, f_uint16ss_t * const structure);
-#endif // _di_f_uint16ss_decrease_by_
+#ifndef _di_f_uint16s_adjust_callback_
+ extern f_status_t f_uint16s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_uint16s_adjust_callback_
/**
- * Increase the size of the string uint16ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_uint16ss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string uint16ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_uint16ss_increase_
- extern f_status_t f_uint16ss_increase(const f_number_unsigned_t step, f_uint16ss_t * const structure);
-#endif // _di_f_uint16ss_increase_
-
-/**
- * Resize the string uint16ss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string uint16ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_uint16ss_increase_by_
- extern f_status_t f_uint16ss_increase_by(const f_number_unsigned_t amount, f_uint16ss_t * const structure);
-#endif // _di_f_uint16ss_increase_by_
-
-/**
- * Resize the string uint16ss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string uint16ss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_uint16ss_resize_
- extern f_status_t f_uint16ss_resize(const f_number_unsigned_t length, f_uint16ss_t * const structure);
-#endif // _di_f_uint16ss_resize_
+#ifndef _di_f_uint16s_resize_callback_
+ extern f_status_t f_uint16s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_uint16s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#include "../type_array.h"
#include "uint32.h"
-#include "private-uint32.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_uint32s_adjust_
- f_status_t f_uint32s_adjust(const f_number_unsigned_t length, f_uint32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_uint32s_adjust_callback_
+ f_status_t f_uint32s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(uint32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint32s_adjust_
-
-#ifndef _di_f_uint32s_append_
- f_status_t f_uint32s_append(const uint32_t source, f_uint32s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint32s_append(source, destination);
- }
-#endif // _di_f_uint32s_append_
-
-#ifndef _di_f_uint32s_append_all_
- f_status_t f_uint32s_append_all(const f_uint32s_t source, f_uint32s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_uint32s_append_all(source, destination);
- }
-#endif // _di_f_uint32s_append_all_
-
-#ifndef _di_f_uint32s_decimate_by_
- f_status_t f_uint32s_decimate_by(const f_number_unsigned_t amount, f_uint32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(uint32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint32s_decimate_by_
-
-#ifndef _di_f_uint32s_decrease_by_
- f_status_t f_uint32s_decrease_by(const f_number_unsigned_t amount, f_uint32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(uint32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint32s_decrease_by_
-
-#ifndef _di_f_uint32s_increase_
- f_status_t f_uint32s_increase(const f_number_unsigned_t step, f_uint32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(uint32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint32s_increase_
-
-#ifndef _di_f_uint32s_increase_by_
- f_status_t f_uint32s_increase_by(const f_number_unsigned_t amount, f_uint32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(uint32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint32s_increase_by_
-
-#ifndef _di_f_uint32s_resize_
- f_status_t f_uint32s_resize(const f_number_unsigned_t length, f_uint32s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(uint32_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint32s_resize_
-
-#ifndef _di_f_uint32ss_adjust_
- f_status_t f_uint32ss_adjust(const f_number_unsigned_t length, f_uint32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint32ss_adjust(length, structure);
- }
-#endif // _di_f_uint32ss_adjust_
-
-#ifndef _di_f_uint32ss_append_
- f_status_t f_uint32ss_append(const f_uint32s_t source, f_uint32ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_uint32s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_uint32s_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_uint32s_t * const array = (f_uint32s_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_uint32ss_append_
-
-#ifndef _di_f_uint32ss_append_all_
- f_status_t f_uint32ss_append_all(const f_uint32ss_t source, f_uint32ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_uint32s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_uint32s_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(uint32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_uint32ss_append_all_
-
-#ifndef _di_f_uint32ss_decimate_by_
- f_status_t f_uint32ss_decimate_by(const f_number_unsigned_t amount, f_uint32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_uint32ss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_uint32ss_decimate_by_
-
-#ifndef _di_f_uint32ss_decrease_by_
- f_status_t f_uint32ss_decrease_by(const f_number_unsigned_t amount, f_uint32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_uint32ss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_uint32ss_decrease_by_
-
-#ifndef _di_f_uint32ss_increase_
- f_status_t f_uint32ss_increase(const f_number_unsigned_t step, f_uint32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_uint32ss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_uint32ss_increase_
-
-#ifndef _di_f_uint32ss_increase_by_
- f_status_t f_uint32ss_increase_by(const f_number_unsigned_t amount, f_uint32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_uint32s_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_uint32s_resize_callback_
+ f_status_t f_uint32s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_uint32s_t * const array = (f_uint32s_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_uint32ss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(uint32_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_uint32ss_increase_by_
-
-#ifndef _di_f_uint32ss_resize_
- f_status_t f_uint32ss_resize(const f_number_unsigned_t length, f_uint32ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint32ss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_uint32ss_resize_
+#endif // _di_f_uint32s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string uint32s array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint32ss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string uint32s array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint32s_adjust_
- extern f_status_t f_uint32s_adjust(const f_number_unsigned_t length, f_uint32s_t * const structure);
-#endif // _di_f_uint32s_adjust_
-
-/**
- * Append the single source uint32 onto the destination.
- *
- * @param source
- * The source uint32 to append.
- * @param destination
- * The destination uint32s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_uint32s_append_
- extern f_status_t f_uint32s_append(const uint32_t source, f_uint32s_t * const destination);
-#endif // _di_f_uint32s_append_
-
-/**
- * Append the source uint32s onto the destination.
- *
- * @param source
- * The source uint32s to append.
- * @param destination
- * The destination uint32s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint32s_append_all_
- extern f_status_t f_uint32s_append_all(const f_uint32s_t source, f_uint32s_t * const destination);
-#endif // _di_f_uint32s_append_all_
-
-/**
- * Resize the string uint32s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string uint32s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_uint32s_decimate_by_
- extern f_status_t f_uint32s_decimate_by(const f_number_unsigned_t amount, f_uint32s_t * const structure);
-#endif // _di_f_uint32s_decimate_by_
-
-/**
- * Resize the string uint32s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string uint32s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_uint32s_decrease_by_
- extern f_status_t f_uint32s_decrease_by(const f_number_unsigned_t amount, f_uint32s_t * const structure);
-#endif // _di_f_uint32s_decrease_by_
-
-/**
- * Increase the size of the string uint32s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string uint32s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_uint32s_increase_
- extern f_status_t f_uint32s_increase(const f_number_unsigned_t step, f_uint32s_t * const structure);
-#endif // _di_f_uint32s_increase_
-
-/**
- * Resize the string uint32s array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string uint32s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint32s_increase_by_
- extern f_status_t f_uint32s_increase_by(const f_number_unsigned_t amount, f_uint32s_t * const structure);
-#endif // _di_f_uint32s_increase_by_
-
-/**
- * Resize the string uint32s array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string uint32s array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint32s_resize_
- extern f_status_t f_uint32s_resize(const f_number_unsigned_t length, f_uint32s_t * const structure);
-#endif // _di_f_uint32s_resize_
-
-/**
- * Resize the string uint32ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string uint32ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint32ss_adjust_
- extern f_status_t f_uint32ss_adjust(const f_number_unsigned_t length, f_uint32ss_t * const structure);
-#endif // _di_f_uint32ss_adjust_
-
-/**
- * Append the single source uint32s onto the destination.
- *
- * @param source
- * The source uint32s to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint32ss_append_
- extern f_status_t f_uint32ss_append(const f_uint32s_t source, f_uint32ss_t * const destination);
-#endif // _di_f_uint32ss_append_
-
-/**
- * Append the source uint32ss onto the destination.
- *
- * @param source
- * The source uint32ss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint32ss_append_all_
- extern f_status_t f_uint32ss_append_all(const f_uint32ss_t source, f_uint32ss_t * const destination);
-#endif // _di_f_uint32ss_append_all_
-
-/**
- * Resize the string uint32ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string uint32ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_uint32ss_decimate_by_
- extern f_status_t f_uint32ss_decimate_by(const f_number_unsigned_t amount, f_uint32ss_t * const structure);
-#endif // _di_f_uint32ss_decimate_by_
-
-/**
- * Resize the string uint32ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string uint32ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint32ss_decrease_by_
- extern f_status_t f_uint32ss_decrease_by(const f_number_unsigned_t amount, f_uint32ss_t * const structure);
-#endif // _di_f_uint32ss_decrease_by_
+#ifndef _di_f_uint32s_adjust_callback_
+ extern f_status_t f_uint32s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_uint32s_adjust_callback_
/**
- * Increase the size of the string uint32ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_uint32ss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string uint32ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_uint32ss_increase_
- extern f_status_t f_uint32ss_increase(const f_number_unsigned_t step, f_uint32ss_t * const structure);
-#endif // _di_f_uint32ss_increase_
-
-/**
- * Resize the string uint32ss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string uint32ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_uint32ss_increase_by_
- extern f_status_t f_uint32ss_increase_by(const f_number_unsigned_t amount, f_uint32ss_t * const structure);
-#endif // _di_f_uint32ss_increase_by_
-
-/**
- * Resize the string uint32ss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string uint32ss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_uint32ss_resize_
- extern f_status_t f_uint32ss_resize(const f_number_unsigned_t length, f_uint32ss_t * const structure);
-#endif // _di_f_uint32ss_resize_
+#ifndef _di_f_uint32s_resize_callback_
+ extern f_status_t f_uint32s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_uint32s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#include "../type_array.h"
#include "uint64.h"
-#include "private-uint64.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_uint64s_adjust_
- f_status_t f_uint64s_adjust(const f_number_unsigned_t length, f_uint64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_uint64s_adjust_callback_
+ f_status_t f_uint64s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(uint64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint64s_adjust_
-
-#ifndef _di_f_uint64s_append_
- f_status_t f_uint64s_append(const uint64_t source, f_uint64s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint64s_append(source, destination);
- }
-#endif // _di_f_uint64s_append_
-
-#ifndef _di_f_uint64s_append_all_
- f_status_t f_uint64s_append_all(const f_uint64s_t source, f_uint64s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_uint64s_append_all(source, destination);
- }
-#endif // _di_f_uint64s_append_all_
-
-#ifndef _di_f_uint64s_decimate_by_
- f_status_t f_uint64s_decimate_by(const f_number_unsigned_t amount, f_uint64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(uint64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint64s_decimate_by_
-
-#ifndef _di_f_uint64s_decrease_by_
- f_status_t f_uint64s_decrease_by(const f_number_unsigned_t amount, f_uint64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(uint64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint64s_decrease_by_
-
-#ifndef _di_f_uint64s_increase_
- f_status_t f_uint64s_increase(const f_number_unsigned_t step, f_uint64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(uint64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint64s_increase_
-
-#ifndef _di_f_uint64s_increase_by_
- f_status_t f_uint64s_increase_by(const f_number_unsigned_t amount, f_uint64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(uint64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint64s_increase_by_
-
-#ifndef _di_f_uint64s_resize_
- f_status_t f_uint64s_resize(const f_number_unsigned_t length, f_uint64s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(uint64_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint64s_resize_
-
-#ifndef _di_f_uint64ss_adjust_
- f_status_t f_uint64ss_adjust(const f_number_unsigned_t length, f_uint64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint64ss_adjust(length, structure);
- }
-#endif // _di_f_uint64ss_adjust_
-
-#ifndef _di_f_uint64ss_append_
- f_status_t f_uint64ss_append(const f_uint64s_t source, f_uint64ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_uint64s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_uint64s_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_uint64s_t * const array = (f_uint64s_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_uint64ss_append_
-
-#ifndef _di_f_uint64ss_append_all_
- f_status_t f_uint64ss_append_all(const f_uint64ss_t source, f_uint64ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_uint64s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_uint64s_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(uint64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_uint64ss_append_all_
-
-#ifndef _di_f_uint64ss_decimate_by_
- f_status_t f_uint64ss_decimate_by(const f_number_unsigned_t amount, f_uint64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_uint64ss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_uint64ss_decimate_by_
-
-#ifndef _di_f_uint64ss_decrease_by_
- f_status_t f_uint64ss_decrease_by(const f_number_unsigned_t amount, f_uint64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_uint64ss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_uint64ss_decrease_by_
-
-#ifndef _di_f_uint64ss_increase_
- f_status_t f_uint64ss_increase(const f_number_unsigned_t step, f_uint64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_uint64ss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_uint64ss_increase_
-
-#ifndef _di_f_uint64ss_increase_by_
- f_status_t f_uint64ss_increase_by(const f_number_unsigned_t amount, f_uint64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_uint64s_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_uint64s_resize_callback_
+ f_status_t f_uint64s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_uint64s_t * const array = (f_uint64s_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_uint64ss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(uint64_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_uint64ss_increase_by_
-
-#ifndef _di_f_uint64ss_resize_
- f_status_t f_uint64ss_resize(const f_number_unsigned_t length, f_uint64ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint64ss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_uint64ss_resize_
+#endif // _di_f_uint64s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string uint64s array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint64ss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string uint64s array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint64s_adjust_
- extern f_status_t f_uint64s_adjust(const f_number_unsigned_t length, f_uint64s_t * const structure);
-#endif // _di_f_uint64s_adjust_
-
-/**
- * Append the single source uint64 onto the destination.
- *
- * @param source
- * The source uint64 to append.
- * @param destination
- * The destination uint64s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_uint64s_append_
- extern f_status_t f_uint64s_append(const uint64_t source, f_uint64s_t * const destination);
-#endif // _di_f_uint64s_append_
-
-/**
- * Append the source uint64s onto the destination.
- *
- * @param source
- * The source uint64s to append.
- * @param destination
- * The destination uint64s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint64s_append_all_
- extern f_status_t f_uint64s_append_all(const f_uint64s_t source, f_uint64s_t * const destination);
-#endif // _di_f_uint64s_append_all_
-
-/**
- * Resize the string uint64s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string uint64s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_uint64s_decimate_by_
- extern f_status_t f_uint64s_decimate_by(const f_number_unsigned_t amount, f_uint64s_t * const structure);
-#endif // _di_f_uint64s_decimate_by_
-
-/**
- * Resize the string uint64s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string uint64s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_uint64s_decrease_by_
- extern f_status_t f_uint64s_decrease_by(const f_number_unsigned_t amount, f_uint64s_t * const structure);
-#endif // _di_f_uint64s_decrease_by_
-
-/**
- * Increase the size of the string uint64s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string uint64s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_uint64s_increase_
- extern f_status_t f_uint64s_increase(const f_number_unsigned_t step, f_uint64s_t * const structure);
-#endif // _di_f_uint64s_increase_
-
-/**
- * Resize the string uint64s array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string uint64s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint64s_increase_by_
- extern f_status_t f_uint64s_increase_by(const f_number_unsigned_t amount, f_uint64s_t * const structure);
-#endif // _di_f_uint64s_increase_by_
-
-/**
- * Resize the string uint64s array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string uint64s array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint64s_resize_
- extern f_status_t f_uint64s_resize(const f_number_unsigned_t length, f_uint64s_t * const structure);
-#endif // _di_f_uint64s_resize_
-
-/**
- * Resize the string uint64ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string uint64ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint64ss_adjust_
- extern f_status_t f_uint64ss_adjust(const f_number_unsigned_t length, f_uint64ss_t * const structure);
-#endif // _di_f_uint64ss_adjust_
-
-/**
- * Append the single source uint64s onto the destination.
- *
- * @param source
- * The source uint64s to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint64ss_append_
- extern f_status_t f_uint64ss_append(const f_uint64s_t source, f_uint64ss_t * const destination);
-#endif // _di_f_uint64ss_append_
-
-/**
- * Append the source uint64ss onto the destination.
- *
- * @param source
- * The source uint64ss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint64ss_append_all_
- extern f_status_t f_uint64ss_append_all(const f_uint64ss_t source, f_uint64ss_t * const destination);
-#endif // _di_f_uint64ss_append_all_
-
-/**
- * Resize the string uint64ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string uint64ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_uint64ss_decimate_by_
- extern f_status_t f_uint64ss_decimate_by(const f_number_unsigned_t amount, f_uint64ss_t * const structure);
-#endif // _di_f_uint64ss_decimate_by_
-
-/**
- * Resize the string uint64ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string uint64ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint64ss_decrease_by_
- extern f_status_t f_uint64ss_decrease_by(const f_number_unsigned_t amount, f_uint64ss_t * const structure);
-#endif // _di_f_uint64ss_decrease_by_
+#ifndef _di_f_uint64s_adjust_callback_
+ extern f_status_t f_uint64s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_uint64s_adjust_callback_
/**
- * Increase the size of the string uint64ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_uint64ss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string uint64ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_uint64ss_increase_
- extern f_status_t f_uint64ss_increase(const f_number_unsigned_t step, f_uint64ss_t * const structure);
-#endif // _di_f_uint64ss_increase_
-
-/**
- * Resize the string uint64ss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string uint64ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_uint64ss_increase_by_
- extern f_status_t f_uint64ss_increase_by(const f_number_unsigned_t amount, f_uint64ss_t * const structure);
-#endif // _di_f_uint64ss_increase_by_
-
-/**
- * Resize the string uint64ss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string uint64ss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_uint64ss_resize_
- extern f_status_t f_uint64ss_resize(const f_number_unsigned_t length, f_uint64ss_t * const structure);
-#endif // _di_f_uint64ss_resize_
+#ifndef _di_f_uint64s_resize_callback_
+ extern f_status_t f_uint64s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_uint64s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#include "../type_array.h"
#include "uint8.h"
-#include "private-uint8.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_f_uint8s_adjust_
- f_status_t f_uint8s_adjust(const f_number_unsigned_t length, f_uint8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_uint8s_adjust_callback_
+ f_status_t f_uint8s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- return f_memory_array_adjust(length, sizeof(uint8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint8s_adjust_
-
-#ifndef _di_f_uint8s_append_
- f_status_t f_uint8s_append(const uint8_t source, f_uint8s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint8s_append(source, destination);
- }
-#endif // _di_f_uint8s_append_
-
-#ifndef _di_f_uint8s_append_all_
- f_status_t f_uint8s_append_all(const f_uint8s_t source, f_uint8s_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- return private_f_uint8s_append_all(source, destination);
- }
-#endif // _di_f_uint8s_append_all_
-
-#ifndef _di_f_uint8s_decimate_by_
- f_status_t f_uint8s_decimate_by(const f_number_unsigned_t amount, f_uint8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decimate_by(amount, sizeof(uint8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint8s_decimate_by_
-
-#ifndef _di_f_uint8s_decrease_by_
- f_status_t f_uint8s_decrease_by(const f_number_unsigned_t amount, f_uint8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_decrease_by(amount, sizeof(uint8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint8s_decrease_by_
-
-#ifndef _di_f_uint8s_increase_
- f_status_t f_uint8s_increase(const f_number_unsigned_t step, f_uint8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase(step, sizeof(uint8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint8s_increase_
-
-#ifndef _di_f_uint8s_increase_by_
- f_status_t f_uint8s_increase_by(const f_number_unsigned_t amount, f_uint8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_increase_by(amount, sizeof(uint8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint8s_increase_by_
-
-#ifndef _di_f_uint8s_resize_
- f_status_t f_uint8s_resize(const f_number_unsigned_t length, f_uint8s_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return f_memory_array_resize(length, sizeof(uint8_t), (void **) &structure->array, &structure->used, &structure->size);
- }
-#endif // _di_f_uint8s_resize_
-
-#ifndef _di_f_uint8ss_adjust_
- f_status_t f_uint8ss_adjust(const f_number_unsigned_t length, f_uint8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint8ss_adjust(length, structure);
- }
-#endif // _di_f_uint8ss_adjust_
-
-#ifndef _di_f_uint8ss_append_
- f_status_t f_uint8ss_append(const f_uint8s_t source, f_uint8ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
-
- f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_uint8s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- status = private_f_uint8s_append_all(source, &destination->array[destination->used]);
- if (F_status_is_error(status)) return status;
-
- ++destination->used;
+ {
+ f_uint8s_t * const array = (f_uint8s_t *) void_array;
+ f_status_t status = F_none;
- return F_none;
- }
-#endif // _di_f_uint8ss_append_
-
-#ifndef _di_f_uint8ss_append_all_
- f_status_t f_uint8ss_append_all(const f_uint8ss_t source, f_uint8ss_t * const destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not;
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_uint8s_t), (void **) &destination->array, &destination->used, &destination->size);
- if (F_status_is_error(status)) return status;
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
-
- destination->array[destination->used].used = 0;
-
- if (source.array[i].used) {
- status = private_f_uint8s_append_all(source.array[i], &destination->array[destination->used]);
+ status = f_memory_array_adjust(0, sizeof(uint8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
if (F_status_is_error(status)) return status;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_f_uint8ss_append_all_
-
-#ifndef _di_f_uint8ss_decimate_by_
- f_status_t f_uint8ss_decimate_by(const f_number_unsigned_t amount, f_uint8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_uint8ss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_uint8ss_decimate_by_
-
-#ifndef _di_f_uint8ss_decrease_by_
- f_status_t f_uint8ss_decrease_by(const f_number_unsigned_t amount, f_uint8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!amount) return F_data_not;
-
- return private_f_uint8ss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure);
- }
-#endif // _di_f_uint8ss_decrease_by_
-
-#ifndef _di_f_uint8ss_increase_
- f_status_t f_uint8ss_increase(const f_number_unsigned_t step, f_uint8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (step && structure->used + 1 > structure->size) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- f_number_unsigned_t length = structure->used + step;
-
- if (length > F_number_t_size_unsigned_d) {
- if (structure->used + 1 > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
- length = F_number_t_size_unsigned_d;
- }
-
- return private_f_uint8ss_resize(length, structure);
+ } // for
}
- return F_data_not;
+ return F_none;
}
-#endif // _di_f_uint8ss_increase_
-
-#ifndef _di_f_uint8ss_increase_by_
- f_status_t f_uint8ss_increase_by(const f_number_unsigned_t amount, f_uint8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#endif // _di_f_uint8s_adjust_callback_
- if (amount) {
- if (structure->used >= F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+#ifndef _di_f_uint8s_resize_callback_
+ f_status_t f_uint8s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const void_array) {
- const f_number_unsigned_t length = structure->used + amount;
+ {
+ f_uint8s_t * const array = (f_uint8s_t *) void_array;
+ f_status_t status = F_none;
- if (length > structure->size) {
- if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
+ for (f_number_unsigned_t i = start; i < size; ++i) {
- return private_f_uint8ss_resize(structure->used + amount, structure);
- }
+ status = f_memory_array_resize(0, sizeof(uint8_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ } // for
}
- return F_data_not;
- }
-#endif // _di_f_uint8ss_increase_by_
-
-#ifndef _di_f_uint8ss_resize_
- f_status_t f_uint8ss_resize(const f_number_unsigned_t length, f_uint8ss_t * const structure) {
- #ifndef _di_level_0_parameter_checking_
- if (!structure) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_uint8ss_resize(length, structure);
+ return F_none;
}
-#endif // _di_f_uint8ss_resize_
+#endif // _di_f_uint8s_resize_callback_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * Resize the string uint8s array.
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_uint8ss_t structure.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string uint8s array to resize.
+ * This does not do parameter checking.
*
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint8s_adjust_
- extern f_status_t f_uint8s_adjust(const f_number_unsigned_t length, f_uint8s_t * const structure);
-#endif // _di_f_uint8s_adjust_
-
-/**
- * Append the single source uint8 onto the destination.
- *
- * @param source
- * The source uint8 to append.
- * @param destination
- * The destination uint8s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_uint8s_append_
- extern f_status_t f_uint8s_append(const uint8_t source, f_uint8s_t * const destination);
-#endif // _di_f_uint8s_append_
-
-/**
- * Append the source uint8s onto the destination.
- *
- * @param source
- * The source uint8s to append.
- * @param destination
- * The destination uint8s the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint8s_append_all_
- extern f_status_t f_uint8s_append_all(const f_uint8s_t source, f_uint8s_t * const destination);
-#endif // _di_f_uint8s_append_all_
-
-/**
- * Resize the string uint8s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string uint8s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decimate_by().
- *
- * @see f_memory_array_decimate_by()
- */
-#ifndef _di_f_uint8s_decimate_by_
- extern f_status_t f_uint8s_decimate_by(const f_number_unsigned_t amount, f_uint8s_t * const structure);
-#endif // _di_f_uint8s_decimate_by_
-
-/**
- * Resize the string uint8s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string uint8s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not if amount is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_decrease_by().
- *
- * @see f_memory_array_decrease_by()
- */
-#ifndef _di_f_uint8s_decrease_by_
- extern f_status_t f_uint8s_decrease_by(const f_number_unsigned_t amount, f_uint8s_t * const structure);
-#endif // _di_f_uint8s_decrease_by_
-
-/**
- * Increase the size of the string uint8s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string uint8s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- *
- * @see f_memory_array_increase()
- */
-#ifndef _di_f_uint8s_increase_
- extern f_status_t f_uint8s_increase(const f_number_unsigned_t step, f_uint8s_t * const structure);
-#endif // _di_f_uint8s_increase_
-
-/**
- * Resize the string uint8s array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string uint8s array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint8s_increase_by_
- extern f_status_t f_uint8s_increase_by(const f_number_unsigned_t amount, f_uint8s_t * const structure);
-#endif // _di_f_uint8s_increase_by_
-
-/**
- * Resize the string uint8s array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string uint8s array to adjust.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint8s_resize_
- extern f_status_t f_uint8s_resize(const f_number_unsigned_t length, f_uint8s_t * const structure);
-#endif // _di_f_uint8s_resize_
-
-/**
- * Resize the string uint8ss array.
- *
- * @param length
- * The new size to use.
- * @param structure
- * The string uint8ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint8ss_adjust_
- extern f_status_t f_uint8ss_adjust(const f_number_unsigned_t length, f_uint8ss_t * const structure);
-#endif // _di_f_uint8ss_adjust_
-
-/**
- * Append the single source uint8s onto the destination.
- *
- * @param source
- * The source uint8s to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase().
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase()
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint8ss_append_
- extern f_status_t f_uint8ss_append(const f_uint8s_t source, f_uint8ss_t * const destination);
-#endif // _di_f_uint8ss_append_
-
-/**
- * Append the source uint8ss onto the destination.
- *
- * @param source
- * The source uint8ss to append.
- * @param destination
- * The destination ranges the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is nothing to append (size == 0).
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_increase_by().
- *
- * @see f_memory_array_increase_by()
- */
-#ifndef _di_f_uint8ss_append_all_
- extern f_status_t f_uint8ss_append_all(const f_uint8ss_t source, f_uint8ss_t * const destination);
-#endif // _di_f_uint8ss_append_all_
-
-/**
- * Resize the string uint8ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decimate the size by.
- * @param structure
- * The string uint8ss array to resize.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_adjust().
*
* @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
*/
-#ifndef _di_f_uint8ss_decimate_by_
- extern f_status_t f_uint8ss_decimate_by(const f_number_unsigned_t amount, f_uint8ss_t * const structure);
-#endif // _di_f_uint8ss_decimate_by_
-
-/**
- * Resize the string uint8ss array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to less than 0.
- *
- * @param amount
- * A positive number representing how much to decrease the size by.
- * @param structure
- * The string uint8ss array to resize.
- *
- * @return
- * F_none 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()
- */
-#ifndef _di_f_uint8ss_decrease_by_
- extern f_status_t f_uint8ss_decrease_by(const f_number_unsigned_t amount, f_uint8ss_t * const structure);
-#endif // _di_f_uint8ss_decrease_by_
+#ifndef _di_f_uint8s_adjust_callback_
+ extern f_status_t f_uint8s_adjust_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_uint8s_adjust_callback_
/**
- * Increase the size of the string uint8ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_uint8ss_t structure.
*
- * @param step
- * The allocation step to use.
- * Must be greater than 0.
- * @param structure
- * The string uint8ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_uint8ss_increase_
- extern f_status_t f_uint8ss_increase(const f_number_unsigned_t step, f_uint8ss_t * const structure);
-#endif // _di_f_uint8ss_increase_
-
-/**
- * Resize the string uint8ss array to a larger size.
- *
- * This will resize making the array larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_number_t_size_unsigned_d).
- * If already set to the maximum buffer size, then the resize will fail.
- *
- * @param amount
- * A positive number representing how much to increase the size by.
- * @param structure
- * The string uint8ss array to resize.
- *
- * @return
- * F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- * F_array_too_large (with error bit) if the new array length is too large.
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- */
-#ifndef _di_f_uint8ss_increase_by_
- extern f_status_t f_uint8ss_increase_by(const f_number_unsigned_t amount, f_uint8ss_t * const structure);
-#endif // _di_f_uint8ss_increase_by_
-
-/**
- * Resize the string uint8ss array.
+ * This does not do parameter checking.
*
- * @param length
- * The new size to use.
- * @param structure
- * The string uint8ss array to adjust.
+ * @param start
+ * The start position in the array to start deleting.
+ * @param stop
+ * The stop in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
*
* @return
* F_none on success.
* Errors (with error bit) from: f_memory_array_resize().
*
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
-#ifndef _di_f_uint8ss_resize_
- extern f_status_t f_uint8ss_resize(const f_number_unsigned_t length, f_uint8ss_t * const structure);
-#endif // _di_f_uint8ss_resize_
+#ifndef _di_f_uint8s_resize_callback_
+ extern f_status_t f_uint8s_resize_callback(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array);
+#endif // _di_f_uint8s_resize_callback_
#ifdef __cplusplus
} // extern "C"
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_unsigned.c type_array/poll.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/private-cell.c type_array/private-file.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-poll.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c
+build_sources_library type_array/private-poll.c type_array/private-state.c type_array/private-status.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_unsigned.h type_array/poll.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_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_unsigned.c type_array/poll.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/private-cell.c type_array/private-file.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-poll.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c
+build_sources_library type_array/private-poll.c type_array/private-state.c type_array/private-status.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_unsigned.h type_array/poll.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
flags_library -fPIC
# Inject mocks.
+flags -Wl,--wrap=f_memory_array_adjust
+flags -Wl,--wrap=f_memory_array_resize
flags -Wl,--wrap=poll
build_libraries -lc -lcmocka
build_libraries-individual -lf_memory -lf_type_array
-build_sources_program test-type_array-files_adjust.c test-type_array-files_append.c test-type_array-files_append_all.c test-type_array-files_decimate_by.c test-type_array-files_decrease_by.c test-type_array-files_increase.c test-type_array-files_increase_by.c test-type_array-files_resize.c
-build_sources_program test-type_array-filess_adjust.c test-type_array-filess_append.c test-type_array-filess_append_all.c test-type_array-filess_decimate_by.c test-type_array-filess_decrease_by.c test-type_array-filess_increase.c test-type_array-filess_increase_by.c test-type_array-filess_resize.c
-build_sources_program test-type_array-fll_ids_adjust.c test-type_array-fll_ids_append.c test-type_array-fll_ids_append_all.c test-type_array-fll_ids_decimate_by.c test-type_array-fll_ids_decrease_by.c test-type_array-fll_ids_increase.c test-type_array-fll_ids_increase_by.c test-type_array-fll_ids_resize.c
-build_sources_program test-type_array-fll_idss_adjust.c test-type_array-fll_idss_append.c test-type_array-fll_idss_append_all.c test-type_array-fll_idss_decimate_by.c test-type_array-fll_idss_decrease_by.c test-type_array-fll_idss_increase.c test-type_array-fll_idss_increase_by.c test-type_array-fll_idss_resize.c
-build_sources_program test-type_array-cells_adjust.c test-type_array-cells_append.c test-type_array-cells_append_all.c test-type_array-cells_decimate_by.c test-type_array-cells_decrease_by.c test-type_array-cells_increase.c test-type_array-cells_increase_by.c test-type_array-cells_resize.c
-build_sources_program test-type_array-cellss_adjust.c test-type_array-cellss_append.c test-type_array-cellss_append_all.c test-type_array-cellss_decimate_by.c test-type_array-cellss_decrease_by.c test-type_array-cellss_increase.c test-type_array-cellss_increase_by.c test-type_array-cellss_resize.c
-build_sources_program test-type_array-int8s_adjust.c test-type_array-int8s_append.c test-type_array-int8s_append_all.c test-type_array-int8s_decimate_by.c test-type_array-int8s_decrease_by.c test-type_array-int8s_increase.c test-type_array-int8s_increase_by.c test-type_array-int8s_resize.c
-build_sources_program test-type_array-int8ss_adjust.c test-type_array-int8ss_append.c test-type_array-int8ss_append_all.c test-type_array-int8ss_decimate_by.c test-type_array-int8ss_decrease_by.c test-type_array-int8ss_increase.c test-type_array-int8ss_increase_by.c test-type_array-int8ss_resize.c
-build_sources_program test-type_array-int16s_adjust.c test-type_array-int16s_append.c test-type_array-int16s_append_all.c test-type_array-int16s_decimate_by.c test-type_array-int16s_decrease_by.c test-type_array-int16s_increase.c test-type_array-int16s_increase_by.c test-type_array-int16s_resize.c
-build_sources_program test-type_array-int16ss_adjust.c test-type_array-int16ss_append.c test-type_array-int16ss_append_all.c test-type_array-int16ss_decimate_by.c test-type_array-int16ss_decrease_by.c test-type_array-int16ss_increase.c test-type_array-int16ss_increase_by.c test-type_array-int16ss_resize.c
-build_sources_program test-type_array-int32s_adjust.c test-type_array-int32s_append.c test-type_array-int32s_append_all.c test-type_array-int32s_decimate_by.c test-type_array-int32s_decrease_by.c test-type_array-int32s_increase.c test-type_array-int32s_increase_by.c test-type_array-int32s_resize.c
-build_sources_program test-type_array-int32ss_adjust.c test-type_array-int32ss_append.c test-type_array-int32ss_append_all.c test-type_array-int32ss_decimate_by.c test-type_array-int32ss_decrease_by.c test-type_array-int32ss_increase.c test-type_array-int32ss_increase_by.c test-type_array-int32ss_resize.c
-build_sources_program test-type_array-int64s_adjust.c test-type_array-int64s_append.c test-type_array-int64s_append_all.c test-type_array-int64s_decimate_by.c test-type_array-int64s_decrease_by.c test-type_array-int64s_increase.c test-type_array-int64s_increase_by.c test-type_array-int64s_resize.c
-build_sources_program test-type_array-int64ss_adjust.c test-type_array-int64ss_append.c test-type_array-int64ss_append_all.c test-type_array-int64ss_decimate_by.c test-type_array-int64ss_decrease_by.c test-type_array-int64ss_increase.c test-type_array-int64ss_increase_by.c test-type_array-int64ss_resize.c
-build_sources_program test-type_array-int128s_adjust.c test-type_array-int128s_append.c test-type_array-int128s_append_all.c test-type_array-int128s_decimate_by.c test-type_array-int128s_decrease_by.c test-type_array-int128s_increase.c test-type_array-int128s_increase_by.c test-type_array-int128s_resize.c
-build_sources_program test-type_array-int128ss_adjust.c test-type_array-int128ss_append.c test-type_array-int128ss_append_all.c test-type_array-int128ss_decimate_by.c test-type_array-int128ss_decrease_by.c test-type_array-int128ss_increase.c test-type_array-int128ss_increase_by.c test-type_array-int128ss_resize.c
-build_sources_program test-type_array-number_unsigneds_adjust.c test-type_array-number_unsigneds_append.c test-type_array-number_unsigneds_append_all.c test-type_array-number_unsigneds_decimate_by.c test-type_array-number_unsigneds_decrease_by.c test-type_array-number_unsigneds_increase.c test-type_array-number_unsigneds_increase_by.c test-type_array-number_unsigneds_resize.c
-build_sources_program test-type_array-number_unsignedss_adjust.c test-type_array-number_unsignedss_append.c test-type_array-number_unsignedss_append_all.c test-type_array-number_unsignedss_decimate_by.c test-type_array-number_unsignedss_decrease_by.c test-type_array-number_unsignedss_increase.c test-type_array-number_unsignedss_increase_by.c test-type_array-number_unsignedss_resize.c
-build_sources_program test-type_array-polls_adjust.c test-type_array-polls_append.c test-type_array-polls_append_all.c test-type_array-polls_decimate_by.c test-type_array-polls_decrease_by.c test-type_array-polls_increase.c test-type_array-polls_increase_by.c test-type_array-polls_resize.c
-build_sources_program test-type_array-pollss_adjust.c test-type_array-pollss_append.c test-type_array-pollss_append_all.c test-type_array-pollss_decimate_by.c test-type_array-pollss_decrease_by.c test-type_array-pollss_increase.c test-type_array-pollss_increase_by.c test-type_array-pollss_resize.c
-build_sources_program test-type_array-states_adjust.c test-type_array-states_append.c test-type_array-states_append_all.c test-type_array-states_decimate_by.c test-type_array-states_decrease_by.c test-type_array-states_increase.c test-type_array-states_increase_by.c test-type_array-states_resize.c
-build_sources_program test-type_array-statess_adjust.c test-type_array-statess_append.c test-type_array-statess_append_all.c test-type_array-statess_decimate_by.c test-type_array-statess_decrease_by.c test-type_array-statess_increase.c test-type_array-statess_increase_by.c test-type_array-statess_resize.c
-build_sources_program test-type_array-statuss_adjust.c test-type_array-statuss_append.c test-type_array-statuss_append_all.c test-type_array-statuss_decimate_by.c test-type_array-statuss_decrease_by.c test-type_array-statuss_increase.c test-type_array-statuss_increase_by.c test-type_array-statuss_resize.c
-build_sources_program test-type_array-statusss_adjust.c test-type_array-statusss_append.c test-type_array-statusss_append_all.c test-type_array-statusss_decimate_by.c test-type_array-statusss_decrease_by.c test-type_array-statusss_increase.c test-type_array-statusss_increase_by.c test-type_array-statusss_resize.c
-build_sources_program test-type_array-uint8s_adjust.c test-type_array-uint8s_append.c test-type_array-uint8s_append_all.c test-type_array-uint8s_decimate_by.c test-type_array-uint8s_decrease_by.c test-type_array-uint8s_increase.c test-type_array-uint8s_increase_by.c test-type_array-uint8s_resize.c
-build_sources_program test-type_array-uint8ss_adjust.c test-type_array-uint8ss_append.c test-type_array-uint8ss_append_all.c test-type_array-uint8ss_decimate_by.c test-type_array-uint8ss_decrease_by.c test-type_array-uint8ss_increase.c test-type_array-uint8ss_increase_by.c test-type_array-uint8ss_resize.c
-build_sources_program test-type_array-uint16s_adjust.c test-type_array-uint16s_append.c test-type_array-uint16s_append_all.c test-type_array-uint16s_decimate_by.c test-type_array-uint16s_decrease_by.c test-type_array-uint16s_increase.c test-type_array-uint16s_increase_by.c test-type_array-uint16s_resize.c
-build_sources_program test-type_array-uint16ss_adjust.c test-type_array-uint16ss_append.c test-type_array-uint16ss_append_all.c test-type_array-uint16ss_decimate_by.c test-type_array-uint16ss_decrease_by.c test-type_array-uint16ss_increase.c test-type_array-uint16ss_increase_by.c test-type_array-uint16ss_resize.c
-build_sources_program test-type_array-uint32s_adjust.c test-type_array-uint32s_append.c test-type_array-uint32s_append_all.c test-type_array-uint32s_decimate_by.c test-type_array-uint32s_decrease_by.c test-type_array-uint32s_increase.c test-type_array-uint32s_increase_by.c test-type_array-uint32s_resize.c
-build_sources_program test-type_array-uint32ss_adjust.c test-type_array-uint32ss_append.c test-type_array-uint32ss_append_all.c test-type_array-uint32ss_decimate_by.c test-type_array-uint32ss_decrease_by.c test-type_array-uint32ss_increase.c test-type_array-uint32ss_increase_by.c test-type_array-uint32ss_resize.c
-build_sources_program test-type_array-uint64s_adjust.c test-type_array-uint64s_append.c test-type_array-uint64s_append_all.c test-type_array-uint64s_decimate_by.c test-type_array-uint64s_decrease_by.c test-type_array-uint64s_increase.c test-type_array-uint64s_increase_by.c test-type_array-uint64s_resize.c
-build_sources_program test-type_array-uint64ss_adjust.c test-type_array-uint64ss_append.c test-type_array-uint64ss_append_all.c test-type_array-uint64ss_decimate_by.c test-type_array-uint64ss_decrease_by.c test-type_array-uint64ss_increase.c test-type_array-uint64ss_increase_by.c test-type_array-uint64ss_resize.c
-build_sources_program test-type_array-uint128s_adjust.c test-type_array-uint128s_append.c test-type_array-uint128s_append_all.c test-type_array-uint128s_decimate_by.c test-type_array-uint128s_decrease_by.c test-type_array-uint128s_increase.c test-type_array-uint128s_increase_by.c test-type_array-uint128s_resize.c
-build_sources_program test-type_array-uint128ss_adjust.c test-type_array-uint128ss_append.c test-type_array-uint128ss_append_all.c test-type_array-uint128ss_decimate_by.c test-type_array-uint128ss_decrease_by.c test-type_array-uint128ss_increase.c test-type_array-uint128ss_increase_by.c test-type_array-uint128ss_resize.c
+build_sources_program test-type_array-cells_adjust_callback.c test-type_array-cells_resize_callback.c
+build_sources_program test-type_array-files_adjust_callback.c test-type_array-files_resize_callback.c
+build_sources_program test-type_array-fll_ids_adjust_callback.c test-type_array-fll_ids_resize_callback.c
+build_sources_program test-type_array-int8s_adjust_callback.c test-type_array-int8s_resize_callback.c
+build_sources_program test-type_array-int16s_adjust_callback.c test-type_array-int16s_resize_callback.c
+build_sources_program test-type_array-int32s_adjust_callback.c test-type_array-int32s_resize_callback.c
+build_sources_program test-type_array-int64s_adjust_callback.c test-type_array-int64s_resize_callback.c
+build_sources_program test-type_array-int128s_adjust_callback.c test-type_array-int128s_resize_callback.c
+build_sources_program test-type_array-number_unsigneds_adjust_callback.c test-type_array-number_unsigneds_resize_callback.c
+build_sources_program test-type_array-uint8s_adjust_callback.c test-type_array-uint8s_resize_callback.c
+build_sources_program test-type_array-uint16s_adjust_callback.c test-type_array-uint16s_resize_callback.c
+build_sources_program test-type_array-uint32s_adjust_callback.c test-type_array-uint32s_resize_callback.c
+build_sources_program test-type_array-uint64s_adjust_callback.c test-type_array-uint64s_resize_callback.c
+build_sources_program test-type_array-uint128s_adjust_callback.c test-type_array-uint128s_resize_callback.c
+
build_sources_program test-type_array.c
build_script no
return mock_type(int);
}
+f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
+
+ if (!array || !used || !size) return F_status_set_error(F_parameter_not);
+
+ const bool failure = mock_type(bool);
+
+ if (failure) return mock_type(f_status_t);
+
+ *size = length;
+
+ return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
+
+ if (!array || !used || !size) return F_status_set_error(F_parameter_not);
+
+ const bool failure = mock_type(bool);
+
+ if (failure) return mock_type(f_status_t);
+
+ *size = length;
+
+ return mock_type(f_status_t);
+}
+
#ifdef __cplusplus
} // extern "C"
#endif
const static int mock_errno_generic = 32767;
extern int __wrap_poll(f_poll_t *fds, nfds_t nfds, int timeout);
+extern f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __wrap_f_memory_array_resizze(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
#ifdef __cplusplus
} // extern "C"
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cells_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cells_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_cells_adjust__works(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cells_adjust
-#define _TEST__F_type_array__cells_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cells_adjust()
- */
-extern void test__f_type_array_cells_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_adjust()
- */
-extern void test__f_type_array_cells_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__cells_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-cells_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_cells_adjust_callback__fails(void **state) {
+
+ f_cell_t data = f_cell_t_initialize;
+ f_cell_t data_array[] = { data };
+ f_cells_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_cells_t datass_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_cells_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_cells_adjust_callback__works(void **state) {
+
+ f_cell_t data = f_cell_t_initialize;
+ f_cell_t data_array[] = { data };
+ f_cells_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_cells_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_cells_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__cells_adjust_callback
+#define _TEST__F_type_array__cells_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_cells_adjust_callback()
+ */
+extern void test__f_type_array_cells_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cells_adjust_callback()
+ */
+extern void test__f_type_array_cells_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__cells_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cells_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cells_append__parameter_checking(void **state) {
-
- const f_cell_t data = f_cell_t_initialize;
-
- {
- const f_status_t status = f_cells_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_cells_append__works(void **state) {
-
- const f_cell_t source = { .row = 1, .column = 2 };
- f_cells_t destination = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].row, source.row);
- assert_int_equal(destination.array[0].column, source.column);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cells_append
-#define _TEST__F_type_array__cells_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cells_append()
- */
-extern void test__f_type_array_cells_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_append()
- */
-extern void test__f_type_array_cells_append__works(void **state);
-
-#endif // _TEST__F_type_array__cells_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cells_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cells_append_all__parameter_checking(void **state) {
-
- const f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_cells_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_cells_t source = f_cells_t_initialize;
- f_cells_t destination = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_cells_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_cells_append_all__works(void **state) {
-
- const int length = 5;
- f_cells_t source = f_cells_t_initialize;
- f_cells_t destination = f_cells_t_initialize;
-
- const f_cell_t cell_0 = { .row = 1, .column = 2 };
- const f_cell_t cell_1 = { .row = 3, .column = 4 };
-
- {
- const f_status_t status = f_cells_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- memcpy(&source.array[source.used++], (void *) &cell_0, sizeof(f_cell_t));
- memcpy(&source.array[source.used++], (void *) &cell_1, sizeof(f_cell_t));
-
- {
- const f_status_t status = f_cells_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- assert_int_equal(destination.array[0].row, cell_0.row);
- assert_int_equal(destination.array[0].column, cell_0.column);
-
- assert_int_equal(destination.array[1].row, cell_1.row);
- assert_int_equal(destination.array[1].column, cell_1.column);
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cells_append_all
-#define _TEST__F_type_array__cells_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cells_append_all()
- */
-extern void test__f_type_array_cells_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_cells_append_all()
- */
-extern void test__f_type_array_cells_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_append_all()
- */
-extern void test__f_type_array_cells_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__cells_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cells_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cells_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_cells_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cells_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cells_decimate_by__works(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cells_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cells_decimate_by
-#define _TEST__F_type_array__cells_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cells_decimate_by()
- */
-extern void test__f_type_array_cells_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_cells_decimate_by()
- */
-extern void test__f_type_array_cells_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_decimate_by()
- */
-extern void test__f_type_array_cells_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__cells_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cells_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cells_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_cells_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cells_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cells_decrease_by__works(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cells_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cells_decrease_by
-#define _TEST__F_type_array__cells_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cells_decrease_by()
- */
-extern void test__f_type_array_cells_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_cells_decrease_by()
- */
-extern void test__f_type_array_cells_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_decrease_by()
- */
-extern void test__f_type_array_cells_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__cells_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cells_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cells_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cells_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cells_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cells_increase__works(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_cells_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cells_increase
-#define _TEST__F_type_array__cells_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cells_increase()
- */
-extern void test__f_type_array_cells_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_cells_increase()
- */
-extern void test__f_type_array_cells_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_increase()
- */
-extern void test__f_type_array_cells_increase__works(void **state);
-
-#endif // _TEST__F_type_array__cells_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cells_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cells_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_cells_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cells_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cells_increase_by__works(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_cells_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cells_increase_by
-#define _TEST__F_type_array__cells_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cells_increase_by()
- */
-extern void test__f_type_array_cells_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_cells_increase_by()
- */
-extern void test__f_type_array_cells_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_increase_by()
- */
-extern void test__f_type_array_cells_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__cells_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cells_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cells_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_cells_resize__works(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cells_resize
-#define _TEST__F_type_array__cells_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cells_resize()
- */
-extern void test__f_type_array_cells_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_resize()
- */
-extern void test__f_type_array_cells_resize__works(void **state);
-
-#endif // _TEST__F_type_array__cells_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-cells_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_cells_resize_callback__fails(void **state) {
+
+ f_cell_t data = f_cell_t_initialize;
+ f_cell_t data_array[] = { data };
+ f_cells_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_cells_t datass_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_cells_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_cells_resize_callback__works(void **state) {
+
+ f_cell_t data = f_cell_t_initialize;
+ f_cell_t data_array[] = { data };
+ f_cells_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_cells_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_cells_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__cells_resize_callback
+#define _TEST__F_type_array__cells_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_cells_resize_callback()
+ */
+extern void test__f_type_array_cells_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cells_resize_callback()
+ */
+extern void test__f_type_array_cells_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__cells_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cellss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cellss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_cellss_adjust__works(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cellss_adjust
-#define _TEST__F_type_array__cellss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cellss_adjust()
- */
-extern void test__f_type_array_cellss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cellss_adjust()
- */
-extern void test__f_type_array_cellss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__cellss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cellss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cellss_append__parameter_checking(void **state) {
-
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_cellss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_cells_t source = f_cellss_t_initialize;
- f_cellss_t destination = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_cellss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_cellss_append__works(void **state) {
-
- const int length = 5;
- f_cells_t source = f_cells_t_initialize;
- f_cellss_t destination = f_cellss_t_initialize;
-
- const f_cell_t cell = { .row = 1, .column = 2 };
-
- {
- const f_status_t status = f_cells_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- while (source.used < length) {
- memcpy(&source.array[source.used++], (void *) &cell, sizeof(f_cell_t));
- } // while
-
- {
- const f_status_t status = f_cellss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
-
- assert_int_equal(destination.array[0].array[i].row, cell.row);
- assert_int_equal(destination.array[0].array[i].column, cell.column);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cellss_append
-#define _TEST__F_type_array__cellss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cellss_append()
- */
-extern void test__f_type_array_cellss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_cellss_append()
- */
-extern void test__f_type_array_cellss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cellss_append()
- */
-extern void test__f_type_array_cellss_append__works(void **state);
-
-#endif // _TEST__F_type_array__cellss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cellss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cellss_append_all__parameter_checking(void **state) {
-
- const f_cellss_t data = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_cellss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_cellss_t source = f_cellss_t_initialize;
- f_cellss_t destination = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_cellss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_cellss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_cellss_t source = f_cellss_t_initialize;
- f_cellss_t destination = f_cellss_t_initialize;
-
- const f_cell_t cell_0 = { .row = 1, .column = 2 };
- const f_cell_t cell_1 = { .row = 3, .column = 4 };
-
- {
- const f_status_t status = f_cellss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_cells_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &cell_0, sizeof(f_cell_t));
- memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &cell_1, sizeof(f_cell_t));
- } // for
- }
-
- {
- const f_status_t status = f_cellss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- assert_int_equal(destination.array[i].array[0].row, cell_0.row);
- assert_int_equal(destination.array[i].array[0].column, cell_0.column);
-
- assert_int_equal(destination.array[i].array[1].row, cell_1.row);
- assert_int_equal(destination.array[i].array[1].column, cell_1.column);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cellss_append_all
-#define _TEST__F_type_array__cellss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cellss_append_all()
- */
-extern void test__f_type_array_cellss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_cellss_append_all()
- */
-extern void test__f_type_array_cellss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cellss_append_all()
- */
-extern void test__f_type_array_cellss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__cellss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cellss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cellss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_cellss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cellss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cellss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cellss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cellss_decimate_by
-#define _TEST__F_type_array__cellss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cellss_decimate_by()
- */
-extern void test__f_type_array_cellss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_cellss_decimate_by()
- */
-extern void test__f_type_array_cellss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cellss_decimate_by()
- */
-extern void test__f_type_array_cellss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__cellss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cellss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cellss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_cellss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cellss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cellss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cellss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cellss_decrease_by
-#define _TEST__F_type_array__cellss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cellss_decrease_by()
- */
-extern void test__f_type_array_cellss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_cellss_decrease_by()
- */
-extern void test__f_type_array_cellss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cellss_decrease_by()
- */
-extern void test__f_type_array_cellss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__cellss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cellss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cellss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cellss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cellss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cellss_increase__works(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_cellss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cellss_increase
-#define _TEST__F_type_array__cellss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cellss_increase()
- */
-extern void test__f_type_array_cellss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_cellss_increase()
- */
-extern void test__f_type_array_cellss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cellss_increase()
- */
-extern void test__f_type_array_cellss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__cellss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cellss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cellss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_cellss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cellss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cellss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cell_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cellss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_cellss_increase_by__works(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_cellss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cellss_increase_by
-#define _TEST__F_type_array__cellss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cellss_increase_by()
- */
-extern void test__f_type_array_cellss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_cellss_increase_by()
- */
-extern void test__f_type_array_cellss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cellss_increase_by()
- */
-extern void test__f_type_array_cellss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__cellss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-cellss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cellss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_cellss_resize__works(void **state) {
-
- const int length = 5;
- f_cellss_t data = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__cellss_resize
-#define _TEST__F_type_array__cellss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_cellss_resize()
- */
-extern void test__f_type_array_cellss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cellss_resize()
- */
-extern void test__f_type_array_cellss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__cellss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-files_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_files_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_files_adjust__works(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__files_adjust
-#define _TEST__F_type_array__files_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_files_adjust()
- */
-extern void test__f_type_array_files_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_adjust()
- */
-extern void test__f_type_array_files_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__files_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-files_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_files_adjust_callback__fails(void **state) {
+
+ f_file_t data = f_file_t_initialize;
+ f_file_t data_array[] = { data };
+ f_files_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_files_t datass_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_files_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_files_adjust_callback__works(void **state) {
+
+ f_file_t data = f_file_t_initialize;
+ f_file_t data_array[] = { data };
+ f_files_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_files_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_files_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__files_adjust_callback
+#define _TEST__F_type_array__files_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_files_adjust_callback()
+ */
+extern void test__f_type_array_files_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_files_adjust_callback()
+ */
+extern void test__f_type_array_files_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__files_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-files_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_files_append__parameter_checking(void **state) {
-
- const f_file_t data = f_file_t_initialize;
-
- {
- const f_status_t status = f_files_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_files_append__works(void **state) {
-
- const f_file_t source = macro_f_file_t_initialize_id(3);
- f_files_t destination = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].id, source.id);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__files_append
-#define _TEST__F_type_array__files_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_files_append()
- */
-extern void test__f_type_array_files_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_append()
- */
-extern void test__f_type_array_files_append__works(void **state);
-
-#endif // _TEST__F_type_array__files_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-files_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_files_append_all__parameter_checking(void **state) {
-
- const f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_files_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_files_t source = f_files_t_initialize;
- f_files_t destination = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_files_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_files_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_files_t source = f_files_t_initialize;
- f_files_t destination = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used].id = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_files_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i].id, i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__files_append_all
-#define _TEST__F_type_array__files_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_files_append_all()
- */
-extern void test__f_type_array_files_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_files_append_all()
- */
-extern void test__f_type_array_files_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_append_all()
- */
-extern void test__f_type_array_files_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__files_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-files_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_files_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_files_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_files_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_files_decimate_by__works(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_files_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__files_decimate_by
-#define _TEST__F_type_array__files_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_files_decimate_by()
- */
-extern void test__f_type_array_files_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_files_decimate_by()
- */
-extern void test__f_type_array_files_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_decimate_by()
- */
-extern void test__f_type_array_files_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__files_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-files_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_files_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_files_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_files_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_files_decrease_by__works(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_files_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__files_decrease_by
-#define _TEST__F_type_array__files_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_files_decrease_by()
- */
-extern void test__f_type_array_files_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_files_decrease_by()
- */
-extern void test__f_type_array_files_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_decrease_by()
- */
-extern void test__f_type_array_files_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__files_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-files_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_files_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_files_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_files_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_files_increase__works(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_files_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__files_increase
-#define _TEST__F_type_array__files_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_files_increase()
- */
-extern void test__f_type_array_files_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_files_increase()
- */
-extern void test__f_type_array_files_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_increase()
- */
-extern void test__f_type_array_files_increase__works(void **state);
-
-#endif // _TEST__F_type_array__files_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-files_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_files_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_files_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_files_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_files_increase_by__works(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_files_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__files_increase_by
-#define _TEST__F_type_array__files_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_files_increase_by()
- */
-extern void test__f_type_array_files_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_files_increase_by()
- */
-extern void test__f_type_array_files_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_increase_by()
- */
-extern void test__f_type_array_files_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__files_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-files_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_files_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_files_resize__works(void **state) {
-
- const int length = 5;
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__files_resize
-#define _TEST__F_type_array__files_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_files_resize()
- */
-extern void test__f_type_array_files_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_resize()
- */
-extern void test__f_type_array_files_resize__works(void **state);
-
-#endif // _TEST__F_type_array__files_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-files_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_files_resize_callback__fails(void **state) {
+
+ f_file_t data = f_file_t_initialize;
+ f_file_t data_array[] = { data };
+ f_files_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_files_t datass_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_files_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_files_resize_callback__works(void **state) {
+
+ f_file_t data = f_file_t_initialize;
+ f_file_t data_array[] = { data };
+ f_files_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_files_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_files_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__files_resize_callback
+#define _TEST__F_type_array__files_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_files_resize_callback()
+ */
+extern void test__f_type_array_files_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_files_resize_callback()
+ */
+extern void test__f_type_array_files_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__files_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-filess_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_filess_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_filess_adjust__works(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__filess_adjust
-#define _TEST__F_type_array__filess_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_filess_adjust()
- */
-extern void test__f_type_array_filess_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_filess_adjust()
- */
-extern void test__f_type_array_filess_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__filess_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-filess_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_filess_append__parameter_checking(void **state) {
-
- f_files_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_filess_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_filess_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_files_t source = f_files_t_initialize;
- f_filess_t destination = f_filess_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_filess_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_filess_append__works(void **state) {
-
- const int length = 5;
- f_files_t source = f_files_t_initialize;
- f_filess_t destination = f_filess_t_initialize;
-
- {
- const f_status_t status = f_files_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used].id = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_filess_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i].id, i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__filess_append
-#define _TEST__F_type_array__filess_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_filess_append()
- */
-extern void test__f_type_array_filess_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_filess_append()
- */
-extern void test__f_type_array_filess_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_filess_append()
- */
-extern void test__f_type_array_filess_append__works(void **state);
-
-#endif // _TEST__F_type_array__filess_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-filess_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_filess_append_all__parameter_checking(void **state) {
-
- const f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_filess_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_filess_t source = f_filess_t_initialize;
- f_filess_t destination = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_filess_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_filess_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_filess_t source = f_filess_t_initialize;
- f_filess_t destination = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_files_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++].id = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_filess_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j].id, j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__filess_append_all
-#define _TEST__F_type_array__filess_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_filess_append_all()
- */
-extern void test__f_type_array_filess_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_filess_append_all()
- */
-extern void test__f_type_array_filess_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_filess_append_all()
- */
-extern void test__f_type_array_filess_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__filess_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-filess_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_filess_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_filess_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_filess_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_filess_decimate_by__works(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_filess_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__filess_decimate_by
-#define _TEST__F_type_array__filess_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_filess_decimate_by()
- */
-extern void test__f_type_array_filess_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_filess_decimate_by()
- */
-extern void test__f_type_array_filess_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_filess_decimate_by()
- */
-extern void test__f_type_array_filess_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__filess_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-filess_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_filess_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_filess_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_filess_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_filess_decrease_by__works(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_filess_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__filess_decrease_by
-#define _TEST__F_type_array__filess_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_filess_decrease_by()
- */
-extern void test__f_type_array_filess_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_filess_decrease_by()
- */
-extern void test__f_type_array_filess_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_filess_decrease_by()
- */
-extern void test__f_type_array_filess_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__filess_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-filess_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_filess_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_filess_t data = f_files_t_initialize;
-
- {
- const f_status_t status = f_filess_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_filess_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_filess_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_filess_increase__works(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_filess_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__filess_increase
-#define _TEST__F_type_array__filess_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_filess_increase()
- */
-extern void test__f_type_array_filess_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_filess_increase()
- */
-extern void test__f_type_array_filess_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_filess_increase()
- */
-extern void test__f_type_array_filess_increase__works(void **state);
-
-#endif // _TEST__F_type_array__filess_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-filess_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_filess_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_filess_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_filess_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_filess_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_filess_increase_by__works(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_filess_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__filess_increase_by
-#define _TEST__F_type_array__filess_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_filess_increase_by()
- */
-extern void test__f_type_array_filess_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_filess_increase_by()
- */
-extern void test__f_type_array_filess_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_filess_increase_by()
- */
-extern void test__f_type_array_filess_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__filess_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-filess_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_filess_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_filess_resize__works(void **state) {
-
- const int length = 5;
- f_filess_t data = f_filess_t_initialize;
-
- {
- const f_status_t status = f_filess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__filess_resize
-#define _TEST__F_type_array__filess_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_filess_resize()
- */
-extern void test__f_type_array_filess_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_filess_resize()
- */
-extern void test__f_type_array_filess_resize__works(void **state);
-
-#endif // _TEST__F_type_array__filess_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_ids_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_ids_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_fll_ids_adjust__works(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_ids_adjust
-#define _TEST__F_type_array__fll_ids_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_ids_adjust()
- */
-extern void test__f_type_array_fll_ids_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_adjust()
- */
-extern void test__f_type_array_fll_ids_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-fll_ids_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_fll_ids_adjust_callback__fails(void **state) {
+
+ f_fll_id_t data = f_fll_id_t_initialize;
+ f_fll_id_t data_array[] = { data };
+ f_fll_ids_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_fll_ids_t datass_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_fll_ids_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_fll_ids_adjust_callback__works(void **state) {
+
+ f_fll_id_t data = f_fll_id_t_initialize;
+ f_fll_id_t data_array[] = { data };
+ f_fll_ids_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_fll_ids_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_fll_ids_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__fll_ids_adjust_callback
+#define _TEST__F_type_array__fll_ids_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fll_ids_adjust_callback()
+ */
+extern void test__f_type_array_fll_ids_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_ids_adjust_callback()
+ */
+extern void test__f_type_array_fll_ids_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__fll_ids_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_ids_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_ids_append__parameter_checking(void **state) {
-
- const f_fll_id_t data = f_fll_id_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_fll_ids_append__works(void **state) {
-
- const f_fll_id_t source = { .name = "test", .type = 1, .used = 4 };
- f_fll_ids_t destination = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_string_equal(destination.array[0].name, source.name);
- assert_int_equal(destination.array[0].type, source.type);
- assert_int_equal(destination.array[0].used, source.used);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_ids_append
-#define _TEST__F_type_array__fll_ids_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_ids_append()
- */
-extern void test__f_type_array_fll_ids_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_append()
- */
-extern void test__f_type_array_fll_ids_append__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_ids_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_ids_append_all__parameter_checking(void **state) {
-
- const f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_fll_ids_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_ids_t source = f_fll_ids_t_initialize;
- f_fll_ids_t destination = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_fll_ids_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_fll_ids_append_all__works(void **state) {
-
- const int length = 5;
- f_fll_ids_t source = f_fll_ids_t_initialize;
- f_fll_ids_t destination = f_fll_ids_t_initialize;
-
- const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 };
- const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 };
-
- {
- const f_status_t status = f_fll_ids_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- memcpy(&source.array[source.used++], (void *) &fll_id_0, sizeof(f_fll_id_t));
- memcpy(&source.array[source.used++], (void *) &fll_id_1, sizeof(f_fll_id_t));
-
- {
- const f_status_t status = f_fll_ids_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- assert_string_equal(destination.array[0].name, fll_id_0.name);
- assert_int_equal(destination.array[0].type, fll_id_0.type);
- assert_int_equal(destination.array[0].used, fll_id_0.used);
-
- assert_string_equal(destination.array[1].name, fll_id_1.name);
- assert_int_equal(destination.array[1].type, fll_id_1.type);
- assert_int_equal(destination.array[1].used, fll_id_1.used);
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_ids_append_all
-#define _TEST__F_type_array__fll_ids_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_ids_append_all()
- */
-extern void test__f_type_array_fll_ids_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fll_ids_append_all()
- */
-extern void test__f_type_array_fll_ids_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_append_all()
- */
-extern void test__f_type_array_fll_ids_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_ids_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_fll_ids_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_ids_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_fll_ids_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_ids_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_ids_decimate_by
-#define _TEST__F_type_array__fll_ids_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_ids_decimate_by()
- */
-extern void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fll_ids_decimate_by()
- */
-extern void test__f_type_array_fll_ids_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_decimate_by()
- */
-extern void test__f_type_array_fll_ids_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_ids_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_fll_ids_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_ids_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_fll_ids_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_ids_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_ids_decrease_by
-#define _TEST__F_type_array__fll_ids_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_ids_decrease_by()
- */
-extern void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fll_ids_decrease_by()
- */
-extern void test__f_type_array_fll_ids_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_decrease_by()
- */
-extern void test__f_type_array_fll_ids_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_ids_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_ids_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_fll_ids_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_ids_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_fll_ids_increase__works(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fll_ids_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_ids_increase
-#define _TEST__F_type_array__fll_ids_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_ids_increase()
- */
-extern void test__f_type_array_fll_ids_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fll_ids_increase()
- */
-extern void test__f_type_array_fll_ids_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_increase()
- */
-extern void test__f_type_array_fll_ids_increase__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_ids_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_fll_ids_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_ids_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_fll_ids_increase_by__works(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fll_ids_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_ids_increase_by
-#define _TEST__F_type_array__fll_ids_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_ids_increase_by()
- */
-extern void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fll_ids_increase_by()
- */
-extern void test__f_type_array_fll_ids_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_increase_by()
- */
-extern void test__f_type_array_fll_ids_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_ids_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_ids_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_fll_ids_resize__works(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_ids_resize
-#define _TEST__F_type_array__fll_ids_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_ids_resize()
- */
-extern void test__f_type_array_fll_ids_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_resize()
- */
-extern void test__f_type_array_fll_ids_resize__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-fll_ids_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_fll_ids_resize_callback__fails(void **state) {
+
+ f_fll_id_t data = f_fll_id_t_initialize;
+ f_fll_id_t data_array[] = { data };
+ f_fll_ids_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_fll_ids_t datass_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_fll_ids_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_fll_ids_resize_callback__works(void **state) {
+
+ f_fll_id_t data = f_fll_id_t_initialize;
+ f_fll_id_t data_array[] = { data };
+ f_fll_ids_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_fll_ids_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_fll_ids_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__fll_ids_resize_callback
+#define _TEST__F_type_array__fll_ids_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fll_ids_resize_callback()
+ */
+extern void test__f_type_array_fll_ids_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_ids_resize_callback()
+ */
+extern void test__f_type_array_fll_ids_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__fll_ids_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_idss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_idss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_fll_idss_adjust__works(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_idss_adjust
-#define _TEST__F_type_array__fll_idss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_idss_adjust()
- */
-extern void test__f_type_array_fll_idss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_idss_adjust()
- */
-extern void test__f_type_array_fll_idss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__fll_idss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_idss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_idss_append__parameter_checking(void **state) {
-
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_fll_idss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_ids_t source = f_fll_idss_t_initialize;
- f_fll_idss_t destination = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_fll_idss_append__works(void **state) {
-
- const int length = 5;
- f_fll_ids_t source = f_fll_ids_t_initialize;
- f_fll_idss_t destination = f_fll_idss_t_initialize;
-
- const f_fll_id_t fll_id = { .name = "test", .type = 1, .used = 4 };
-
- {
- const f_status_t status = f_fll_ids_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- while (source.used < length) {
- memcpy(&source.array[source.used++], (void *) &fll_id, sizeof(f_fll_id_t));
- } // while
-
- {
- const f_status_t status = f_fll_idss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
-
- assert_string_equal(destination.array[0].array[i].name, fll_id.name);
- assert_int_equal(destination.array[0].array[i].type, fll_id.type);
- assert_int_equal(destination.array[0].array[i].used, fll_id.used);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_idss_append
-#define _TEST__F_type_array__fll_idss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_idss_append()
- */
-extern void test__f_type_array_fll_idss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fll_idss_append()
- */
-extern void test__f_type_array_fll_idss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_idss_append()
- */
-extern void test__f_type_array_fll_idss_append__works(void **state);
-
-#endif // _TEST__F_type_array__fll_idss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_idss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_idss_append_all__parameter_checking(void **state) {
-
- const f_fll_idss_t data = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_fll_idss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_idss_t source = f_fll_idss_t_initialize;
- f_fll_idss_t destination = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_fll_idss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_fll_idss_t source = f_fll_idss_t_initialize;
- f_fll_idss_t destination = f_fll_idss_t_initialize;
-
- const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 };
- const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 };
-
- {
- const f_status_t status = f_fll_idss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_fll_ids_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &fll_id_0, sizeof(f_fll_id_t));
- memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &fll_id_1, sizeof(f_fll_id_t));
- } // for
- }
-
- {
- const f_status_t status = f_fll_idss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- assert_string_equal(destination.array[i].array[0].name, fll_id_0.name);
- assert_int_equal(destination.array[i].array[0].type, fll_id_0.type);
- assert_int_equal(destination.array[i].array[0].used, fll_id_0.used);
-
- assert_string_equal(destination.array[i].array[1].name, fll_id_1.name);
- assert_int_equal(destination.array[i].array[1].type, fll_id_1.type);
- assert_int_equal(destination.array[i].array[1].used, fll_id_1.used);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_idss_append_all
-#define _TEST__F_type_array__fll_idss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_idss_append_all()
- */
-extern void test__f_type_array_fll_idss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fll_idss_append_all()
- */
-extern void test__f_type_array_fll_idss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_idss_append_all()
- */
-extern void test__f_type_array_fll_idss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__fll_idss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_idss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_fll_idss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_fll_idss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_idss_decimate_by
-#define _TEST__F_type_array__fll_idss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_idss_decimate_by()
- */
-extern void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_fll_idss_decimate_by()
- */
-extern void test__f_type_array_fll_idss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_idss_decimate_by()
- */
-extern void test__f_type_array_fll_idss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__fll_idss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_idss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_fll_idss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_fll_idss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_idss_decrease_by
-#define _TEST__F_type_array__fll_idss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_idss_decrease_by()
- */
-extern void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fll_idss_decrease_by()
- */
-extern void test__f_type_array_fll_idss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_idss_decrease_by()
- */
-extern void test__f_type_array_fll_idss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__fll_idss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_idss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_idss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_fll_idss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_fll_idss_increase__works(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fll_idss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_idss_increase
-#define _TEST__F_type_array__fll_idss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_idss_increase()
- */
-extern void test__f_type_array_fll_idss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fll_idss_increase()
- */
-extern void test__f_type_array_fll_idss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_idss_increase()
- */
-extern void test__f_type_array_fll_idss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__fll_idss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_idss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_fll_idss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_fll_idss_increase_by__works(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fll_idss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_idss_increase_by
-#define _TEST__F_type_array__fll_idss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_idss_increase_by()
- */
-extern void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_fll_idss_increase_by()
- */
-extern void test__f_type_array_fll_idss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_idss_increase_by()
- */
-extern void test__f_type_array_fll_idss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__fll_idss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-fll_idss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_idss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_fll_idss_resize__works(void **state) {
-
- const int length = 5;
- f_fll_idss_t data = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__fll_idss_resize
-#define _TEST__F_type_array__fll_idss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_fll_idss_resize()
- */
-extern void test__f_type_array_fll_idss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_idss_resize()
- */
-extern void test__f_type_array_fll_idss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__fll_idss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128s_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128s_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int128s_adjust__works(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128s_adjust
-#define _TEST__F_type_array__int128s_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128s_adjust()
- */
-extern void test__f_type_array_int128s_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_adjust()
- */
-extern void test__f_type_array_int128s_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-int128s_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int128s_adjust_callback__fails(void **state) {
+
+ f_int128_t data = 0;
+ f_int128_t data_array[] = { data };
+ f_int128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int128s_t datass_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_int128s_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_int128s_adjust_callback__works(void **state) {
+
+ f_int128_t data = 0;
+ f_int128_t data_array[] = { data };
+ f_int128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int128s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_int128s_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__int128s_adjust_callback
+#define _TEST__F_type_array__int128s_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int128s_adjust_callback()
+ */
+extern void test__f_type_array_int128s_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128s_adjust_callback()
+ */
+extern void test__f_type_array_int128s_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int128s_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128s_append__parameter_checking(void **state) {
-
- const int128_t data = 0;
-
- {
- const f_status_t status = f_int128s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int128s_append__works(void **state) {
-
- const int128_t source = 3;
- f_int128s_t destination = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128s_append
-#define _TEST__F_type_array__int128s_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128s_append()
- */
-extern void test__f_type_array_int128s_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_append()
- */
-extern void test__f_type_array_int128s_append__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128s_append_all__parameter_checking(void **state) {
-
- const f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int128s_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128s_t source = f_int128s_t_initialize;
- f_int128s_t destination = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int128s_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int128s_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_int128s_t source = f_int128s_t_initialize;
- f_int128s_t destination = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_int128s_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128s_append_all
-#define _TEST__F_type_array__int128s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128s_append_all()
- */
-extern void test__f_type_array_int128s_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int128s_append_all()
- */
-extern void test__f_type_array_int128s_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_append_all()
- */
-extern void test__f_type_array_int128s_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128s_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128s_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int128s_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128s_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int128s_decimate_by__works(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128s_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128s_decimate_by
-#define _TEST__F_type_array__int128s_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128s_decimate_by()
- */
-extern void test__f_type_array_int128s_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int128s_decimate_by()
- */
-extern void test__f_type_array_int128s_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_decimate_by()
- */
-extern void test__f_type_array_int128s_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128s_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128s_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int128s_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128s_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int128s_decrease_by__works(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128s_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128s_decrease_by
-#define _TEST__F_type_array__int128s_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128s_decrease_by()
- */
-extern void test__f_type_array_int128s_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int128s_decrease_by()
- */
-extern void test__f_type_array_int128s_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_decrease_by()
- */
-extern void test__f_type_array_int128s_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128s_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128s_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int128s_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128s_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int128s_increase__works(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int128s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128s_increase
-#define _TEST__F_type_array__int128s_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128s_increase()
- */
-extern void test__f_type_array_int128s_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int128s_increase()
- */
-extern void test__f_type_array_int128s_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_increase()
- */
-extern void test__f_type_array_int128s_increase__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128s_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int128s_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128s_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int128s_increase_by__works(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int128s_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128s_increase_by
-#define _TEST__F_type_array__int128s_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128s_increase_by()
- */
-extern void test__f_type_array_int128s_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int128s_increase_by()
- */
-extern void test__f_type_array_int128s_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_increase_by()
- */
-extern void test__f_type_array_int128s_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128s_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128s_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int128s_resize__works(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128s_resize
-#define _TEST__F_type_array__int128s_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128s_resize()
- */
-extern void test__f_type_array_int128s_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_resize()
- */
-extern void test__f_type_array_int128s_resize__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-int128s_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int128s_resize_callback__fails(void **state) {
+
+ f_int128_t data = 0;
+ f_int128_t data_array[] = { data };
+ f_int128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int128s_t datass_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_int128s_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_int128s_resize_callback__works(void **state) {
+
+ f_int128_t data = 0;
+ f_int128_t data_array[] = { data };
+ f_int128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int128s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_int128s_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__int128s_resize_callback
+#define _TEST__F_type_array__int128s_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int128s_resize_callback()
+ */
+extern void test__f_type_array_int128s_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128s_resize_callback()
+ */
+extern void test__f_type_array_int128s_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int128s_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128ss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128ss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int128ss_adjust__works(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128ss_adjust
-#define _TEST__F_type_array__int128ss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128ss_adjust()
- */
-extern void test__f_type_array_int128ss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128ss_adjust()
- */
-extern void test__f_type_array_int128ss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__int128ss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128ss_append__parameter_checking(void **state) {
-
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128ss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int128ss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128s_t source = f_int128s_t_initialize;
- f_int128ss_t destination = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int128ss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int128ss_append__works(void **state) {
-
- const int length = 5;
- f_int128s_t source = f_int128s_t_initialize;
- f_int128ss_t destination = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_int128ss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128ss_append
-#define _TEST__F_type_array__int128ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128ss_append()
- */
-extern void test__f_type_array_int128ss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int128ss_append()
- */
-extern void test__f_type_array_int128ss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128ss_append()
- */
-extern void test__f_type_array_int128ss_append__works(void **state);
-
-#endif // _TEST__F_type_array__int128ss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128ss_append_all__parameter_checking(void **state) {
-
- const f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int128ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128ss_t source = f_int128ss_t_initialize;
- f_int128ss_t destination = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int128ss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int128ss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_int128ss_t source = f_int128ss_t_initialize;
- f_int128ss_t destination = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_int128s_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_int128ss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128ss_append_all
-#define _TEST__F_type_array__int128ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128ss_append_all()
- */
-extern void test__f_type_array_int128ss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int128ss_append_all()
- */
-extern void test__f_type_array_int128ss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128ss_append_all()
- */
-extern void test__f_type_array_int128ss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__int128ss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128ss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int128ss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128ss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int128ss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128ss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128ss_decimate_by
-#define _TEST__F_type_array__int128ss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128ss_decimate_by()
- */
-extern void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_int128ss_decimate_by()
- */
-extern void test__f_type_array_int128ss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128ss_decimate_by()
- */
-extern void test__f_type_array_int128ss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__int128ss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128ss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int128ss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128ss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int128ss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128ss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128ss_decrease_by
-#define _TEST__F_type_array__int128ss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128ss_decrease_by()
- */
-extern void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int128ss_decrease_by()
- */
-extern void test__f_type_array_int128ss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128ss_decrease_by()
- */
-extern void test__f_type_array_int128ss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__int128ss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128ss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128ss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int128ss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128ss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int128ss_increase__works(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int128ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128ss_increase
-#define _TEST__F_type_array__int128ss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128ss_increase()
- */
-extern void test__f_type_array_int128ss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int128ss_increase()
- */
-extern void test__f_type_array_int128ss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128ss_increase()
- */
-extern void test__f_type_array_int128ss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__int128ss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128ss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128ss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int128ss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128ss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128ss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int128ss_increase_by__works(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int128ss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128ss_increase_by
-#define _TEST__F_type_array__int128ss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128ss_increase_by()
- */
-extern void test__f_type_array_int128ss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int128ss_increase_by()
- */
-extern void test__f_type_array_int128ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128ss_increase_by()
- */
-extern void test__f_type_array_int128ss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__int128ss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int128ss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128ss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int128ss_resize__works(void **state) {
-
- const int length = 5;
- f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int128ss_resize
-#define _TEST__F_type_array__int128ss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int128ss_resize()
- */
-extern void test__f_type_array_int128ss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128ss_resize()
- */
-extern void test__f_type_array_int128ss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__int128ss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16s_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16s_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int16s_adjust__works(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16s_adjust
-#define _TEST__F_type_array__int16s_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16s_adjust()
- */
-extern void test__f_type_array_int16s_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_adjust()
- */
-extern void test__f_type_array_int16s_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-int16s_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int16s_adjust_callback__fails(void **state) {
+
+ int16_t data = 0;
+ int16_t data_array[] = { data };
+ f_int16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int16s_t datass_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_int16s_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_int16s_adjust_callback__works(void **state) {
+
+ int16_t data = 0;
+ int16_t data_array[] = { data };
+ f_int16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int16s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_int16s_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__int16s_adjust_callback
+#define _TEST__F_type_array__int16s_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int16s_adjust_callback()
+ */
+extern void test__f_type_array_int16s_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16s_adjust_callback()
+ */
+extern void test__f_type_array_int16s_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int16s_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16s_append__parameter_checking(void **state) {
-
- const int16_t data = 0;
-
- {
- const f_status_t status = f_int16s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int16s_append__works(void **state) {
-
- const int16_t source = 3;
- f_int16s_t destination = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16s_append
-#define _TEST__F_type_array__int16s_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16s_append()
- */
-extern void test__f_type_array_int16s_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_append()
- */
-extern void test__f_type_array_int16s_append__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16s_append_all__parameter_checking(void **state) {
-
- const f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int16s_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16s_t source = f_int16s_t_initialize;
- f_int16s_t destination = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int16s_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int16s_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_int16s_t source = f_int16s_t_initialize;
- f_int16s_t destination = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_int16s_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16s_append_all
-#define _TEST__F_type_array__int16s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16s_append_all()
- */
-extern void test__f_type_array_int16s_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int16s_append_all()
- */
-extern void test__f_type_array_int16s_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_append_all()
- */
-extern void test__f_type_array_int16s_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16s_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16s_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int16s_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16s_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int16s_decimate_by__works(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16s_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16s_decimate_by
-#define _TEST__F_type_array__int16s_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16s_decimate_by()
- */
-extern void test__f_type_array_int16s_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int16s_decimate_by()
- */
-extern void test__f_type_array_int16s_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_decimate_by()
- */
-extern void test__f_type_array_int16s_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16s_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16s_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int16s_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16s_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int16s_decrease_by__works(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16s_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16s_decrease_by
-#define _TEST__F_type_array__int16s_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16s_decrease_by()
- */
-extern void test__f_type_array_int16s_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int16s_decrease_by()
- */
-extern void test__f_type_array_int16s_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_decrease_by()
- */
-extern void test__f_type_array_int16s_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16s_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16s_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int16s_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16s_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int16s_increase__works(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int16s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16s_increase
-#define _TEST__F_type_array__int16s_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16s_increase()
- */
-extern void test__f_type_array_int16s_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int16s_increase()
- */
-extern void test__f_type_array_int16s_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_increase()
- */
-extern void test__f_type_array_int16s_increase__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16s_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int16s_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16s_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int16s_increase_by__works(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int16s_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16s_increase_by
-#define _TEST__F_type_array__int16s_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16s_increase_by()
- */
-extern void test__f_type_array_int16s_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int16s_increase_by()
- */
-extern void test__f_type_array_int16s_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_increase_by()
- */
-extern void test__f_type_array_int16s_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16s_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16s_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int16s_resize__works(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16s_resize
-#define _TEST__F_type_array__int16s_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16s_resize()
- */
-extern void test__f_type_array_int16s_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_resize()
- */
-extern void test__f_type_array_int16s_resize__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-int16s_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int16s_resize_callback__fails(void **state) {
+
+ int16_t data = 0;
+ int16_t data_array[] = { data };
+ f_int16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int16s_t datass_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_int16s_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_int16s_resize_callback__works(void **state) {
+
+ int16_t data = 0;
+ int16_t data_array[] = { data };
+ f_int16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int16s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_int16s_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__int16s_resize_callback
+#define _TEST__F_type_array__int16s_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int16s_resize_callback()
+ */
+extern void test__f_type_array_int16s_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16s_resize_callback()
+ */
+extern void test__f_type_array_int16s_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int16s_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16ss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16ss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int16ss_adjust__works(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16ss_adjust
-#define _TEST__F_type_array__int16ss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16ss_adjust()
- */
-extern void test__f_type_array_int16ss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16ss_adjust()
- */
-extern void test__f_type_array_int16ss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__int16ss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16ss_append__parameter_checking(void **state) {
-
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16ss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int16ss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16s_t source = f_int16s_t_initialize;
- f_int16ss_t destination = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int16ss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int16ss_append__works(void **state) {
-
- const int length = 5;
- f_int16s_t source = f_int16s_t_initialize;
- f_int16ss_t destination = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_int16ss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16ss_append
-#define _TEST__F_type_array__int16ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16ss_append()
- */
-extern void test__f_type_array_int16ss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int16ss_append()
- */
-extern void test__f_type_array_int16ss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16ss_append()
- */
-extern void test__f_type_array_int16ss_append__works(void **state);
-
-#endif // _TEST__F_type_array__int16ss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16ss_append_all__parameter_checking(void **state) {
-
- const f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int16ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16ss_t source = f_int16ss_t_initialize;
- f_int16ss_t destination = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int16ss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int16ss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_int16ss_t source = f_int16ss_t_initialize;
- f_int16ss_t destination = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_int16s_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_int16ss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16ss_append_all
-#define _TEST__F_type_array__int16ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16ss_append_all()
- */
-extern void test__f_type_array_int16ss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int16ss_append_all()
- */
-extern void test__f_type_array_int16ss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16ss_append_all()
- */
-extern void test__f_type_array_int16ss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__int16ss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16ss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int16ss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16ss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int16ss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16ss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16ss_decimate_by
-#define _TEST__F_type_array__int16ss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16ss_decimate_by()
- */
-extern void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_int16ss_decimate_by()
- */
-extern void test__f_type_array_int16ss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16ss_decimate_by()
- */
-extern void test__f_type_array_int16ss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__int16ss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16ss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int16ss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16ss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int16ss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16ss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16ss_decrease_by
-#define _TEST__F_type_array__int16ss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16ss_decrease_by()
- */
-extern void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int16ss_decrease_by()
- */
-extern void test__f_type_array_int16ss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16ss_decrease_by()
- */
-extern void test__f_type_array_int16ss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__int16ss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16ss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16ss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16ss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int16ss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16ss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int16ss_increase__works(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int16ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16ss_increase
-#define _TEST__F_type_array__int16ss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16ss_increase()
- */
-extern void test__f_type_array_int16ss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int16ss_increase()
- */
-extern void test__f_type_array_int16ss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16ss_increase()
- */
-extern void test__f_type_array_int16ss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__int16ss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16ss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16ss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int16ss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16ss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16ss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int16ss_increase_by__works(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int16ss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16ss_increase_by
-#define _TEST__F_type_array__int16ss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16ss_increase_by()
- */
-extern void test__f_type_array_int16ss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int16ss_increase_by()
- */
-extern void test__f_type_array_int16ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16ss_increase_by()
- */
-extern void test__f_type_array_int16ss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__int16ss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int16ss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16ss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int16ss_resize__works(void **state) {
-
- const int length = 5;
- f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int16ss_resize
-#define _TEST__F_type_array__int16ss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int16ss_resize()
- */
-extern void test__f_type_array_int16ss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16ss_resize()
- */
-extern void test__f_type_array_int16ss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__int16ss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32s_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32s_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int32s_adjust__works(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32s_adjust
-#define _TEST__F_type_array__int32s_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32s_adjust()
- */
-extern void test__f_type_array_int32s_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_adjust()
- */
-extern void test__f_type_array_int32s_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-int32s_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int32s_adjust_callback__fails(void **state) {
+
+ int32_t data = 0;
+ int32_t data_array[] = { data };
+ f_int32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int32s_t datass_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_int32s_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_int32s_adjust_callback__works(void **state) {
+
+ int32_t data = 0;
+ int32_t data_array[] = { data };
+ f_int32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int32s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_int32s_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__int32s_adjust_callback
+#define _TEST__F_type_array__int32s_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int32s_adjust_callback()
+ */
+extern void test__f_type_array_int32s_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32s_adjust_callback()
+ */
+extern void test__f_type_array_int32s_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int32s_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32s_append__parameter_checking(void **state) {
-
- const int32_t data = 0;
-
- {
- const f_status_t status = f_int32s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int32s_append__works(void **state) {
-
- const int32_t source = 3;
- f_int32s_t destination = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32s_append
-#define _TEST__F_type_array__int32s_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32s_append()
- */
-extern void test__f_type_array_int32s_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_append()
- */
-extern void test__f_type_array_int32s_append__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32s_append_all__parameter_checking(void **state) {
-
- const f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int32s_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32s_t source = f_int32s_t_initialize;
- f_int32s_t destination = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int32s_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int32s_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_int32s_t source = f_int32s_t_initialize;
- f_int32s_t destination = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_int32s_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32s_append_all
-#define _TEST__F_type_array__int32s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32s_append_all()
- */
-extern void test__f_type_array_int32s_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int32s_append_all()
- */
-extern void test__f_type_array_int32s_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_append_all()
- */
-extern void test__f_type_array_int32s_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32s_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32s_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int32s_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32s_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int32s_decimate_by__works(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32s_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32s_decimate_by
-#define _TEST__F_type_array__int32s_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32s_decimate_by()
- */
-extern void test__f_type_array_int32s_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int32s_decimate_by()
- */
-extern void test__f_type_array_int32s_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_decimate_by()
- */
-extern void test__f_type_array_int32s_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32s_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32s_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int32s_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32s_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int32s_decrease_by__works(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32s_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32s_decrease_by
-#define _TEST__F_type_array__int32s_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32s_decrease_by()
- */
-extern void test__f_type_array_int32s_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int32s_decrease_by()
- */
-extern void test__f_type_array_int32s_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_decrease_by()
- */
-extern void test__f_type_array_int32s_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32s_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32s_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int32s_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32s_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int32s_increase__works(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int32s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32s_increase
-#define _TEST__F_type_array__int32s_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32s_increase()
- */
-extern void test__f_type_array_int32s_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int32s_increase()
- */
-extern void test__f_type_array_int32s_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_increase()
- */
-extern void test__f_type_array_int32s_increase__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32s_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int32s_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32s_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int32s_increase_by__works(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int32s_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32s_increase_by
-#define _TEST__F_type_array__int32s_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32s_increase_by()
- */
-extern void test__f_type_array_int32s_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int32s_increase_by()
- */
-extern void test__f_type_array_int32s_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_increase_by()
- */
-extern void test__f_type_array_int32s_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32s_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32s_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int32s_resize__works(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32s_resize
-#define _TEST__F_type_array__int32s_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32s_resize()
- */
-extern void test__f_type_array_int32s_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_resize()
- */
-extern void test__f_type_array_int32s_resize__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-int32s_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int32s_resize_callback__fails(void **state) {
+
+ int32_t data = 0;
+ int32_t data_array[] = { data };
+ f_int32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int32s_t datass_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_int32s_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_int32s_resize_callback__works(void **state) {
+
+ int32_t data = 0;
+ int32_t data_array[] = { data };
+ f_int32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int32s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_int32s_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__int32s_resize_callback
+#define _TEST__F_type_array__int32s_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int32s_resize_callback()
+ */
+extern void test__f_type_array_int32s_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32s_resize_callback()
+ */
+extern void test__f_type_array_int32s_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int32s_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32ss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32ss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int32ss_adjust__works(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32ss_adjust
-#define _TEST__F_type_array__int32ss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32ss_adjust()
- */
-extern void test__f_type_array_int32ss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32ss_adjust()
- */
-extern void test__f_type_array_int32ss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__int32ss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32ss_append__parameter_checking(void **state) {
-
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32ss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int32ss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32s_t source = f_int32s_t_initialize;
- f_int32ss_t destination = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int32ss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int32ss_append__works(void **state) {
-
- const int length = 5;
- f_int32s_t source = f_int32s_t_initialize;
- f_int32ss_t destination = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_int32ss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32ss_append
-#define _TEST__F_type_array__int32ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32ss_append()
- */
-extern void test__f_type_array_int32ss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int32ss_append()
- */
-extern void test__f_type_array_int32ss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32ss_append()
- */
-extern void test__f_type_array_int32ss_append__works(void **state);
-
-#endif // _TEST__F_type_array__int32ss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32ss_append_all__parameter_checking(void **state) {
-
- const f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int32ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32ss_t source = f_int32ss_t_initialize;
- f_int32ss_t destination = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int32ss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int32ss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_int32ss_t source = f_int32ss_t_initialize;
- f_int32ss_t destination = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_int32s_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_int32ss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32ss_append_all
-#define _TEST__F_type_array__int32ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32ss_append_all()
- */
-extern void test__f_type_array_int32ss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int32ss_append_all()
- */
-extern void test__f_type_array_int32ss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32ss_append_all()
- */
-extern void test__f_type_array_int32ss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__int32ss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32ss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int32ss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32ss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int32ss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32ss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32ss_decimate_by
-#define _TEST__F_type_array__int32ss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32ss_decimate_by()
- */
-extern void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_int32ss_decimate_by()
- */
-extern void test__f_type_array_int32ss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32ss_decimate_by()
- */
-extern void test__f_type_array_int32ss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__int32ss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32ss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int32ss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32ss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int32ss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32ss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32ss_decrease_by
-#define _TEST__F_type_array__int32ss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32ss_decrease_by()
- */
-extern void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int32ss_decrease_by()
- */
-extern void test__f_type_array_int32ss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32ss_decrease_by()
- */
-extern void test__f_type_array_int32ss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__int32ss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32ss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32ss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32ss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int32ss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32ss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int32ss_increase__works(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int32ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32ss_increase
-#define _TEST__F_type_array__int32ss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32ss_increase()
- */
-extern void test__f_type_array_int32ss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int32ss_increase()
- */
-extern void test__f_type_array_int32ss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32ss_increase()
- */
-extern void test__f_type_array_int32ss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__int32ss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32ss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32ss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int32ss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32ss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32ss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int32ss_increase_by__works(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int32ss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32ss_increase_by
-#define _TEST__F_type_array__int32ss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32ss_increase_by()
- */
-extern void test__f_type_array_int32ss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int32ss_increase_by()
- */
-extern void test__f_type_array_int32ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32ss_increase_by()
- */
-extern void test__f_type_array_int32ss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__int32ss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int32ss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32ss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int32ss_resize__works(void **state) {
-
- const int length = 5;
- f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int32ss_resize
-#define _TEST__F_type_array__int32ss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int32ss_resize()
- */
-extern void test__f_type_array_int32ss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32ss_resize()
- */
-extern void test__f_type_array_int32ss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__int32ss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64s_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64s_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int64s_adjust__works(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64s_adjust
-#define _TEST__F_type_array__int64s_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64s_adjust()
- */
-extern void test__f_type_array_int64s_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_adjust()
- */
-extern void test__f_type_array_int64s_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-int64s_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int64s_adjust_callback__fails(void **state) {
+
+ int64_t data = 0;
+ int64_t data_array[] = { data };
+ f_int64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int64s_t datass_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_int64s_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_int64s_adjust_callback__works(void **state) {
+
+ int64_t data = 0;
+ int64_t data_array[] = { data };
+ f_int64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int64s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_int64s_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__int64s_adjust_callback
+#define _TEST__F_type_array__int64s_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int64s_adjust_callback()
+ */
+extern void test__f_type_array_int64s_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64s_adjust_callback()
+ */
+extern void test__f_type_array_int64s_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int64s_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64s_append__parameter_checking(void **state) {
-
- const int64_t data = 0;
-
- {
- const f_status_t status = f_int64s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int64s_append__works(void **state) {
-
- const int64_t source = 3;
- f_int64s_t destination = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64s_append
-#define _TEST__F_type_array__int64s_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64s_append()
- */
-extern void test__f_type_array_int64s_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_append()
- */
-extern void test__f_type_array_int64s_append__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64s_append_all__parameter_checking(void **state) {
-
- const f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int64s_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64s_t source = f_int64s_t_initialize;
- f_int64s_t destination = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int64s_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int64s_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_int64s_t source = f_int64s_t_initialize;
- f_int64s_t destination = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_int64s_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64s_append_all
-#define _TEST__F_type_array__int64s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64s_append_all()
- */
-extern void test__f_type_array_int64s_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int64s_append_all()
- */
-extern void test__f_type_array_int64s_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_append_all()
- */
-extern void test__f_type_array_int64s_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64s_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64s_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int64s_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64s_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int64s_decimate_by__works(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64s_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64s_decimate_by
-#define _TEST__F_type_array__int64s_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64s_decimate_by()
- */
-extern void test__f_type_array_int64s_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int64s_decimate_by()
- */
-extern void test__f_type_array_int64s_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_decimate_by()
- */
-extern void test__f_type_array_int64s_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64s_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64s_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int64s_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64s_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int64s_decrease_by__works(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64s_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64s_decrease_by
-#define _TEST__F_type_array__int64s_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64s_decrease_by()
- */
-extern void test__f_type_array_int64s_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int64s_decrease_by()
- */
-extern void test__f_type_array_int64s_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_decrease_by()
- */
-extern void test__f_type_array_int64s_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64s_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64s_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int64s_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64s_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int64s_increase__works(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int64s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64s_increase
-#define _TEST__F_type_array__int64s_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64s_increase()
- */
-extern void test__f_type_array_int64s_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int64s_increase()
- */
-extern void test__f_type_array_int64s_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_increase()
- */
-extern void test__f_type_array_int64s_increase__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64s_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int64s_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64s_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int64s_increase_by__works(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int64s_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64s_increase_by
-#define _TEST__F_type_array__int64s_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64s_increase_by()
- */
-extern void test__f_type_array_int64s_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int64s_increase_by()
- */
-extern void test__f_type_array_int64s_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_increase_by()
- */
-extern void test__f_type_array_int64s_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64s_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64s_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int64s_resize__works(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64s_resize
-#define _TEST__F_type_array__int64s_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64s_resize()
- */
-extern void test__f_type_array_int64s_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_resize()
- */
-extern void test__f_type_array_int64s_resize__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-int64s_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int64s_resize_callback__fails(void **state) {
+
+ int64_t data = 0;
+ int64_t data_array[] = { data };
+ f_int64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int64s_t datass_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_int64s_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_int64s_resize_callback__works(void **state) {
+
+ int64_t data = 0;
+ int64_t data_array[] = { data };
+ f_int64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int64s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_int64s_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__int64s_resize_callback
+#define _TEST__F_type_array__int64s_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int64s_resize_callback()
+ */
+extern void test__f_type_array_int64s_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64s_resize_callback()
+ */
+extern void test__f_type_array_int64s_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int64s_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64ss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64ss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int64ss_adjust__works(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64ss_adjust
-#define _TEST__F_type_array__int64ss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64ss_adjust()
- */
-extern void test__f_type_array_int64ss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64ss_adjust()
- */
-extern void test__f_type_array_int64ss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__int64ss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64ss_append__parameter_checking(void **state) {
-
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64ss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int64ss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64s_t source = f_int64s_t_initialize;
- f_int64ss_t destination = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int64ss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int64ss_append__works(void **state) {
-
- const int length = 5;
- f_int64s_t source = f_int64s_t_initialize;
- f_int64ss_t destination = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_int64ss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64ss_append
-#define _TEST__F_type_array__int64ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64ss_append()
- */
-extern void test__f_type_array_int64ss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int64ss_append()
- */
-extern void test__f_type_array_int64ss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64ss_append()
- */
-extern void test__f_type_array_int64ss_append__works(void **state);
-
-#endif // _TEST__F_type_array__int64ss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64ss_append_all__parameter_checking(void **state) {
-
- const f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int64ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64ss_t source = f_int64ss_t_initialize;
- f_int64ss_t destination = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int64ss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int64ss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_int64ss_t source = f_int64ss_t_initialize;
- f_int64ss_t destination = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_int64s_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_int64ss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64ss_append_all
-#define _TEST__F_type_array__int64ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64ss_append_all()
- */
-extern void test__f_type_array_int64ss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int64ss_append_all()
- */
-extern void test__f_type_array_int64ss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64ss_append_all()
- */
-extern void test__f_type_array_int64ss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__int64ss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64ss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int64ss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64ss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int64ss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64ss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64ss_decimate_by
-#define _TEST__F_type_array__int64ss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64ss_decimate_by()
- */
-extern void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_int64ss_decimate_by()
- */
-extern void test__f_type_array_int64ss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64ss_decimate_by()
- */
-extern void test__f_type_array_int64ss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__int64ss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64ss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int64ss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64ss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int64ss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64ss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64ss_decrease_by
-#define _TEST__F_type_array__int64ss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64ss_decrease_by()
- */
-extern void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int64ss_decrease_by()
- */
-extern void test__f_type_array_int64ss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64ss_decrease_by()
- */
-extern void test__f_type_array_int64ss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__int64ss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64ss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64ss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64ss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int64ss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64ss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int64ss_increase__works(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int64ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64ss_increase
-#define _TEST__F_type_array__int64ss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64ss_increase()
- */
-extern void test__f_type_array_int64ss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int64ss_increase()
- */
-extern void test__f_type_array_int64ss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64ss_increase()
- */
-extern void test__f_type_array_int64ss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__int64ss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64ss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64ss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int64ss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64ss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64ss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int64ss_increase_by__works(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int64ss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64ss_increase_by
-#define _TEST__F_type_array__int64ss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64ss_increase_by()
- */
-extern void test__f_type_array_int64ss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int64ss_increase_by()
- */
-extern void test__f_type_array_int64ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64ss_increase_by()
- */
-extern void test__f_type_array_int64ss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__int64ss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int64ss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64ss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int64ss_resize__works(void **state) {
-
- const int length = 5;
- f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int64ss_resize
-#define _TEST__F_type_array__int64ss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int64ss_resize()
- */
-extern void test__f_type_array_int64ss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64ss_resize()
- */
-extern void test__f_type_array_int64ss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__int64ss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8s_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8s_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int8s_adjust__works(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8s_adjust
-#define _TEST__F_type_array__int8s_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8s_adjust()
- */
-extern void test__f_type_array_int8s_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_adjust()
- */
-extern void test__f_type_array_int8s_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-int8s_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int8s_adjust_callback__fails(void **state) {
+
+ int8_t data = 0;
+ int8_t data_array[] = { data };
+ f_int8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int8s_t datass_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_int8s_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_int8s_adjust_callback__works(void **state) {
+
+ int8_t data = 0;
+ int8_t data_array[] = { data };
+ f_int8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int8s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_int8s_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__int8s_adjust_callback
+#define _TEST__F_type_array__int8s_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int8s_adjust_callback()
+ */
+extern void test__f_type_array_int8s_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8s_adjust_callback()
+ */
+extern void test__f_type_array_int8s_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int8s_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8s_append__parameter_checking(void **state) {
-
- const int8_t data = 0;
-
- {
- const f_status_t status = f_int8s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int8s_append__works(void **state) {
-
- const int8_t source = 3;
- f_int8s_t destination = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8s_append
-#define _TEST__F_type_array__int8s_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8s_append()
- */
-extern void test__f_type_array_int8s_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_append()
- */
-extern void test__f_type_array_int8s_append__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8s_append_all__parameter_checking(void **state) {
-
- const f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int8s_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8s_t source = f_int8s_t_initialize;
- f_int8s_t destination = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int8s_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int8s_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_int8s_t source = f_int8s_t_initialize;
- f_int8s_t destination = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_int8s_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8s_append_all
-#define _TEST__F_type_array__int8s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8s_append_all()
- */
-extern void test__f_type_array_int8s_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int8s_append_all()
- */
-extern void test__f_type_array_int8s_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_append_all()
- */
-extern void test__f_type_array_int8s_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8s_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8s_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int8s_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8s_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int8s_decimate_by__works(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8s_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8s_decimate_by
-#define _TEST__F_type_array__int8s_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8s_decimate_by()
- */
-extern void test__f_type_array_int8s_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int8s_decimate_by()
- */
-extern void test__f_type_array_int8s_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_decimate_by()
- */
-extern void test__f_type_array_int8s_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8s_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8s_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int8s_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8s_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int8s_decrease_by__works(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8s_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8s_decrease_by
-#define _TEST__F_type_array__int8s_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8s_decrease_by()
- */
-extern void test__f_type_array_int8s_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int8s_decrease_by()
- */
-extern void test__f_type_array_int8s_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_decrease_by()
- */
-extern void test__f_type_array_int8s_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8s_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8s_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int8s_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8s_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int8s_increase__works(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int8s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8s_increase
-#define _TEST__F_type_array__int8s_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8s_increase()
- */
-extern void test__f_type_array_int8s_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int8s_increase()
- */
-extern void test__f_type_array_int8s_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_increase()
- */
-extern void test__f_type_array_int8s_increase__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8s_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int8s_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8s_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int8s_increase_by__works(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int8s_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8s_increase_by
-#define _TEST__F_type_array__int8s_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8s_increase_by()
- */
-extern void test__f_type_array_int8s_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int8s_increase_by()
- */
-extern void test__f_type_array_int8s_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_increase_by()
- */
-extern void test__f_type_array_int8s_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8s_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8s_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int8s_resize__works(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8s_resize
-#define _TEST__F_type_array__int8s_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8s_resize()
- */
-extern void test__f_type_array_int8s_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_resize()
- */
-extern void test__f_type_array_int8s_resize__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-int8s_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int8s_resize_callback__fails(void **state) {
+
+ int8_t data = 0;
+ int8_t data_array[] = { data };
+ f_int8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int8s_t datass_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_int8s_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_int8s_resize_callback__works(void **state) {
+
+ int8_t data = 0;
+ int8_t data_array[] = { data };
+ f_int8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_int8s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_int8s_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__int8s_resize_callback
+#define _TEST__F_type_array__int8s_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int8s_resize_callback()
+ */
+extern void test__f_type_array_int8s_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8s_resize_callback()
+ */
+extern void test__f_type_array_int8s_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int8s_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8ss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8ss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int8ss_adjust__works(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8ss_adjust
-#define _TEST__F_type_array__int8ss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8ss_adjust()
- */
-extern void test__f_type_array_int8ss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8ss_adjust()
- */
-extern void test__f_type_array_int8ss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__int8ss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8ss_append__parameter_checking(void **state) {
-
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8ss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int8ss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8s_t source = f_int8s_t_initialize;
- f_int8ss_t destination = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int8ss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int8ss_append__works(void **state) {
-
- const int length = 5;
- f_int8s_t source = f_int8s_t_initialize;
- f_int8ss_t destination = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_int8ss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8ss_append
-#define _TEST__F_type_array__int8ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8ss_append()
- */
-extern void test__f_type_array_int8ss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int8ss_append()
- */
-extern void test__f_type_array_int8ss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8ss_append()
- */
-extern void test__f_type_array_int8ss_append__works(void **state);
-
-#endif // _TEST__F_type_array__int8ss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8ss_append_all__parameter_checking(void **state) {
-
- const f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_int8ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8ss_t source = f_int8ss_t_initialize;
- f_int8ss_t destination = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int8ss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_int8ss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_int8ss_t source = f_int8ss_t_initialize;
- f_int8ss_t destination = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_int8s_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_int8ss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8ss_append_all
-#define _TEST__F_type_array__int8ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8ss_append_all()
- */
-extern void test__f_type_array_int8ss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int8ss_append_all()
- */
-extern void test__f_type_array_int8ss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8ss_append_all()
- */
-extern void test__f_type_array_int8ss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__int8ss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8ss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int8ss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8ss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int8ss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8ss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8ss_decimate_by
-#define _TEST__F_type_array__int8ss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8ss_decimate_by()
- */
-extern void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_int8ss_decimate_by()
- */
-extern void test__f_type_array_int8ss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8ss_decimate_by()
- */
-extern void test__f_type_array_int8ss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__int8ss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8ss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int8ss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8ss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int8ss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8ss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8ss_decrease_by
-#define _TEST__F_type_array__int8ss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8ss_decrease_by()
- */
-extern void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int8ss_decrease_by()
- */
-extern void test__f_type_array_int8ss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8ss_decrease_by()
- */
-extern void test__f_type_array_int8ss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__int8ss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8ss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8ss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8ss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int8ss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8ss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int8ss_increase__works(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int8ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8ss_increase
-#define _TEST__F_type_array__int8ss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8ss_increase()
- */
-extern void test__f_type_array_int8ss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int8ss_increase()
- */
-extern void test__f_type_array_int8ss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8ss_increase()
- */
-extern void test__f_type_array_int8ss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__int8ss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8ss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8ss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int8ss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8ss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8ss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_int8ss_increase_by__works(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int8ss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8ss_increase_by
-#define _TEST__F_type_array__int8ss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8ss_increase_by()
- */
-extern void test__f_type_array_int8ss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_int8ss_increase_by()
- */
-extern void test__f_type_array_int8ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8ss_increase_by()
- */
-extern void test__f_type_array_int8ss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__int8ss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-int8ss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8ss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_int8ss_resize__works(void **state) {
-
- const int length = 5;
- f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__int8ss_resize
-#define _TEST__F_type_array__int8ss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_int8ss_resize()
- */
-extern void test__f_type_array_int8ss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8ss_resize()
- */
-extern void test__f_type_array_int8ss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__int8ss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsigneds_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsigneds_adjust__works(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsigneds_adjust
-#define _TEST__F_type_array__number_unsigneds_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsigneds_adjust()
- */
-extern void test__f_type_array_number_unsigneds_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_adjust()
- */
-extern void test__f_type_array_number_unsigneds_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-number_unsigneds_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_number_unsigneds_adjust_callback__fails(void **state) {
+
+ f_number_unsigned_t data = f_number_unsigned_t_initialize;
+ f_number_unsigned_t data_array[] = { data };
+ f_number_unsigneds_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_number_unsigneds_t datass_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_number_unsigneds_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_number_unsigneds_adjust_callback__works(void **state) {
+
+ f_number_unsigned_t data = f_number_unsigned_t_initialize;
+ f_number_unsigned_t data_array[] = { data };
+ f_number_unsigneds_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_number_unsigneds_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_number_unsigneds_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__number_unsigneds_adjust_callback
+#define _TEST__F_type_array__number_unsigneds_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_number_unsigneds_adjust_callback()
+ */
+extern void test__f_type_array_number_unsigneds_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_number_unsigneds_adjust_callback()
+ */
+extern void test__f_type_array_number_unsigneds_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__number_unsigneds_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsigneds_append__parameter_checking(void **state) {
-
- const f_number_unsigned_t data = f_number_unsigned_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_number_unsigneds_append__works(void **state) {
-
- const f_number_unsigned_t source = 3;
- f_number_unsigneds_t destination = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsigneds_append
-#define _TEST__F_type_array__number_unsigneds_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsigneds_append()
- */
-extern void test__f_type_array_number_unsigneds_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_append()
- */
-extern void test__f_type_array_number_unsigneds_append__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsigneds_append_all__parameter_checking(void **state) {
-
- const f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_number_unsigneds_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t source = f_number_unsigneds_t_initialize;
- f_number_unsigneds_t destination = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_number_unsigneds_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_number_unsigneds_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_number_unsigneds_t source = f_number_unsigneds_t_initialize;
- f_number_unsigneds_t destination = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_number_unsigneds_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsigneds_append_all
-#define _TEST__F_type_array__number_unsigneds_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsigneds_append_all()
- */
-extern void test__f_type_array_number_unsigneds_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsigneds_append_all()
- */
-extern void test__f_type_array_number_unsigneds_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_append_all()
- */
-extern void test__f_type_array_number_unsigneds_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsigneds_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsigneds_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsigneds_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsigneds_decimate_by__works(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsigneds_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsigneds_decimate_by
-#define _TEST__F_type_array__number_unsigneds_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsigneds_decimate_by()
- */
-extern void test__f_type_array_number_unsigneds_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsigneds_decimate_by()
- */
-extern void test__f_type_array_number_unsigneds_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_decimate_by()
- */
-extern void test__f_type_array_number_unsigneds_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsigneds_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsigneds_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsigneds_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsigneds_decrease_by__works(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsigneds_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsigneds_decrease_by
-#define _TEST__F_type_array__number_unsigneds_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsigneds_decrease_by()
- */
-extern void test__f_type_array_number_unsigneds_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsigneds_decrease_by()
- */
-extern void test__f_type_array_number_unsigneds_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_decrease_by()
- */
-extern void test__f_type_array_number_unsigneds_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsigneds_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsigneds_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsigneds_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsigneds_increase__works(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_number_unsigneds_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsigneds_increase
-#define _TEST__F_type_array__number_unsigneds_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsigneds_increase()
- */
-extern void test__f_type_array_number_unsigneds_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsigneds_increase()
- */
-extern void test__f_type_array_number_unsigneds_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_increase()
- */
-extern void test__f_type_array_number_unsigneds_increase__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsigneds_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsigneds_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsigneds_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsigneds_increase_by__works(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_number_unsigneds_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsigneds_increase_by
-#define _TEST__F_type_array__number_unsigneds_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsigneds_increase_by()
- */
-extern void test__f_type_array_number_unsigneds_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsigneds_increase_by()
- */
-extern void test__f_type_array_number_unsigneds_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_increase_by()
- */
-extern void test__f_type_array_number_unsigneds_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsigneds_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsigneds_resize__works(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsigneds_resize
-#define _TEST__F_type_array__number_unsigneds_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsigneds_resize()
- */
-extern void test__f_type_array_number_unsigneds_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_resize()
- */
-extern void test__f_type_array_number_unsigneds_resize__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-number_unsigneds_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_number_unsigneds_resize_callback__fails(void **state) {
+
+ f_number_unsigned_t data = f_number_unsigned_t_initialize;
+ f_number_unsigned_t data_array[] = { data };
+ f_number_unsigneds_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_number_unsigneds_t datass_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_number_unsigneds_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_number_unsigneds_resize_callback__works(void **state) {
+
+ f_number_unsigned_t data = f_number_unsigned_t_initialize;
+ f_number_unsigned_t data_array[] = { data };
+ f_number_unsigneds_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_number_unsigneds_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_number_unsigneds_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__number_unsigneds_resize_callback
+#define _TEST__F_type_array__number_unsigneds_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_number_unsigneds_resize_callback()
+ */
+extern void test__f_type_array_number_unsigneds_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_number_unsigneds_resize_callback()
+ */
+extern void test__f_type_array_number_unsigneds_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__number_unsigneds_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsignedss_adjust__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_adjust
-#define _TEST__F_type_array__number_unsignedss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_adjust()
- */
-extern void test__f_type_array_number_unsignedss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_adjust()
- */
-extern void test__f_type_array_number_unsignedss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_append__parameter_checking(void **state) {
-
- const f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_number_unsignedss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t source = f_number_unsigneds_t_initialize;
- f_number_unsignedss_t destination = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_number_unsignedss_append__works(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t source = f_number_unsigneds_t_initialize;
- f_number_unsignedss_t destination = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_number_unsignedss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_append
-#define _TEST__F_type_array__number_unsignedss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_append()
- */
-extern void test__f_type_array_number_unsignedss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_append()
- */
-extern void test__f_type_array_number_unsignedss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_append()
- */
-extern void test__f_type_array_number_unsignedss_append__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_append_all__parameter_checking(void **state) {
-
- const f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_number_unsignedss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t source = f_number_unsignedss_t_initialize;
- f_number_unsignedss_t destination = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_number_unsignedss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_number_unsignedss_t source = f_number_unsignedss_t_initialize;
- f_number_unsignedss_t destination = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_number_unsigneds_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_number_unsignedss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_append_all
-#define _TEST__F_type_array__number_unsignedss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_append_all()
- */
-extern void test__f_type_array_number_unsignedss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_append_all()
- */
-extern void test__f_type_array_number_unsignedss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_append_all()
- */
-extern void test__f_type_array_number_unsignedss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsignedss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsignedss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_decimate_by
-#define _TEST__F_type_array__number_unsignedss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_decimate_by()
- */
-extern void test__f_type_array_number_unsignedss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_number_unsignedss_decimate_by()
- */
-extern void test__f_type_array_number_unsignedss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_decimate_by()
- */
-extern void test__f_type_array_number_unsignedss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsignedss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsignedss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_decrease_by
-#define _TEST__F_type_array__number_unsignedss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_decrease_by()
- */
-extern void test__f_type_array_number_unsignedss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_decrease_by()
- */
-extern void test__f_type_array_number_unsignedss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_decrease_by()
- */
-extern void test__f_type_array_number_unsignedss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsignedss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsignedss_increase__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_number_unsignedss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_increase
-#define _TEST__F_type_array__number_unsignedss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_increase()
- */
-extern void test__f_type_array_number_unsignedss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_increase()
- */
-extern void test__f_type_array_number_unsignedss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_increase()
- */
-extern void test__f_type_array_number_unsignedss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsignedss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsignedss_increase_by__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_number_unsignedss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_increase_by
-#define _TEST__F_type_array__number_unsignedss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_increase_by()
- */
-extern void test__f_type_array_number_unsignedss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_increase_by()
- */
-extern void test__f_type_array_number_unsignedss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_increase_by()
- */
-extern void test__f_type_array_number_unsignedss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsignedss_resize__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_resize
-#define _TEST__F_type_array__number_unsignedss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_resize()
- */
-extern void test__f_type_array_number_unsignedss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_resize()
- */
-extern void test__f_type_array_number_unsignedss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsignedss_adjust__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_adjust
-#define _TEST__F_type_array__number_unsignedss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_adjust()
- */
-extern void test__f_type_array_number_unsignedss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_adjust()
- */
-extern void test__f_type_array_number_unsignedss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_append__parameter_checking(void **state) {
-
- const f_number_unsigneds_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_number_unsignedss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t source = f_number_unsigneds_t_initialize;
- f_number_unsignedss_t destination = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_number_unsignedss_append__works(void **state) {
-
- const int length = 5;
- f_number_unsigneds_t source = f_number_unsigneds_t_initialize;
- f_number_unsignedss_t destination = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsigneds_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_number_unsignedss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_append
-#define _TEST__F_type_array__number_unsignedss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_append()
- */
-extern void test__f_type_array_number_unsignedss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_append()
- */
-extern void test__f_type_array_number_unsignedss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_append()
- */
-extern void test__f_type_array_number_unsignedss_append__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_append_all__parameter_checking(void **state) {
-
- const f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_number_unsignedss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t source = f_number_unsignedss_t_initialize;
- f_number_unsignedss_t destination = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_number_unsignedss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_number_unsignedss_t source = f_number_unsignedss_t_initialize;
- f_number_unsignedss_t destination = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_number_unsigneds_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_number_unsignedss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_append_all
-#define _TEST__F_type_array__number_unsignedss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_append_all()
- */
-extern void test__f_type_array_number_unsignedss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_append_all()
- */
-extern void test__f_type_array_number_unsignedss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_append_all()
- */
-extern void test__f_type_array_number_unsignedss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsignedss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsignedss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_decimate_by
-#define _TEST__F_type_array__number_unsignedss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_decimate_by()
- */
-extern void test__f_type_array_number_unsignedss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_decimate_by()
- */
-extern void test__f_type_array_number_unsignedss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_decimate_by()
- */
-extern void test__f_type_array_number_unsignedss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsignedss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsignedss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_decrease_by
-#define _TEST__F_type_array__number_unsignedss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_decrease_by()
- */
-extern void test__f_type_array_number_unsignedss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_decrease_by()
- */
-extern void test__f_type_array_number_unsignedss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_decrease_by()
- */
-extern void test__f_type_array_number_unsignedss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsignedss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsignedss_increase__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_number_unsignedss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_increase
-#define _TEST__F_type_array__number_unsignedss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_increase()
- */
-extern void test__f_type_array_number_unsignedss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_increase()
- */
-extern void test__f_type_array_number_unsignedss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_increase()
- */
-extern void test__f_type_array_number_unsignedss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsignedss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_number_unsignedss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_number_unsignedss_increase_by__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsigneds_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_number_unsignedss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_increase_by
-#define _TEST__F_type_array__number_unsignedss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_increase_by()
- */
-extern void test__f_type_array_number_unsignedss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_number_unsignedss_increase_by()
- */
-extern void test__f_type_array_number_unsignedss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_increase_by()
- */
-extern void test__f_type_array_number_unsignedss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-number_unsignedss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsignedss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_number_unsignedss_resize__works(void **state) {
-
- const int length = 5;
- f_number_unsignedss_t data = f_number_unsignedss_t_initialize;
-
- {
- const f_status_t status = f_number_unsignedss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__number_unsignedss_resize
-#define _TEST__F_type_array__number_unsignedss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_number_unsignedss_resize()
- */
-extern void test__f_type_array_number_unsignedss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsignedss_resize()
- */
-extern void test__f_type_array_number_unsignedss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsignedss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-polls_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_polls_adjust__parameter_checking(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_polls_adjust__works(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__polls_adjust
-#define _TEST__F_type_array__polls_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_polls_adjust()
- */
-extern void test__f_type_array_polls_adjust__parameter_checking(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_adjust()
- */
-extern void test__f_type_array_polls_adjust__works(void **poll);
-
-#endif // _TEST__F_type_array__polls_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-polls_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_polls_append__parameter_checking(void **poll) {
-
- const f_poll_t data = f_poll_t_initialize;
-
- {
- const f_status_t status = f_polls_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_polls_append__works(void **poll) {
-
- const f_poll_t source = macro_f_poll_t_initialize_1(0, 1, 2);
- f_polls_t destination = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].fd, source.fd);
- assert_int_equal(destination.array[0].events, source.events);
- assert_int_equal(destination.array[0].revents, source.revents);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__polls_append
-#define _TEST__F_type_array__polls_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_polls_append()
- */
-extern void test__f_type_array_polls_append__parameter_checking(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_append()
- */
-extern void test__f_type_array_polls_append__works(void **poll);
-
-#endif // _TEST__F_type_array__polls_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-polls_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_polls_append_all__parameter_checking(void **poll) {
-
- const f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_polls_append_all__returns_data_not(void **poll) {
-
- const int length = 5;
- f_polls_t source = f_polls_t_initialize;
- f_polls_t destination = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_polls_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_polls_append_all__works(void **poll) {
-
- const int length = 5;
- f_polls_t source = f_polls_t_initialize;
- f_polls_t destination = f_polls_t_initialize;
-
- const f_poll_t poll_0 = { 0, 1, 2 };
- const f_poll_t poll_1 = { 0, 2, 3 };
-
- {
- const f_status_t status = f_polls_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- memcpy(&source.array[source.used++], (void *) &poll_0, sizeof(f_poll_t));
- memcpy(&source.array[source.used++], (void *) &poll_1, sizeof(f_poll_t));
-
- {
- const f_status_t status = f_polls_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
-
- assert_int_equal(destination.array[i].fd, source.array[i].fd);
- assert_int_equal(destination.array[i].events, source.array[i].events);
- assert_int_equal(destination.array[i].revents, source.array[i].revents);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__polls_append_all
-#define _TEST__F_type_array__polls_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_polls_append_all()
- */
-extern void test__f_type_array_polls_append_all__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_polls_append_all()
- */
-extern void test__f_type_array_polls_append_all__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_append_all()
- */
-extern void test__f_type_array_polls_append_all__works(void **poll);
-
-#endif // _TEST__F_type_array__polls_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-polls_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_polls_decimate_by__parameter_checking(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_polls_decimate_by__returns_data_not(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_polls_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_polls_decimate_by__works(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_polls_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__polls_decimate_by
-#define _TEST__F_type_array__polls_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_polls_decimate_by()
- */
-extern void test__f_type_array_polls_decimate_by__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_polls_decimate_by()
- */
-extern void test__f_type_array_polls_decimate_by__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_decimate_by()
- */
-extern void test__f_type_array_polls_decimate_by__works(void **poll);
-
-#endif // _TEST__F_type_array__polls_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-polls_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_polls_decrease_by__parameter_checking(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_polls_decrease_by__returns_data_not(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_polls_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_polls_decrease_by__works(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_polls_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__polls_decrease_by
-#define _TEST__F_type_array__polls_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_polls_decrease_by()
- */
-extern void test__f_type_array_polls_decrease_by__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_polls_decrease_by()
- */
-extern void test__f_type_array_polls_decrease_by__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_decrease_by()
- */
-extern void test__f_type_array_polls_decrease_by__works(void **poll);
-
-#endif // _TEST__F_type_array__polls_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-polls_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_polls_increase__parameter_checking(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_polls_increase__returns_data_not(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_polls_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_polls_increase__works(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_polls_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__polls_increase
-#define _TEST__F_type_array__polls_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_polls_increase()
- */
-extern void test__f_type_array_polls_increase__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_polls_increase()
- */
-extern void test__f_type_array_polls_increase__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_increase()
- */
-extern void test__f_type_array_polls_increase__works(void **poll);
-
-#endif // _TEST__F_type_array__polls_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-polls_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_polls_increase_by__parameter_checking(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_polls_increase_by__returns_data_not(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_polls_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_polls_increase_by__works(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_polls_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__polls_increase_by
-#define _TEST__F_type_array__polls_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_polls_increase_by()
- */
-extern void test__f_type_array_polls_increase_by__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_polls_increase_by()
- */
-extern void test__f_type_array_polls_increase_by__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_increase_by()
- */
-extern void test__f_type_array_polls_increase_by__works(void **poll);
-
-#endif // _TEST__F_type_array__polls_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-polls_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_polls_resize__parameter_checking(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_polls_resize__works(void **poll) {
-
- const int length = 5;
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__polls_resize
-#define _TEST__F_type_array__polls_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_polls_resize()
- */
-extern void test__f_type_array_polls_resize__parameter_checking(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_resize()
- */
-extern void test__f_type_array_polls_resize__works(void **poll);
-
-#endif // _TEST__F_type_array__polls_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-pollss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_pollss_adjust__parameter_checking(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_pollss_t_initialize;
-
- {
- const f_status_t status = f_pollss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_pollss_adjust__works(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_pollss_t_initialize;
-
- {
- const f_status_t status = f_pollss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__pollss_adjust
-#define _TEST__F_type_array__pollss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_pollss_adjust()
- */
-extern void test__f_type_array_pollss_adjust__parameter_checking(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_pollss_adjust()
- */
-extern void test__f_type_array_pollss_adjust__works(void **poll);
-
-#endif // _TEST__F_type_array__pollss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-pollss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_pollss_append__parameter_checking(void **poll) {
-
- f_polls_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_pollss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_pollss_append__returns_data_not(void **poll) {
-
- const int length = 5;
- f_polls_t source = f_polls_t_initialize;
- f_pollss_t destination = f_pollss_t_initialize;
-
- {
- const f_status_t status = f_polls_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_pollss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_pollss_append__works(void **poll) {
-
- const int length = 5;
- f_polls_t source = f_polls_t_initialize;
- f_pollss_t destination = f_pollss_t_initialize;
-
- const f_poll_t poll_data = macro_f_poll_t_initialize_1(0, 1, 2);
-
- {
- const f_status_t status = f_polls_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- while (source.used < length) {
- memcpy(&source.array[source.used++], (void *) &poll_data, sizeof(f_poll_t));
- } // while
-
- {
- const f_status_t status = f_pollss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
-
- assert_int_equal(destination.array[0].array[i].fd, source.array[0].fd);
- assert_int_equal(destination.array[0].array[i].events, source.array[0].events);
- assert_int_equal(destination.array[0].array[i].revents, source.array[0].revents);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__pollss_append
-#define _TEST__F_type_array__pollss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_pollss_append()
- */
-extern void test__f_type_array_pollss_append__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_pollss_append()
- */
-extern void test__f_type_array_pollss_append__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_pollss_append()
- */
-extern void test__f_type_array_pollss_append__works(void **poll);
-
-#endif // _TEST__F_type_array__pollss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-pollss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_pollss_append_all__parameter_checking(void **poll) {
-
- const f_pollss_t data = f_pollss_t_initialize;
-
- {
- const f_status_t status = f_pollss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_pollss_append_all__returns_data_not(void **poll) {
-
- const int length = 5;
- f_pollss_t source = f_pollss_t_initialize;
- f_pollss_t destination = f_pollss_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_pollss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_pollss_append_all__works(void **poll) {
-
- const int length = 5;
- const int length_inner = 2;
- f_pollss_t source = f_pollss_t_initialize;
- f_pollss_t destination = f_pollss_t_initialize;
-
- const f_poll_t poll_0 = { 0, 1, 2 };
- const f_poll_t poll_1 = { 0, 3, 4 };
-
- {
- const f_status_t status = f_pollss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_polls_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &poll_0, sizeof(f_poll_t));
- memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &poll_1, sizeof(f_poll_t));
- } // for
- }
-
- {
- const f_status_t status = f_pollss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
-
- assert_int_equal(destination.array[i].array[j].fd, source.array[i].array[j].fd);
- assert_int_equal(destination.array[i].array[j].events, source.array[i].array[j].events);
- assert_int_equal(destination.array[i].array[j].revents, source.array[i].array[j].revents);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__pollss_append_all
-#define _TEST__F_type_array__pollss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_pollss_append_all()
- */
-extern void test__f_type_array_pollss_append_all__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_pollss_append_all()
- */
-extern void test__f_type_array_pollss_append_all__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_pollss_append_all()
- */
-extern void test__f_type_array_pollss_append_all__works(void **poll);
-
-#endif // _TEST__F_type_array__pollss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-pollss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_pollss_decimate_by__parameter_checking(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_pollss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_pollss_decimate_by__returns_data_not(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_pollss_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_pollss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_pollss_decimate_by__works(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_pollss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__pollss_decimate_by
-#define _TEST__F_type_array__pollss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_pollss_decimate_by()
- */
-extern void test__f_type_array_pollss_decimate_by__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_pollss_decimate_by()
- */
-extern void test__f_type_array_pollss_decimate_by__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_pollss_decimate_by()
- */
-extern void test__f_type_array_pollss_decimate_by__works(void **poll);
-
-#endif // _TEST__F_type_array__pollss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-pollss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_pollss_decrease_by__parameter_checking(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_pollss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_pollss_decrease_by__returns_data_not(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_pollss_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_pollss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_pollss_decrease_by__works(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_pollss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__pollss_decrease_by
-#define _TEST__F_type_array__pollss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_pollss_decrease_by()
- */
-extern void test__f_type_array_pollss_decrease_by__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_pollss_decrease_by()
- */
-extern void test__f_type_array_pollss_decrease_by__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_pollss_decrease_by()
- */
-extern void test__f_type_array_pollss_decrease_by__works(void **poll);
-
-#endif // _TEST__F_type_array__pollss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-pollss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_pollss_increase__parameter_checking(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_pollss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_pollss_increase__returns_data_not(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_pollss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_pollss_increase__works(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_pollss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__pollss_increase
-#define _TEST__F_type_array__pollss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_pollss_increase()
- */
-extern void test__f_type_array_pollss_increase__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_pollss_increase()
- */
-extern void test__f_type_array_pollss_increase__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_pollss_increase()
- */
-extern void test__f_type_array_pollss_increase__works(void **poll);
-
-#endif // _TEST__F_type_array__pollss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-pollss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_pollss_increase_by__parameter_checking(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_pollss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_pollss_increase_by__returns_data_not(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_pollss_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_pollss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_pollss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_pollss_increase_by__works(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_polls_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_pollss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__pollss_increase_by
-#define _TEST__F_type_array__pollss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_pollss_increase_by()
- */
-extern void test__f_type_array_pollss_increase_by__parameter_checking(void **poll);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_pollss_increase_by()
- */
-extern void test__f_type_array_pollss_increase_by__returns_data_not(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_pollss_increase_by()
- */
-extern void test__f_type_array_pollss_increase_by__works(void **poll);
-
-#endif // _TEST__F_type_array__pollss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-pollss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_pollss_resize__parameter_checking(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_pollss_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_pollss_resize__works(void **poll) {
-
- const int length = 5;
- f_pollss_t data = f_pollss_t_initialize;
-
- {
- const f_status_t status = f_pollss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__pollss_resize
-#define _TEST__F_type_array__pollss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_pollss_resize()
- */
-extern void test__f_type_array_pollss_resize__parameter_checking(void **poll);
-
-/**
- * Test that the function works.
- *
- * @see f_pollss_resize()
- */
-extern void test__f_type_array_pollss_resize__works(void **poll);
-
-#endif // _TEST__F_type_array__pollss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-states_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_states_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_states_adjust__works(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__states_adjust
-#define _TEST__F_type_array__states_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_states_adjust()
- */
-extern void test__f_type_array_states_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_adjust()
- */
-extern void test__f_type_array_states_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__states_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-states_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_states_append__parameter_checking(void **state) {
-
- const f_state_t data = f_state_t_initialize;
-
- {
- const f_status_t status = f_states_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_states_append__works(void **state) {
-
- int fake_1 = 1;
- int fake_2 = 2;
- int fake_3 = 3;
-
- const f_state_t source = macro_f_state_t_initialize_1(12, 6, 0, 0, 0, 0, 0, (void *) &fake_1, (void *) &fake_2, (void *) &fake_3);
- f_states_t destination = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].step_large, source.step_large);
- assert_int_equal(destination.array[0].step_small, source.step_small);
- assert_int_equal(destination.array[0].handle, source.handle);
- assert_int_equal(destination.array[0].interrupt, source.interrupt);
- assert_int_equal(destination.array[0].callbacks, source.callbacks);
- assert_int_equal(destination.array[0].custom, source.custom);
- assert_int_equal(destination.array[0].data, source.data);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__states_append
-#define _TEST__F_type_array__states_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_states_append()
- */
-extern void test__f_type_array_states_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_append()
- */
-extern void test__f_type_array_states_append__works(void **state);
-
-#endif // _TEST__F_type_array__states_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-states_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_states_append_all__parameter_checking(void **state) {
-
- const f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_states_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_states_t source = f_states_t_initialize;
- f_states_t destination = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_states_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_states_append_all__works(void **state) {
-
- const int length = 5;
- f_states_t source = f_states_t_initialize;
- f_states_t destination = f_states_t_initialize;
-
- const f_state_t state_0 = { .step_large = 10, .step_small = 1, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
- const f_state_t state_1 = { .step_large = 20, .step_small = 2, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
-
- {
- const f_status_t status = f_states_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- memcpy(&source.array[source.used++], (void *) &state_0, sizeof(f_state_t));
- memcpy(&source.array[source.used++], (void *) &state_1, sizeof(f_state_t));
-
- {
- const f_status_t status = f_states_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- assert_int_equal(destination.array[0].step_large, state_0.step_large);
- assert_int_equal(destination.array[0].step_small, state_0.step_small);
- assert_null(destination.array[0].handle);
- assert_null(destination.array[0].interrupt);
- assert_null(destination.array[0].callbacks);
- assert_null(destination.array[0].custom);
- assert_null(destination.array[0].data);
-
- assert_int_equal(destination.array[1].step_large, state_1.step_large);
- assert_int_equal(destination.array[1].step_small, state_1.step_small);
- assert_null(destination.array[1].handle);
- assert_null(destination.array[1].interrupt);
- assert_null(destination.array[1].callbacks);
- assert_null(destination.array[1].custom);
- assert_null(destination.array[1].data);
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__states_append_all
-#define _TEST__F_type_array__states_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_states_append_all()
- */
-extern void test__f_type_array_states_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_states_append_all()
- */
-extern void test__f_type_array_states_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_append_all()
- */
-extern void test__f_type_array_states_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__states_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-states_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_states_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_states_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_states_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_states_decimate_by__works(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_states_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__states_decimate_by
-#define _TEST__F_type_array__states_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_states_decimate_by()
- */
-extern void test__f_type_array_states_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_states_decimate_by()
- */
-extern void test__f_type_array_states_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_decimate_by()
- */
-extern void test__f_type_array_states_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__states_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-states_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_states_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_states_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_states_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_states_decrease_by__works(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_states_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__states_decrease_by
-#define _TEST__F_type_array__states_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_states_decrease_by()
- */
-extern void test__f_type_array_states_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_states_decrease_by()
- */
-extern void test__f_type_array_states_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_decrease_by()
- */
-extern void test__f_type_array_states_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__states_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-states_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_states_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_states_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_states_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_states_increase__works(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_states_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__states_increase
-#define _TEST__F_type_array__states_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_states_increase()
- */
-extern void test__f_type_array_states_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_states_increase()
- */
-extern void test__f_type_array_states_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_increase()
- */
-extern void test__f_type_array_states_increase__works(void **state);
-
-#endif // _TEST__F_type_array__states_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-states_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_states_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_states_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_states_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_states_increase_by__works(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_states_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__states_increase_by
-#define _TEST__F_type_array__states_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_states_increase_by()
- */
-extern void test__f_type_array_states_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_states_increase_by()
- */
-extern void test__f_type_array_states_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_increase_by()
- */
-extern void test__f_type_array_states_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__states_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-states_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_states_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_states_resize__works(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__states_resize
-#define _TEST__F_type_array__states_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_states_resize()
- */
-extern void test__f_type_array_states_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_resize()
- */
-extern void test__f_type_array_states_resize__works(void **state);
-
-#endif // _TEST__F_type_array__states_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statess_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statess_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_statess_t data = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statess_adjust__works(void **state) {
-
- const int length = 5;
- f_statess_t data = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statess_adjust
-#define _TEST__F_type_array__statess_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statess_adjust()
- */
-extern void test__f_type_array_statess_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statess_adjust()
- */
-extern void test__f_type_array_statess_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__statess_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statess_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statess_append__parameter_checking(void **state) {
-
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_statess_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_states_t source = f_states_t_initialize;
- f_statess_t destination = f_statess_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_statess_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_statess_append__works(void **state) {
-
- const int length = 5;
- f_states_t source = f_states_t_initialize;
- f_statess_t destination = f_statess_t_initialize;
-
- int fake_1 = 1;
- int fake_2 = 2;
- int fake_3 = 3;
-
- const f_state_t state_data = macro_f_state_t_initialize_1(12, 6, 0, 0, 0, 0, 0, (void *) &fake_1, (void *) &fake_2, (void *) &fake_3);
-
- {
- const f_status_t status = f_states_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- while (source.used < length) {
- memcpy(&source.array[source.used++], (void *) &state_data, sizeof(f_state_t));
- } // while
-
- {
- const f_status_t status = f_statess_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
-
- assert_int_equal(destination.array[0].array[i].step_large, state_data.step_large);
- assert_int_equal(destination.array[0].array[i].step_small, state_data.step_small);
- assert_int_equal(destination.array[0].array[i].handle, state_data.handle);
- assert_int_equal(destination.array[0].array[i].interrupt, state_data.interrupt);
- assert_int_equal(destination.array[0].array[i].callbacks, state_data.callbacks);
- assert_int_equal(destination.array[0].array[i].custom, state_data.custom);
- assert_int_equal(destination.array[0].array[i].data, state_data.data);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statess_append
-#define _TEST__F_type_array__statess_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statess_append()
- */
-extern void test__f_type_array_statess_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statess_append()
- */
-extern void test__f_type_array_statess_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statess_append()
- */
-extern void test__f_type_array_statess_append__works(void **state);
-
-#endif // _TEST__F_type_array__statess_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statess_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statess_append_all__parameter_checking(void **state) {
-
- const f_statess_t data = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_statess_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_statess_t source = f_statess_t_initialize;
- f_statess_t destination = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_statess_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_statess_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_statess_t source = f_statess_t_initialize;
- f_statess_t destination = f_statess_t_initialize;
-
- const f_state_t state_0 = { .step_large = 10, .step_small = 1, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
- const f_state_t state_1 = { .step_large = 20, .step_small = 2, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
-
- {
- const f_status_t status = f_statess_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_states_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &state_0, sizeof(f_state_t));
- memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &state_1, sizeof(f_state_t));
- } // for
- }
-
- {
- const f_status_t status = f_statess_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- assert_int_equal(destination.array[i].array[0].step_large, state_0.step_large);
- assert_int_equal(destination.array[i].array[0].step_small, state_0.step_small);
- assert_null(destination.array[i].array[0].handle);
- assert_null(destination.array[i].array[0].interrupt);
- assert_null(destination.array[i].array[0].callbacks);
- assert_null(destination.array[i].array[0].custom);
- assert_null(destination.array[i].array[0].data);
-
- assert_int_equal(destination.array[i].array[1].step_large, state_1.step_large);
- assert_int_equal(destination.array[i].array[1].step_small, state_1.step_small);
- assert_null(destination.array[i].array[1].handle);
- assert_null(destination.array[i].array[1].interrupt);
- assert_null(destination.array[i].array[1].callbacks);
- assert_null(destination.array[i].array[1].custom);
- assert_null(destination.array[i].array[1].data);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statess_append_all
-#define _TEST__F_type_array__statess_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statess_append_all()
- */
-extern void test__f_type_array_statess_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statess_append_all()
- */
-extern void test__f_type_array_statess_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statess_append_all()
- */
-extern void test__f_type_array_statess_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__statess_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statess_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statess_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_statess_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statess_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_statess_t data = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statess_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statess_decimate_by__works(void **state) {
-
- const int length = 5;
- f_statess_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statess_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statess_decimate_by
-#define _TEST__F_type_array__statess_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statess_decimate_by()
- */
-extern void test__f_type_array_statess_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_statess_decimate_by()
- */
-extern void test__f_type_array_statess_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statess_decimate_by()
- */
-extern void test__f_type_array_statess_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__statess_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statess_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statess_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_statess_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statess_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_statess_t data = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statess_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statess_decrease_by__works(void **state) {
-
- const int length = 5;
- f_statess_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statess_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statess_decrease_by
-#define _TEST__F_type_array__statess_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statess_decrease_by()
- */
-extern void test__f_type_array_statess_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statess_decrease_by()
- */
-extern void test__f_type_array_statess_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statess_decrease_by()
- */
-extern void test__f_type_array_statess_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__statess_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statess_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statess_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_statess_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statess_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_statess_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statess_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statess_increase__works(void **state) {
-
- const int length = 5;
- f_statess_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_statess_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statess_increase
-#define _TEST__F_type_array__statess_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statess_increase()
- */
-extern void test__f_type_array_statess_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statess_increase()
- */
-extern void test__f_type_array_statess_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statess_increase()
- */
-extern void test__f_type_array_statess_increase__works(void **state);
-
-#endif // _TEST__F_type_array__statess_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statess_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statess_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_statess_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statess_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_statess_t data = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statess_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statess_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statess_increase_by__works(void **state) {
-
- const int length = 5;
- f_statess_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_statess_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statess_increase_by
-#define _TEST__F_type_array__statess_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statess_increase_by()
- */
-extern void test__f_type_array_statess_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statess_increase_by()
- */
-extern void test__f_type_array_statess_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statess_increase_by()
- */
-extern void test__f_type_array_statess_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__statess_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statess_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statess_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_statess_t data = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statess_resize__works(void **state) {
-
- const int length = 5;
- f_statess_t data = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statess_resize
-#define _TEST__F_type_array__statess_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statess_resize()
- */
-extern void test__f_type_array_statess_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statess_resize()
- */
-extern void test__f_type_array_statess_resize__works(void **state);
-
-#endif // _TEST__F_type_array__statess_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statuss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statuss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statuss_adjust__works(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statuss_adjust
-#define _TEST__F_type_array__statuss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statuss_adjust()
- */
-extern void test__f_type_array_statuss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_adjust()
- */
-extern void test__f_type_array_statuss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statuss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statuss_append__parameter_checking(void **state) {
-
- const f_status_t data = f_status_t_initialize;
-
- {
- const f_status_t status = f_statuss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_statuss_append__works(void **state) {
-
- const f_status_t source = 3;
- f_statuss_t destination = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statuss_append
-#define _TEST__F_type_array__statuss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statuss_append()
- */
-extern void test__f_type_array_statuss_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_append()
- */
-extern void test__f_type_array_statuss_append__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statuss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statuss_append_all__parameter_checking(void **state) {
-
- const f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_statuss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_statuss_t source = f_statuss_t_initialize;
- f_statuss_t destination = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_statuss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_statuss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_statuss_t source = f_statuss_t_initialize;
- f_statuss_t destination = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_statuss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statuss_append_all
-#define _TEST__F_type_array__statuss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statuss_append_all()
- */
-extern void test__f_type_array_statuss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statuss_append_all()
- */
-extern void test__f_type_array_statuss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_append_all()
- */
-extern void test__f_type_array_statuss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statuss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statuss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statuss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statuss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statuss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statuss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statuss_decimate_by
-#define _TEST__F_type_array__statuss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statuss_decimate_by()
- */
-extern void test__f_type_array_statuss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statuss_decimate_by()
- */
-extern void test__f_type_array_statuss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_decimate_by()
- */
-extern void test__f_type_array_statuss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statuss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statuss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statuss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statuss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statuss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statuss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statuss_decrease_by
-#define _TEST__F_type_array__statuss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statuss_decrease_by()
- */
-extern void test__f_type_array_statuss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statuss_decrease_by()
- */
-extern void test__f_type_array_statuss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_decrease_by()
- */
-extern void test__f_type_array_statuss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statuss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statuss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statuss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statuss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statuss_increase__works(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_statuss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statuss_increase
-#define _TEST__F_type_array__statuss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statuss_increase()
- */
-extern void test__f_type_array_statuss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statuss_increase()
- */
-extern void test__f_type_array_statuss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_increase()
- */
-extern void test__f_type_array_statuss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statuss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-void test__f_type_array_statuss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statuss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statuss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statuss_increase_by__works(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_statuss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statuss_increase_by
-#define _TEST__F_type_array__statuss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statuss_increase_by()
- */
-extern void test__f_type_array_statuss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statuss_increase_by()
- */
-extern void test__f_type_array_statuss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_increase_by()
- */
-extern void test__f_type_array_statuss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statuss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statuss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statuss_resize__works(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statuss_resize
-#define _TEST__F_type_array__statuss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statuss_resize()
- */
-extern void test__f_type_array_statuss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_resize()
- */
-extern void test__f_type_array_statuss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statusss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statusss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statusss_adjust__works(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statusss_adjust
-#define _TEST__F_type_array__statusss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statusss_adjust()
- */
-extern void test__f_type_array_statusss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statusss_adjust()
- */
-extern void test__f_type_array_statusss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__statusss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statusss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statusss_append__parameter_checking(void **state) {
-
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statusss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_statusss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_statuss_t source = f_statuss_t_initialize;
- f_statusss_t destination = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_statusss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_statusss_append__works(void **state) {
-
- const int length = 5;
- f_statuss_t source = f_statuss_t_initialize;
- f_statusss_t destination = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statuss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_statusss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statusss_append
-#define _TEST__F_type_array__statusss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statusss_append()
- */
-extern void test__f_type_array_statusss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statusss_append()
- */
-extern void test__f_type_array_statusss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statusss_append()
- */
-extern void test__f_type_array_statusss_append__works(void **state);
-
-#endif // _TEST__F_type_array__statusss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statusss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statusss_append_all__parameter_checking(void **state) {
-
- const f_statusss_t data = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_statusss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_statusss_t source = f_statusss_t_initialize;
- f_statusss_t destination = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_statusss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_statusss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_statusss_t source = f_statusss_t_initialize;
- f_statusss_t destination = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_statuss_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_statusss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statusss_append_all
-#define _TEST__F_type_array__statusss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statusss_append_all()
- */
-extern void test__f_type_array_statusss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statusss_append_all()
- */
-extern void test__f_type_array_statusss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statusss_append_all()
- */
-extern void test__f_type_array_statusss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__statusss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statusss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statusss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statusss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statusss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statusss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statusss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statusss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statusss_decimate_by
-#define _TEST__F_type_array__statusss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statusss_decimate_by()
- */
-extern void test__f_type_array_statusss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_statusss_decimate_by()
- */
-extern void test__f_type_array_statusss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statusss_decimate_by()
- */
-extern void test__f_type_array_statusss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__statusss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statusss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statusss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statusss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statusss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statusss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statusss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statusss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statusss_decrease_by
-#define _TEST__F_type_array__statusss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statusss_decrease_by()
- */
-extern void test__f_type_array_statusss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statusss_decrease_by()
- */
-extern void test__f_type_array_statusss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statusss_decrease_by()
- */
-extern void test__f_type_array_statusss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__statusss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statusss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statusss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statusss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statusss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statusss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statusss_increase__works(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_statusss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statusss_increase
-#define _TEST__F_type_array__statusss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statusss_increase()
- */
-extern void test__f_type_array_statusss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statusss_increase()
- */
-extern void test__f_type_array_statusss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statusss_increase()
- */
-extern void test__f_type_array_statusss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__statusss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statusss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statusss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statusss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statusss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statusss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statusss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_statusss_increase_by__works(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_statusss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statusss_increase_by
-#define _TEST__F_type_array__statusss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statusss_increase_by()
- */
-extern void test__f_type_array_statusss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_statusss_increase_by()
- */
-extern void test__f_type_array_statusss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statusss_increase_by()
- */
-extern void test__f_type_array_statusss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__statusss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-statusss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statusss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_statusss_resize__works(void **state) {
-
- const int length = 5;
- f_statusss_t data = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__statusss_resize
-#define _TEST__F_type_array__statusss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_statusss_resize()
- */
-extern void test__f_type_array_statusss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statusss_resize()
- */
-extern void test__f_type_array_statusss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__statusss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128s_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128s_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint128s_adjust__works(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128s_adjust
-#define _TEST__F_type_array__uint128s_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128s_adjust()
- */
-extern void test__f_type_array_uint128s_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_adjust()
- */
-extern void test__f_type_array_uint128s_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-uint128s_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint128s_adjust_callback__fails(void **state) {
+
+ f_uint128_t data = 0;
+ f_uint128_t data_array[] = { data };
+ f_uint128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint128s_t datass_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_uint128s_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_uint128s_adjust_callback__works(void **state) {
+
+ f_uint128_t data = 0;
+ f_uint128_t data_array[] = { data };
+ f_uint128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint128s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_uint128s_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__uint128s_adjust_callback
+#define _TEST__F_type_array__uint128s_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint128s_adjust_callback()
+ */
+extern void test__f_type_array_uint128s_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128s_adjust_callback()
+ */
+extern void test__f_type_array_uint128s_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint128s_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128s_append__parameter_checking(void **state) {
-
- const uint128_t data = 0;
-
- {
- const f_status_t status = f_uint128s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint128s_append__works(void **state) {
-
- const uint128_t source = 3;
- f_uint128s_t destination = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128s_append
-#define _TEST__F_type_array__uint128s_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128s_append()
- */
-extern void test__f_type_array_uint128s_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_append()
- */
-extern void test__f_type_array_uint128s_append__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128s_append_all__parameter_checking(void **state) {
-
- const f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint128s_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128s_t source = f_uint128s_t_initialize;
- f_uint128s_t destination = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint128s_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint128s_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_uint128s_t source = f_uint128s_t_initialize;
- f_uint128s_t destination = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_uint128s_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128s_append_all
-#define _TEST__F_type_array__uint128s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128s_append_all()
- */
-extern void test__f_type_array_uint128s_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128s_append_all()
- */
-extern void test__f_type_array_uint128s_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_append_all()
- */
-extern void test__f_type_array_uint128s_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128s_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint128s_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128s_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint128s_decimate_by__works(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128s_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128s_decimate_by
-#define _TEST__F_type_array__uint128s_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128s_decimate_by()
- */
-extern void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128s_decimate_by()
- */
-extern void test__f_type_array_uint128s_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_decimate_by()
- */
-extern void test__f_type_array_uint128s_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128s_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint128s_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128s_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint128s_decrease_by__works(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128s_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128s_decrease_by
-#define _TEST__F_type_array__uint128s_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128s_decrease_by()
- */
-extern void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128s_decrease_by()
- */
-extern void test__f_type_array_uint128s_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_decrease_by()
- */
-extern void test__f_type_array_uint128s_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128s_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128s_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint128s_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128s_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint128s_increase__works(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint128s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128s_increase
-#define _TEST__F_type_array__uint128s_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128s_increase()
- */
-extern void test__f_type_array_uint128s_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128s_increase()
- */
-extern void test__f_type_array_uint128s_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_increase()
- */
-extern void test__f_type_array_uint128s_increase__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128s_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint128s_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128s_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint128s_increase_by__works(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint128s_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128s_increase_by
-#define _TEST__F_type_array__uint128s_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128s_increase_by()
- */
-extern void test__f_type_array_uint128s_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128s_increase_by()
- */
-extern void test__f_type_array_uint128s_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_increase_by()
- */
-extern void test__f_type_array_uint128s_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128s_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128s_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint128s_resize__works(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128s_resize
-#define _TEST__F_type_array__uint128s_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128s_resize()
- */
-extern void test__f_type_array_uint128s_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_resize()
- */
-extern void test__f_type_array_uint128s_resize__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-uint128s_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint128s_resize_callback__fails(void **state) {
+
+ f_uint128_t data = 0;
+ f_uint128_t data_array[] = { data };
+ f_uint128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint128s_t datass_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_uint128s_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_uint128s_resize_callback__works(void **state) {
+
+ f_uint128_t data = 0;
+ f_uint128_t data_array[] = { data };
+ f_uint128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint128s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_uint128s_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__uint128s_resize_callback
+#define _TEST__F_type_array__uint128s_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint128s_resize_callback()
+ */
+extern void test__f_type_array_uint128s_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128s_resize_callback()
+ */
+extern void test__f_type_array_uint128s_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint128s_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128ss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128ss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint128ss_adjust__works(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128ss_adjust
-#define _TEST__F_type_array__uint128ss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128ss_adjust()
- */
-extern void test__f_type_array_uint128ss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128ss_increase_by()
- */
-extern void test__f_type_array_uint128ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128ss_adjust()
- */
-extern void test__f_type_array_uint128ss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__uint128ss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128ss_append__parameter_checking(void **state) {
-
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint128ss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128s_t source = f_uint128s_t_initialize;
- f_uint128ss_t destination = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint128ss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint128ss_append__works(void **state) {
-
- const int length = 5;
- f_uint128s_t source = f_uint128s_t_initialize;
- f_uint128ss_t destination = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_uint128ss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128ss_append
-#define _TEST__F_type_array__uint128ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128ss_append()
- */
-extern void test__f_type_array_uint128ss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128ss_append()
- */
-extern void test__f_type_array_uint128ss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128ss_append()
- */
-extern void test__f_type_array_uint128ss_append__works(void **state);
-
-#endif // _TEST__F_type_array__uint128ss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128ss_append_all__parameter_checking(void **state) {
-
- const f_uint128ss_t data = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint128ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128ss_t source = f_uint128ss_t_initialize;
- f_uint128ss_t destination = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint128ss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint128ss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_uint128ss_t source = f_uint128ss_t_initialize;
- f_uint128ss_t destination = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_uint128s_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_uint128ss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128ss_append_all
-#define _TEST__F_type_array__uint128ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128ss_append_all()
- */
-extern void test__f_type_array_uint128ss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128ss_append_all()
- */
-extern void test__f_type_array_uint128ss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128ss_append_all()
- */
-extern void test__f_type_array_uint128ss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__uint128ss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128ss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint128ss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128ss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint128ss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128ss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128ss_decimate_by
-#define _TEST__F_type_array__uint128ss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128ss_decimate_by()
- */
-extern void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_uint128ss_decimate_by()
- */
-extern void test__f_type_array_uint128ss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128ss_decimate_by()
- */
-extern void test__f_type_array_uint128ss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint128ss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128ss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint128ss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128ss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint128ss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128ss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128ss_decrease_by
-#define _TEST__F_type_array__uint128ss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128ss_decrease_by()
- */
-extern void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128ss_decrease_by()
- */
-extern void test__f_type_array_uint128ss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128ss_decrease_by()
- */
-extern void test__f_type_array_uint128ss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint128ss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128ss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128ss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint128ss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128ss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint128ss_increase__works(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint128ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128ss_increase
-#define _TEST__F_type_array__uint128ss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128ss_increase()
- */
-extern void test__f_type_array_uint128ss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128ss_increase()
- */
-extern void test__f_type_array_uint128ss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128ss_increase()
- */
-extern void test__f_type_array_uint128ss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__uint128ss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128ss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint128ss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128ss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128ss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint128ss_increase_by__works(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint128ss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128ss_increase_by
-#define _TEST__F_type_array__uint128ss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128ss_increase_by()
- */
-extern void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint128ss_increase_by()
- */
-extern void test__f_type_array_uint128ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128ss_increase_by()
- */
-extern void test__f_type_array_uint128ss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint128ss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint128ss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128ss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint128ss_resize__works(void **state) {
-
- const int length = 5;
- f_uint128ss_t data = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint128ss_resize
-#define _TEST__F_type_array__uint128ss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint128ss_resize()
- */
-extern void test__f_type_array_uint128ss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128ss_resize()
- */
-extern void test__f_type_array_uint128ss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__uint128ss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16s_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16s_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint16s_adjust__works(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16s_adjust
-#define _TEST__F_type_array__uint16s_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16s_adjust()
- */
-extern void test__f_type_array_uint16s_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_adjust()
- */
-extern void test__f_type_array_uint16s_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-uint16s_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint16s_adjust_callback__fails(void **state) {
+
+ uint16_t data = 0;
+ uint16_t data_array[] = { data };
+ f_uint16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint16s_t datass_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_uint16s_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_uint16s_adjust_callback__works(void **state) {
+
+ uint16_t data = 0;
+ uint16_t data_array[] = { data };
+ f_uint16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint16s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_uint16s_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__uint16s_adjust_callback
+#define _TEST__F_type_array__uint16s_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint16s_adjust_callback()
+ */
+extern void test__f_type_array_uint16s_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16s_adjust_callback()
+ */
+extern void test__f_type_array_uint16s_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint16s_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16s_append__parameter_checking(void **state) {
-
- const uint16_t data = 0;
-
- {
- const f_status_t status = f_uint16s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint16s_append__works(void **state) {
-
- const uint16_t source = 3;
- f_uint16s_t destination = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16s_append
-#define _TEST__F_type_array__uint16s_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16s_append()
- */
-extern void test__f_type_array_uint16s_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_append()
- */
-extern void test__f_type_array_uint16s_append__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16s_append_all__parameter_checking(void **state) {
-
- const f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint16s_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16s_t source = f_uint16s_t_initialize;
- f_uint16s_t destination = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint16s_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint16s_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_uint16s_t source = f_uint16s_t_initialize;
- f_uint16s_t destination = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_uint16s_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16s_append_all
-#define _TEST__F_type_array__uint16s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16s_append_all()
- */
-extern void test__f_type_array_uint16s_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint16s_append_all()
- */
-extern void test__f_type_array_uint16s_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_append_all()
- */
-extern void test__f_type_array_uint16s_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16s_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint16s_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16s_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint16s_decimate_by__works(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16s_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16s_decimate_by
-#define _TEST__F_type_array__uint16s_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16s_decimate_by()
- */
-extern void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint16s_decimate_by()
- */
-extern void test__f_type_array_uint16s_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_decimate_by()
- */
-extern void test__f_type_array_uint16s_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16s_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint16s_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16s_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint16s_decrease_by__works(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16s_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16s_decrease_by
-#define _TEST__F_type_array__uint16s_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16s_decrease_by()
- */
-extern void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint16s_decrease_by()
- */
-extern void test__f_type_array_uint16s_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_decrease_by()
- */
-extern void test__f_type_array_uint16s_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16s_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16s_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint16s_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16s_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint16s_increase__works(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint16s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16s_increase
-#define _TEST__F_type_array__uint16s_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16s_increase()
- */
-extern void test__f_type_array_uint16s_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint16s_increase()
- */
-extern void test__f_type_array_uint16s_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_increase()
- */
-extern void test__f_type_array_uint16s_increase__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16s_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint16s_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16s_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint16s_increase_by__works(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint16s_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16s_increase_by
-#define _TEST__F_type_array__uint16s_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16s_increase_by()
- */
-extern void test__f_type_array_uint16s_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint16s_increase_by()
- */
-extern void test__f_type_array_uint16s_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_increase_by()
- */
-extern void test__f_type_array_uint16s_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16s_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16s_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint16s_resize__works(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16s_resize
-#define _TEST__F_type_array__uint16s_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16s_resize()
- */
-extern void test__f_type_array_uint16s_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_resize()
- */
-extern void test__f_type_array_uint16s_resize__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-uint16s_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint16s_resize_callback__fails(void **state) {
+
+ uint16_t data = 0;
+ uint16_t data_array[] = { data };
+ f_uint16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint16s_t datass_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_uint16s_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_uint16s_resize_callback__works(void **state) {
+
+ uint16_t data = 0;
+ uint16_t data_array[] = { data };
+ f_uint16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint16s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_uint16s_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__uint16s_resize_callback
+#define _TEST__F_type_array__uint16s_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint16s_resize_callback()
+ */
+extern void test__f_type_array_uint16s_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16s_resize_callback()
+ */
+extern void test__f_type_array_uint16s_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint16s_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16ss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16ss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint16ss_adjust__works(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16ss_adjust
-#define _TEST__F_type_array__uint16ss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16ss_adjust()
- */
-extern void test__f_type_array_uint16ss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16ss_adjust()
- */
-extern void test__f_type_array_uint16ss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__uint16ss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16ss_append__parameter_checking(void **state) {
-
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint16ss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16s_t source = f_uint16s_t_initialize;
- f_uint16ss_t destination = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint16ss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint16ss_append__works(void **state) {
-
- const int length = 5;
- f_uint16s_t source = f_uint16s_t_initialize;
- f_uint16ss_t destination = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_uint16ss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16ss_append
-#define _TEST__F_type_array__uint16ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16ss_append()
- */
-extern void test__f_type_array_uint16ss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint16ss_append()
- */
-extern void test__f_type_array_uint16ss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16ss_append()
- */
-extern void test__f_type_array_uint16ss_append__works(void **state);
-
-#endif // _TEST__F_type_array__uint16ss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16ss_append_all__parameter_checking(void **state) {
-
- const f_uint16ss_t data = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint16ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16ss_t source = f_uint16ss_t_initialize;
- f_uint16ss_t destination = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint16ss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint16ss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_uint16ss_t source = f_uint16ss_t_initialize;
- f_uint16ss_t destination = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_uint16s_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_uint16ss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16ss_append_all
-#define _TEST__F_type_array__uint16ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16ss_append_all()
- */
-extern void test__f_type_array_uint16ss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint16ss_append_all()
- */
-extern void test__f_type_array_uint16ss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16ss_append_all()
- */
-extern void test__f_type_array_uint16ss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__uint16ss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16ss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint16ss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16ss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint16ss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16ss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16ss_decimate_by
-#define _TEST__F_type_array__uint16ss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16ss_decimate_by()
- */
-extern void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_uint16ss_decimate_by()
- */
-extern void test__f_type_array_uint16ss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16ss_decimate_by()
- */
-extern void test__f_type_array_uint16ss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint16ss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16ss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint16ss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16ss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint16ss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16ss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16ss_decrease_by
-#define _TEST__F_type_array__uint16ss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16ss_decrease_by()
- */
-extern void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint16ss_decrease_by()
- */
-extern void test__f_type_array_uint16ss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16ss_decrease_by()
- */
-extern void test__f_type_array_uint16ss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint16ss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16ss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16ss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint16ss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16ss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint16ss_increase__works(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint16ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16ss_increase
-#define _TEST__F_type_array__uint16ss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16ss_increase()
- */
-extern void test__f_type_array_uint16ss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint16ss_increase()
- */
-extern void test__f_type_array_uint16ss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16ss_increase()
- */
-extern void test__f_type_array_uint16ss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__uint16ss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16ss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint16ss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16ss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16ss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint16ss_increase_by__works(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint16ss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16ss_increase_by
-#define _TEST__F_type_array__uint16ss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16ss_increase_by()
- */
-extern void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint16ss_increase_by()
- */
-extern void test__f_type_array_uint16ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16ss_increase_by()
- */
-extern void test__f_type_array_uint16ss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint16ss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint16ss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16ss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint16ss_resize__works(void **state) {
-
- const int length = 5;
- f_uint16ss_t data = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint16ss_resize
-#define _TEST__F_type_array__uint16ss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint16ss_resize()
- */
-extern void test__f_type_array_uint16ss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16ss_resize()
- */
-extern void test__f_type_array_uint16ss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__uint16ss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32s_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32s_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint32s_adjust__works(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32s_adjust
-#define _TEST__F_type_array__uint32s_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32s_adjust()
- */
-extern void test__f_type_array_uint32s_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_adjust()
- */
-extern void test__f_type_array_uint32s_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-uint32s_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint32s_adjust_callback__fails(void **state) {
+
+ uint32_t data = 0;
+ uint32_t data_array[] = { data };
+ f_uint32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint32s_t datass_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_uint32s_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_uint32s_adjust_callback__works(void **state) {
+
+ uint32_t data = 0;
+ uint32_t data_array[] = { data };
+ f_uint32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint32s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_uint32s_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__uint32s_adjust_callback
+#define _TEST__F_type_array__uint32s_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint32s_adjust_callback()
+ */
+extern void test__f_type_array_uint32s_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32s_adjust_callback()
+ */
+extern void test__f_type_array_uint32s_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint32s_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32s_append__parameter_checking(void **state) {
-
- const uint32_t data = 0;
-
- {
- const f_status_t status = f_uint32s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint32s_append__works(void **state) {
-
- const uint32_t source = 3;
- f_uint32s_t destination = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32s_append
-#define _TEST__F_type_array__uint32s_append
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32s_append()
- */
-extern void test__f_type_array_uint32s_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_append()
- */
-extern void test__f_type_array_uint32s_append__works(void **state);
-
-
-#endif // _TEST__F_type_array__uint32s_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32s_append_all__parameter_checking(void **state) {
-
- const f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint32s_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32s_t source = f_uint32s_t_initialize;
- f_uint32s_t destination = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint32s_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint32s_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_uint32s_t source = f_uint32s_t_initialize;
- f_uint32s_t destination = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_uint32s_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32s_append_all
-#define _TEST__F_type_array__uint32s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32s_append_all()
- */
-extern void test__f_type_array_uint32s_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint32s_append_all()
- */
-extern void test__f_type_array_uint32s_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_append_all()
- */
-extern void test__f_type_array_uint32s_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32s_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint32s_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32s_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint32s_decimate_by__works(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32s_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32s_decimate_by
-#define _TEST__F_type_array__uint32s_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32s_decimate_by()
- */
-extern void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint32s_decimate_by()
- */
-extern void test__f_type_array_uint32s_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_decimate_by()
- */
-extern void test__f_type_array_uint32s_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32s_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint32s_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32s_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint32s_decrease_by__works(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32s_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32s_decrease_by
-#define _TEST__F_type_array__uint32s_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32s_decrease_by()
- */
-extern void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint32s_decrease_by()
- */
-extern void test__f_type_array_uint32s_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_decrease_by()
- */
-extern void test__f_type_array_uint32s_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32s_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32s_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint32s_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32s_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint32s_increase__works(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint32s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32s_increase
-#define _TEST__F_type_array__uint32s_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32s_increase()
- */
-extern void test__f_type_array_uint32s_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint32s_increase()
- */
-extern void test__f_type_array_uint32s_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_increase()
- */
-extern void test__f_type_array_uint32s_increase__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32s_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint32s_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32s_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint32s_increase_by__works(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint32s_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32s_increase_by
-#define _TEST__F_type_array__uint32s_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32s_increase_by()
- */
-extern void test__f_type_array_uint32s_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint32s_increase_by()
- */
-extern void test__f_type_array_uint32s_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_increase_by()
- */
-extern void test__f_type_array_uint32s_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32s_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32s_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint32s_resize__works(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32s_resize
-#define _TEST__F_type_array__uint32s_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32s_resize()
- */
-extern void test__f_type_array_uint32s_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_resize()
- */
-extern void test__f_type_array_uint32s_resize__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-uint32s_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint32s_resize_callback__fails(void **state) {
+
+ uint32_t data = 0;
+ uint32_t data_array[] = { data };
+ f_uint32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint32s_t datass_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_uint32s_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_uint32s_resize_callback__works(void **state) {
+
+ uint32_t data = 0;
+ uint32_t data_array[] = { data };
+ f_uint32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint32s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_uint32s_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__uint32s_resize_callback
+#define _TEST__F_type_array__uint32s_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint32s_resize_callback()
+ */
+extern void test__f_type_array_uint32s_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32s_resize_callback()
+ */
+extern void test__f_type_array_uint32s_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint32s_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32ss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32ss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint32ss_adjust__works(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32ss_adjust
-#define _TEST__F_type_array__uint32ss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32ss_adjust()
- */
-extern void test__f_type_array_uint32ss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32ss_adjust()
- */
-extern void test__f_type_array_uint32ss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__uint32ss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32ss_append__parameter_checking(void **state) {
-
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint32ss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32s_t source = f_uint32s_t_initialize;
- f_uint32ss_t destination = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint32ss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint32ss_append__works(void **state) {
-
- const int length = 5;
- f_uint32s_t source = f_uint32s_t_initialize;
- f_uint32ss_t destination = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_uint32ss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32ss_append
-#define _TEST__F_type_array__uint32ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32ss_append()
- */
-extern void test__f_type_array_uint32ss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint32ss_append()
- */
-extern void test__f_type_array_uint32ss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32ss_append()
- */
-extern void test__f_type_array_uint32ss_append__works(void **state);
-
-#endif // _TEST__F_type_array__uint32ss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32ss_append_all__parameter_checking(void **state) {
-
- const f_uint32ss_t data = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint32ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32ss_t source = f_uint32ss_t_initialize;
- f_uint32ss_t destination = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint32ss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint32ss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_uint32ss_t source = f_uint32ss_t_initialize;
- f_uint32ss_t destination = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_uint32s_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_uint32ss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32ss_append_all
-#define _TEST__F_type_array__uint32ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32ss_append_all()
- */
-extern void test__f_type_array_uint32ss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint32ss_append_all()
- */
-extern void test__f_type_array_uint32ss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32ss_append_all()
- */
-extern void test__f_type_array_uint32ss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__uint32ss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32ss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint32ss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32ss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint32ss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32ss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32ss_decimate_by
-#define _TEST__F_type_array__uint32ss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32ss_decimate_by()
- */
-extern void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_uint32ss_decimate_by()
- */
-extern void test__f_type_array_uint32ss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32ss_decimate_by()
- */
-extern void test__f_type_array_uint32ss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint32ss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32ss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint32ss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32ss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint32ss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32ss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32ss_decrease_by
-#define _TEST__F_type_array__uint32ss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32ss_decrease_by()
- */
-extern void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint32ss_decrease_by()
- */
-extern void test__f_type_array_uint32ss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32ss_decrease_by()
- */
-extern void test__f_type_array_uint32ss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint32ss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32ss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32ss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint32ss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32ss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint32ss_increase__works(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint32ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32ss_increase
-#define _TEST__F_type_array__uint32ss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32ss_increase()
- */
-extern void test__f_type_array_uint32ss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint32ss_increase()
- */
-extern void test__f_type_array_uint32ss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32ss_increase()
- */
-extern void test__f_type_array_uint32ss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__uint32ss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32ss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint32ss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32ss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32ss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint32ss_increase_by__works(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint32ss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32ss_increase_by
-#define _TEST__F_type_array__uint32ss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32ss_increase_by()
- */
-extern void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint32ss_increase_by()
- */
-extern void test__f_type_array_uint32ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32ss_increase_by()
- */
-extern void test__f_type_array_uint32ss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint32ss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint32ss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32ss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint32ss_resize__works(void **state) {
-
- const int length = 5;
- f_uint32ss_t data = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint32ss_resize
-#define _TEST__F_type_array__uint32ss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint32ss_resize()
- */
-extern void test__f_type_array_uint32ss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32ss_resize()
- */
-extern void test__f_type_array_uint32ss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__uint32ss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64s_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64s_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint64s_adjust__works(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64s_adjust
-#define _TEST__F_type_array__uint64s_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64s_adjust()
- */
-extern void test__f_type_array_uint64s_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_adjust()
- */
-extern void test__f_type_array_uint64s_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-uint64s_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint64s_adjust_callback__fails(void **state) {
+
+ uint64_t data = 0;
+ uint64_t data_array[] = { data };
+ f_uint64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint64s_t datass_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_uint64s_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_uint64s_adjust_callback__works(void **state) {
+
+ uint64_t data = 0;
+ uint64_t data_array[] = { data };
+ f_uint64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint64s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_uint64s_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__uint64s_adjust_callback
+#define _TEST__F_type_array__uint64s_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint64s_adjust_callback()
+ */
+extern void test__f_type_array_uint64s_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64s_adjust_callback()
+ */
+extern void test__f_type_array_uint64s_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint64s_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64s_append__parameter_checking(void **state) {
-
- const uint64_t data = 0;
-
- {
- const f_status_t status = f_uint64s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint64s_append__works(void **state) {
-
- const uint64_t source = 3;
- f_uint64s_t destination = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64s_append
-#define _TEST__F_type_array__uint64s_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64s_append()
- */
-extern void test__f_type_array_uint64s_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_append()
- */
-extern void test__f_type_array_uint64s_append__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64s_append_all__parameter_checking(void **state) {
-
- const f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint64s_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64s_t source = f_uint64s_t_initialize;
- f_uint64s_t destination = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint64s_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint64s_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_uint64s_t source = f_uint64s_t_initialize;
- f_uint64s_t destination = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_uint64s_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64s_append_all
-#define _TEST__F_type_array__uint64s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64s_append_all()
- */
-extern void test__f_type_array_uint64s_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint64s_append_all()
- */
-extern void test__f_type_array_uint64s_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_append_all()
- */
-extern void test__f_type_array_uint64s_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64s_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint64s_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64s_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint64s_decimate_by__works(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64s_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64s_decimate_by
-#define _TEST__F_type_array__uint64s_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64s_decimate_by()
- */
-extern void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint64s_decimate_by()
- */
-extern void test__f_type_array_uint64s_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_decimate_by()
- */
-extern void test__f_type_array_uint64s_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64s_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint64s_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64s_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint64s_decrease_by__works(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64s_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64s_decrease_by
-#define _TEST__F_type_array__uint64s_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64s_decrease_by()
- */
-extern void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint64s_decrease_by()
- */
-extern void test__f_type_array_uint64s_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_decrease_by()
- */
-extern void test__f_type_array_uint64s_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64s_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64s_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint64s_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64s_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint64s_increase__works(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint64s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64s_increase
-#define _TEST__F_type_array__uint64s_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64s_increase()
- */
-extern void test__f_type_array_uint64s_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint64s_increase()
- */
-extern void test__f_type_array_uint64s_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_increase()
- */
-extern void test__f_type_array_uint64s_increase__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64s_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint64s_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64s_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint64s_increase_by__works(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint64s_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64s_increase_by
-#define _TEST__F_type_array__uint64s_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64s_increase_by()
- */
-extern void test__f_type_array_uint64s_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint64s_increase_by()
- */
-extern void test__f_type_array_uint64s_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_increase_by()
- */
-extern void test__f_type_array_uint64s_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64s_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64s_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint64s_resize__works(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64s_resize
-#define _TEST__F_type_array__uint64s_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64s_resize()
- */
-extern void test__f_type_array_uint64s_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_resize()
- */
-extern void test__f_type_array_uint64s_resize__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-uint64s_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint64s_resize_callback__fails(void **state) {
+
+ uint64_t data = 0;
+ uint64_t data_array[] = { data };
+ f_uint64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint64s_t datass_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_uint64s_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_uint64s_resize_callback__works(void **state) {
+
+ uint64_t data = 0;
+ uint64_t data_array[] = { data };
+ f_uint64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint64s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_uint64s_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__uint64s_resize_callback
+#define _TEST__F_type_array__uint64s_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint64s_resize_callback()
+ */
+extern void test__f_type_array_uint64s_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64s_resize_callback()
+ */
+extern void test__f_type_array_uint64s_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint64s_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64ss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64ss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint64ss_adjust__works(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64ss_adjust
-#define _TEST__F_type_array__uint64ss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64ss_adjust()
- */
-extern void test__f_type_array_uint64ss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64ss_adjust()
- */
-extern void test__f_type_array_uint64ss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__uint64ss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64ss_append__parameter_checking(void **state) {
-
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint64ss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64s_t source = f_uint64s_t_initialize;
- f_uint64ss_t destination = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint64ss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint64ss_append__works(void **state) {
-
- const int length = 5;
- f_uint64s_t source = f_uint64s_t_initialize;
- f_uint64ss_t destination = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_uint64ss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64ss_append
-#define _TEST__F_type_array__uint64ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64ss_append()
- */
-extern void test__f_type_array_uint64ss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint64ss_append()
- */
-extern void test__f_type_array_uint64ss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64ss_append()
- */
-extern void test__f_type_array_uint64ss_append__works(void **state);
-
-#endif // _TEST__F_type_array__uint64ss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64ss_append_all__parameter_checking(void **state) {
-
- const f_uint64ss_t data = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint64ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64ss_t source = f_uint64ss_t_initialize;
- f_uint64ss_t destination = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint64ss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint64ss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_uint64ss_t source = f_uint64ss_t_initialize;
- f_uint64ss_t destination = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_uint64s_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_uint64ss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64ss_append_all
-#define _TEST__F_type_array__uint64ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64ss_append_all()
- */
-extern void test__f_type_array_uint64ss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint64ss_append_all()
- */
-extern void test__f_type_array_uint64ss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64ss_append_all()
- */
-extern void test__f_type_array_uint64ss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__uint64ss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64ss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint64ss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64ss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint64ss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64ss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64ss_decimate_by
-#define _TEST__F_type_array__uint64ss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64ss_decimate_by()
- */
-extern void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_uint64ss_decimate_by()
- */
-extern void test__f_type_array_uint64ss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64ss_decimate_by()
- */
-extern void test__f_type_array_uint64ss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint64ss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64ss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint64ss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64ss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint64ss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64ss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64ss_decrease_by
-#define _TEST__F_type_array__uint64ss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64ss_decrease_by()
- */
-extern void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint64ss_decrease_by()
- */
-extern void test__f_type_array_uint64ss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64ss_decrease_by()
- */
-extern void test__f_type_array_uint64ss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint64ss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64ss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64ss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint64ss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64ss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint64ss_increase__works(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint64ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64ss_increase
-#define _TEST__F_type_array__uint64ss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64ss_increase()
- */
-extern void test__f_type_array_uint64ss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint64ss_increase()
- */
-extern void test__f_type_array_uint64ss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64ss_increase()
- */
-extern void test__f_type_array_uint64ss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__uint64ss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64ss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint64ss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64ss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64ss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint64ss_increase_by__works(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint64ss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64ss_increase_by
-#define _TEST__F_type_array__uint64ss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64ss_increase_by()
- */
-extern void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint64ss_increase_by()
- */
-extern void test__f_type_array_uint64ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64ss_increase_by()
- */
-extern void test__f_type_array_uint64ss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint64ss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint64ss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64ss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint64ss_resize__works(void **state) {
-
- const int length = 5;
- f_uint64ss_t data = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint64ss_resize
-#define _TEST__F_type_array__uint64ss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint64ss_resize()
- */
-extern void test__f_type_array_uint64ss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64ss_resize()
- */
-extern void test__f_type_array_uint64ss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__uint64ss_resize
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8s_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8s_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint8s_adjust__works(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8s_adjust
-#define _TEST__F_type_array__uint8s_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8s_adjust()
- */
-extern void test__f_type_array_uint8s_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_adjust()
- */
-extern void test__f_type_array_uint8s_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_adjust
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-uint8s_adjust_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint8s_adjust_callback__fails(void **state) {
+
+ uint8_t data = 0;
+ uint8_t data_array[] = { data };
+ f_uint8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint8s_t datass_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_uint8s_adjust_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_uint8s_adjust_callback__works(void **state) {
+
+ uint8_t data = 0;
+ uint8_t data_array[] = { data };
+ f_uint8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint8s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_none);
+
+ const f_status_t status = f_uint8s_adjust_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__uint8s_adjust_callback
+#define _TEST__F_type_array__uint8s_adjust_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint8s_adjust_callback()
+ */
+extern void test__f_type_array_uint8s_adjust_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8s_adjust_callback()
+ */
+extern void test__f_type_array_uint8s_adjust_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint8s_adjust_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8s_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8s_append__parameter_checking(void **state) {
-
- const uint8_t data = 0;
-
- {
- const f_status_t status = f_uint8s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint8s_append__works(void **state) {
-
- const uint8_t source = 3;
- f_uint8s_t destination = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0], source);
- }
-
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8s_append
-#define _TEST__F_type_array__uint8s_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8s_append()
- */
-extern void test__f_type_array_uint8s_append__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_append()
- */
-extern void test__f_type_array_uint8s_append__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8s_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8s_append_all__parameter_checking(void **state) {
-
- const f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint8s_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8s_t source = f_uint8s_t_initialize;
- f_uint8s_t destination = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint8s_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint8s_append_all__works(void **state) {
-
- const int length = 5;
- const int length_used = 2;
- f_uint8s_t source = f_uint8s_t_initialize;
- f_uint8s_t destination = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_uint8s_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
- }
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8s_append_all
-#define _TEST__F_type_array__uint8s_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8s_append_all()
- */
-extern void test__f_type_array_uint8s_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint8s_append_all()
- */
-extern void test__f_type_array_uint8s_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_append_all()
- */
-extern void test__f_type_array_uint8s_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8s_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint8s_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8s_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint8s_decimate_by__works(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8s_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8s_decimate_by
-#define _TEST__F_type_array__uint8s_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8s_decimate_by()
- */
-extern void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint8s_decimate_by()
- */
-extern void test__f_type_array_uint8s_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_decimate_by()
- */
-extern void test__f_type_array_uint8s_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8s_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint8s_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8s_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint8s_decrease_by__works(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8s_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8s_decrease_by
-#define _TEST__F_type_array__uint8s_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8s_decrease_by()
- */
-extern void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint8s_decrease_by()
- */
-extern void test__f_type_array_uint8s_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_decrease_by()
- */
-extern void test__f_type_array_uint8s_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8s_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8s_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint8s_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8s_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint8s_increase__works(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint8s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8s_increase
-#define _TEST__F_type_array__uint8s_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8s_increase()
- */
-extern void test__f_type_array_uint8s_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint8s_increase()
- */
-extern void test__f_type_array_uint8s_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_increase()
- */
-extern void test__f_type_array_uint8s_increase__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8s_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-void test__f_type_array_uint8s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint8s_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8s_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint8s_increase_by__works(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint8s_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8s_increase_by
-#define _TEST__F_type_array__uint8s_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8s_increase_by()
- */
-extern void test__f_type_array_uint8s_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint8s_increase_by()
- */
-extern void test__f_type_array_uint8s_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_increase_by()
- */
-extern void test__f_type_array_uint8s_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8s_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8s_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint8s_resize__works(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8s_resize
-#define _TEST__F_type_array__uint8s_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8s_resize()
- */
-extern void test__f_type_array_uint8s_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_resize()
- */
-extern void test__f_type_array_uint8s_resize__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_resize
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-uint8s_resize_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint8s_resize_callback__fails(void **state) {
+
+ uint8_t data = 0;
+ uint8_t data_array[] = { data };
+ f_uint8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint8s_t datass_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_uint8s_resize_callback(0, 1, (void *) datass_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_uint8s_resize_callback__works(void **state) {
+
+ uint8_t data = 0;
+ uint8_t data_array[] = { data };
+ f_uint8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_uint8s_t datass_array[] = { datas };
+ const f_number_unsigned_t length = 1;
+
+ {
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_none);
+
+ const f_status_t status = f_uint8s_resize_callback(0, length, (void *) datass_array);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * 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__uint8s_resize_callback
+#define _TEST__F_type_array__uint8s_resize_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint8s_resize_callback()
+ */
+extern void test__f_type_array_uint8s_resize_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8s_resize_callback()
+ */
+extern void test__f_type_array_uint8s_resize_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint8s_resize_callback
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8ss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8ss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint8ss_adjust__works(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_adjust(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8ss_adjust
-#define _TEST__F_type_array__uint8ss_adjust
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8ss_adjust()
- */
-extern void test__f_type_array_uint8ss_adjust__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8ss_adjust()
- */
-extern void test__f_type_array_uint8ss_adjust__works(void **state);
-
-#endif // _TEST__F_type_array__uint8ss_adjust
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8ss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8ss_append__parameter_checking(void **state) {
-
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint8ss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8s_t source = f_uint8s_t_initialize;
- f_uint8ss_t destination = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint8ss_append(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint8ss_append__works(void **state) {
-
- const int length = 5;
- f_uint8s_t source = f_uint8s_t_initialize;
- f_uint8ss_t destination = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8s_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
- {
- const f_status_t status = f_uint8ss_append(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8ss_append
-#define _TEST__F_type_array__uint8ss_append
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8ss_append()
- */
-extern void test__f_type_array_uint8ss_append__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint8ss_append()
- */
-extern void test__f_type_array_uint8ss_append__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8ss_append()
- */
-extern void test__f_type_array_uint8ss_append__works(void **state);
-
-#endif // _TEST__F_type_array__uint8ss_append
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8ss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8ss_append_all__parameter_checking(void **state) {
-
- const f_uint8ss_t data = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
-void test__f_type_array_uint8ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8ss_t source = f_uint8ss_t_initialize;
- f_uint8ss_t destination = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint8ss_append_all(source, &destination);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(destination.used, 0);
- assert_int_equal(destination.size, 0);
- assert_null(destination.array);
- }
-
- free((void *) source.array);
-}
-
-void test__f_type_array_uint8ss_append_all__works(void **state) {
-
- const int length = 5;
- const int length_inner = 2;
- f_uint8ss_t source = f_uint8ss_t_initialize;
- f_uint8ss_t destination = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- for (; source.used < length; ++source.used) {
-
- const f_status_t status = f_uint8s_resize(length_inner, &source.array[source.used]);
-
- assert_int_equal(status, F_none);
-
- for (f_number_unsigned_t i = 0; i < length_inner; ++i) {
- source.array[source.used].array[source.array[source.used].used++] = i + 1;
- } // for
- } // for
- }
-
- {
- const f_status_t status = f_uint8ss_append_all(source, &destination);
-
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-
- assert_int_equal(destination.array[i].used, length_inner);
- assert_int_equal(destination.array[i].size, length_inner);
-
- for (f_number_unsigned_t j = 0; j < length_inner; ++j) {
- assert_int_equal(destination.array[i].array[j], j + 1);
- } // for
- } // for
- }
-
- for (f_number_unsigned_t i = 0; i < source.used; ++i) {
- free((void *) source.array[i].array);
- } // for
-
- for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
- free((void *) source.array);
- free((void *) destination.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8ss_append_all
-#define _TEST__F_type_array__uint8ss_append_all
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8ss_append_all()
- */
-extern void test__f_type_array_uint8ss_append_all__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint8ss_append_all()
- */
-extern void test__f_type_array_uint8ss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8ss_append_all()
- */
-extern void test__f_type_array_uint8ss_append_all__works(void **state);
-
-#endif // _TEST__F_type_array__uint8ss_append_all
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8ss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint8ss_decimate_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8ss_decimate_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint8ss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8ss_decimate_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8ss_decimate_by
-#define _TEST__F_type_array__uint8ss_decimate_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8ss_decimate_by()
- */
-extern void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_type_array_uint8ss_decimate_by()
- */
-extern void test__f_type_array_uint8ss_decimate_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8ss_decimate_by()
- */
-extern void test__f_type_array_uint8ss_decimate_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint8ss_decimate_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8ss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint8ss_decrease_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8ss_decrease_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint8ss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8ss_decrease_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8ss_decrease_by
-#define _TEST__F_type_array__uint8ss_decrease_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8ss_decrease_by()
- */
-extern void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint8ss_decrease_by()
- */
-extern void test__f_type_array_uint8ss_decrease_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8ss_decrease_by()
- */
-extern void test__f_type_array_uint8ss_decrease_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint8ss_decrease_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8ss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8ss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint8ss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8ss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint8ss_increase__works(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint8ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8ss_increase
-#define _TEST__F_type_array__uint8ss_increase
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8ss_increase()
- */
-extern void test__f_type_array_uint8ss_increase__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint8ss_increase()
- */
-extern void test__f_type_array_uint8ss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8ss_increase()
- */
-extern void test__f_type_array_uint8ss_increase__works(void **state);
-
-#endif // _TEST__F_type_array__uint8ss_increase
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8ss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint8ss_increase_by__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8ss_increase_by(0, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8ss_increase_by(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_type_array_uint8ss_increase_by__works(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint8ss_increase_by(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8ss_increase_by
-#define _TEST__F_type_array__uint8ss_increase_by
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8ss_increase_by()
- */
-extern void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state);
-
-/**
- * Test that the function returns F_data_not.
- *
- * @see f_uint8ss_increase_by()
- */
-extern void test__f_type_array_uint8ss_increase_by__returns_data_not(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8ss_increase_by()
- */
-extern void test__f_type_array_uint8ss_increase_by__works(void **state);
-
-#endif // _TEST__F_type_array__uint8ss_increase_by
+++ /dev/null
-#include "test-type_array.h"
-#include "test-type_array-uint8ss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8ss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_type_array_uint8ss_resize__works(void **state) {
-
- const int length = 5;
- f_uint8ss_t data = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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__uint8ss_resize
-#define _TEST__F_type_array__uint8ss_resize
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_uint8ss_resize()
- */
-extern void test__f_type_array_uint8ss_resize__parameter_checking(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8ss_resize()
- */
-extern void test__f_type_array_uint8ss_resize__works(void **state);
-
-#endif // _TEST__F_type_array__uint8ss_resize
int main(void) {
const struct CMUnitTest tests[] = {
- cmocka_unit_test(test__f_type_array_cells_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_cells_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_cells_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_cells_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_cells_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_cells_adjust__works),
- cmocka_unit_test(test__f_type_array_cells_append__works),
- cmocka_unit_test(test__f_type_array_cells_append_all__works),
- cmocka_unit_test(test__f_type_array_cells_decimate_by__works),
- cmocka_unit_test(test__f_type_array_cells_decrease_by__works),
- cmocka_unit_test(test__f_type_array_cells_increase__works),
- cmocka_unit_test(test__f_type_array_cells_increase_by__works),
- cmocka_unit_test(test__f_type_array_cells_resize__works),
-
- cmocka_unit_test(test__f_type_array_cellss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_cellss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_cellss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_cellss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_cellss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_cellss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_cellss_adjust__works),
- cmocka_unit_test(test__f_type_array_cellss_append__works),
- cmocka_unit_test(test__f_type_array_cellss_append_all__works),
- cmocka_unit_test(test__f_type_array_cellss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_cellss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_cellss_increase__works),
- cmocka_unit_test(test__f_type_array_cellss_increase_by__works),
- cmocka_unit_test(test__f_type_array_cellss_resize__works),
-
- cmocka_unit_test(test__f_type_array_files_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_files_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_files_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_files_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_files_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_files_adjust__works),
- cmocka_unit_test(test__f_type_array_files_append__works),
- cmocka_unit_test(test__f_type_array_files_append_all__works),
- cmocka_unit_test(test__f_type_array_files_decimate_by__works),
- cmocka_unit_test(test__f_type_array_files_decrease_by__works),
- cmocka_unit_test(test__f_type_array_files_increase__works),
- cmocka_unit_test(test__f_type_array_files_increase_by__works),
- cmocka_unit_test(test__f_type_array_files_resize__works),
-
- cmocka_unit_test(test__f_type_array_filess_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_filess_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_filess_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_filess_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_filess_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_filess_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_filess_adjust__works),
- cmocka_unit_test(test__f_type_array_filess_append__works),
- cmocka_unit_test(test__f_type_array_filess_append_all__works),
- cmocka_unit_test(test__f_type_array_filess_decimate_by__works),
- cmocka_unit_test(test__f_type_array_filess_decrease_by__works),
- cmocka_unit_test(test__f_type_array_filess_increase__works),
- cmocka_unit_test(test__f_type_array_filess_increase_by__works),
- cmocka_unit_test(test__f_type_array_filess_resize__works),
-
- cmocka_unit_test(test__f_type_array_fll_ids_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_fll_ids_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_fll_ids_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_fll_ids_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_fll_ids_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_fll_ids_adjust__works),
- cmocka_unit_test(test__f_type_array_fll_ids_append__works),
- cmocka_unit_test(test__f_type_array_fll_ids_append_all__works),
- cmocka_unit_test(test__f_type_array_fll_ids_decimate_by__works),
- cmocka_unit_test(test__f_type_array_fll_ids_decrease_by__works),
- cmocka_unit_test(test__f_type_array_fll_ids_increase__works),
- cmocka_unit_test(test__f_type_array_fll_ids_increase_by__works),
- cmocka_unit_test(test__f_type_array_fll_ids_resize__works),
-
- cmocka_unit_test(test__f_type_array_fll_idss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_fll_idss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_fll_idss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_fll_idss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_fll_idss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_fll_idss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_fll_idss_adjust__works),
- cmocka_unit_test(test__f_type_array_fll_idss_append__works),
- cmocka_unit_test(test__f_type_array_fll_idss_append_all__works),
- cmocka_unit_test(test__f_type_array_fll_idss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_fll_idss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_fll_idss_increase__works),
- cmocka_unit_test(test__f_type_array_fll_idss_increase_by__works),
- cmocka_unit_test(test__f_type_array_fll_idss_resize__works),
-
- cmocka_unit_test(test__f_type_array_int8s_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_int8s_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int8s_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int8s_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_int8s_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_int8s_adjust__works),
- cmocka_unit_test(test__f_type_array_int8s_append__works),
- cmocka_unit_test(test__f_type_array_int8s_append_all__works),
- cmocka_unit_test(test__f_type_array_int8s_decimate_by__works),
- cmocka_unit_test(test__f_type_array_int8s_decrease_by__works),
- cmocka_unit_test(test__f_type_array_int8s_increase__works),
- cmocka_unit_test(test__f_type_array_int8s_increase_by__works),
- cmocka_unit_test(test__f_type_array_int8s_resize__works),
-
- cmocka_unit_test(test__f_type_array_int8ss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_int8ss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_int8ss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int8ss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int8ss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_int8ss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_int8ss_adjust__works),
- cmocka_unit_test(test__f_type_array_int8ss_append__works),
- cmocka_unit_test(test__f_type_array_int8ss_append_all__works),
- cmocka_unit_test(test__f_type_array_int8ss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_int8ss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_int8ss_increase__works),
- cmocka_unit_test(test__f_type_array_int8ss_increase_by__works),
- cmocka_unit_test(test__f_type_array_int8ss_resize__works),
-
- cmocka_unit_test(test__f_type_array_int16s_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_int16s_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int16s_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int16s_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_int16s_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_int16s_adjust__works),
- cmocka_unit_test(test__f_type_array_int16s_append__works),
- cmocka_unit_test(test__f_type_array_int16s_append_all__works),
- cmocka_unit_test(test__f_type_array_int16s_decimate_by__works),
- cmocka_unit_test(test__f_type_array_int16s_decrease_by__works),
- cmocka_unit_test(test__f_type_array_int16s_increase__works),
- cmocka_unit_test(test__f_type_array_int16s_increase_by__works),
- cmocka_unit_test(test__f_type_array_int16s_resize__works),
-
- cmocka_unit_test(test__f_type_array_int16ss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_int16ss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_int16ss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int16ss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int16ss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_int16ss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_int16ss_adjust__works),
- cmocka_unit_test(test__f_type_array_int16ss_append__works),
- cmocka_unit_test(test__f_type_array_int16ss_append_all__works),
- cmocka_unit_test(test__f_type_array_int16ss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_int16ss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_int16ss_increase__works),
- cmocka_unit_test(test__f_type_array_int16ss_increase_by__works),
- cmocka_unit_test(test__f_type_array_int16ss_resize__works),
-
- cmocka_unit_test(test__f_type_array_int32s_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_int32s_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int32s_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int32s_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_int32s_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_int32s_adjust__works),
- cmocka_unit_test(test__f_type_array_int32s_append__works),
- cmocka_unit_test(test__f_type_array_int32s_append_all__works),
- cmocka_unit_test(test__f_type_array_int32s_decimate_by__works),
- cmocka_unit_test(test__f_type_array_int32s_decrease_by__works),
- cmocka_unit_test(test__f_type_array_int32s_increase__works),
- cmocka_unit_test(test__f_type_array_int32s_increase_by__works),
- cmocka_unit_test(test__f_type_array_int32s_resize__works),
-
- cmocka_unit_test(test__f_type_array_int32ss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_int32ss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_int32ss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int32ss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int32ss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_int32ss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_int32ss_adjust__works),
- cmocka_unit_test(test__f_type_array_int32ss_append__works),
- cmocka_unit_test(test__f_type_array_int32ss_append_all__works),
- cmocka_unit_test(test__f_type_array_int32ss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_int32ss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_int32ss_increase__works),
- cmocka_unit_test(test__f_type_array_int32ss_increase_by__works),
- cmocka_unit_test(test__f_type_array_int32ss_resize__works),
-
- cmocka_unit_test(test__f_type_array_int64s_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_int64s_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int64s_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int64s_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_int64s_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_int64s_adjust__works),
- cmocka_unit_test(test__f_type_array_int64s_append__works),
- cmocka_unit_test(test__f_type_array_int64s_append_all__works),
- cmocka_unit_test(test__f_type_array_int64s_decimate_by__works),
- cmocka_unit_test(test__f_type_array_int64s_decrease_by__works),
- cmocka_unit_test(test__f_type_array_int64s_increase__works),
- cmocka_unit_test(test__f_type_array_int64s_increase_by__works),
- cmocka_unit_test(test__f_type_array_int64s_resize__works),
-
- cmocka_unit_test(test__f_type_array_int64ss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_int64ss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_int64ss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int64ss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int64ss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_int64ss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_int64ss_adjust__works),
- cmocka_unit_test(test__f_type_array_int64ss_append__works),
- cmocka_unit_test(test__f_type_array_int64ss_append_all__works),
- cmocka_unit_test(test__f_type_array_int64ss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_int64ss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_int64ss_increase__works),
- cmocka_unit_test(test__f_type_array_int64ss_increase_by__works),
- cmocka_unit_test(test__f_type_array_int64ss_resize__works),
-
- cmocka_unit_test(test__f_type_array_int128s_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_int128s_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int128s_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int128s_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_int128s_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_int128s_adjust__works),
- cmocka_unit_test(test__f_type_array_int128s_append__works),
- cmocka_unit_test(test__f_type_array_int128s_append_all__works),
- cmocka_unit_test(test__f_type_array_int128s_decimate_by__works),
- cmocka_unit_test(test__f_type_array_int128s_decrease_by__works),
- cmocka_unit_test(test__f_type_array_int128s_increase__works),
- cmocka_unit_test(test__f_type_array_int128s_increase_by__works),
- cmocka_unit_test(test__f_type_array_int128s_resize__works),
-
- cmocka_unit_test(test__f_type_array_int128ss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_int128ss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_int128ss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int128ss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_int128ss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_int128ss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_number_unsigneds_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_number_unsigneds_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_number_unsigneds_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_number_unsigneds_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_number_unsigneds_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_number_unsigneds_adjust__works),
- cmocka_unit_test(test__f_type_array_number_unsigneds_append__works),
- cmocka_unit_test(test__f_type_array_number_unsigneds_append_all__works),
- cmocka_unit_test(test__f_type_array_number_unsigneds_decimate_by__works),
- cmocka_unit_test(test__f_type_array_number_unsigneds_decrease_by__works),
- cmocka_unit_test(test__f_type_array_number_unsigneds_increase__works),
- cmocka_unit_test(test__f_type_array_number_unsigneds_increase_by__works),
- cmocka_unit_test(test__f_type_array_number_unsigneds_resize__works),
-
- cmocka_unit_test(test__f_type_array_number_unsignedss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_number_unsignedss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_number_unsignedss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_number_unsignedss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_number_unsignedss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_number_unsignedss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_number_unsignedss_adjust__works),
- cmocka_unit_test(test__f_type_array_number_unsignedss_append__works),
- cmocka_unit_test(test__f_type_array_number_unsignedss_append_all__works),
- cmocka_unit_test(test__f_type_array_number_unsignedss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_number_unsignedss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_number_unsignedss_increase__works),
- cmocka_unit_test(test__f_type_array_number_unsignedss_increase_by__works),
- cmocka_unit_test(test__f_type_array_number_unsignedss_resize__works),
-
- cmocka_unit_test(test__f_type_array_int128ss_adjust__works),
- cmocka_unit_test(test__f_type_array_int128ss_append__works),
- cmocka_unit_test(test__f_type_array_int128ss_append_all__works),
- cmocka_unit_test(test__f_type_array_int128ss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_int128ss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_int128ss_increase__works),
- cmocka_unit_test(test__f_type_array_int128ss_increase_by__works),
- cmocka_unit_test(test__f_type_array_int128ss_resize__works),
-
- cmocka_unit_test(test__f_type_array_polls_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_polls_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_polls_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_polls_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_polls_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_polls_adjust__works),
- cmocka_unit_test(test__f_type_array_polls_append__works),
- cmocka_unit_test(test__f_type_array_polls_append_all__works),
- cmocka_unit_test(test__f_type_array_polls_decimate_by__works),
- cmocka_unit_test(test__f_type_array_polls_decrease_by__works),
- cmocka_unit_test(test__f_type_array_polls_increase__works),
- cmocka_unit_test(test__f_type_array_polls_increase_by__works),
- cmocka_unit_test(test__f_type_array_polls_resize__works),
-
- cmocka_unit_test(test__f_type_array_pollss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_pollss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_pollss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_pollss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_pollss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_pollss_adjust__works),
- cmocka_unit_test(test__f_type_array_pollss_append__works),
- cmocka_unit_test(test__f_type_array_pollss_append_all__works),
- cmocka_unit_test(test__f_type_array_pollss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_pollss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_pollss_increase__works),
- cmocka_unit_test(test__f_type_array_pollss_increase_by__works),
- cmocka_unit_test(test__f_type_array_pollss_resize__works),
-
- cmocka_unit_test(test__f_type_array_states_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_states_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_states_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_states_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_states_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_states_adjust__works),
- cmocka_unit_test(test__f_type_array_states_append__works),
- cmocka_unit_test(test__f_type_array_states_append_all__works),
- cmocka_unit_test(test__f_type_array_states_decimate_by__works),
- cmocka_unit_test(test__f_type_array_states_decrease_by__works),
- cmocka_unit_test(test__f_type_array_states_increase__works),
- cmocka_unit_test(test__f_type_array_states_increase_by__works),
- cmocka_unit_test(test__f_type_array_states_resize__works),
-
- cmocka_unit_test(test__f_type_array_statess_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_statess_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_statess_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_statess_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_statess_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_statess_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_statess_adjust__works),
- cmocka_unit_test(test__f_type_array_statess_append__works),
- cmocka_unit_test(test__f_type_array_statess_append_all__works),
- cmocka_unit_test(test__f_type_array_statess_decimate_by__works),
- cmocka_unit_test(test__f_type_array_statess_decrease_by__works),
- cmocka_unit_test(test__f_type_array_statess_increase__works),
- cmocka_unit_test(test__f_type_array_statess_increase_by__works),
- cmocka_unit_test(test__f_type_array_statess_resize__works),
-
- cmocka_unit_test(test__f_type_array_statuss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_statuss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_statuss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_statuss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_statuss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_statuss_adjust__works),
- cmocka_unit_test(test__f_type_array_statuss_append__works),
- cmocka_unit_test(test__f_type_array_statuss_append_all__works),
- cmocka_unit_test(test__f_type_array_statuss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_statuss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_statuss_increase__works),
- cmocka_unit_test(test__f_type_array_statuss_increase_by__works),
- cmocka_unit_test(test__f_type_array_statuss_resize__works),
-
- cmocka_unit_test(test__f_type_array_statusss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_statusss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_statusss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_statusss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_statusss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_statusss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_statusss_adjust__works),
- cmocka_unit_test(test__f_type_array_statusss_append__works),
- cmocka_unit_test(test__f_type_array_statusss_append_all__works),
- cmocka_unit_test(test__f_type_array_statusss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_statusss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_statusss_increase__works),
- cmocka_unit_test(test__f_type_array_statusss_increase_by__works),
- cmocka_unit_test(test__f_type_array_statusss_resize__works),
-
- cmocka_unit_test(test__f_type_array_uint8s_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint8s_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint8s_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint8s_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint8s_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_uint8s_adjust__works),
- cmocka_unit_test(test__f_type_array_uint8s_append__works),
- cmocka_unit_test(test__f_type_array_uint8s_append_all__works),
- cmocka_unit_test(test__f_type_array_uint8s_decimate_by__works),
- cmocka_unit_test(test__f_type_array_uint8s_decrease_by__works),
- cmocka_unit_test(test__f_type_array_uint8s_increase__works),
- cmocka_unit_test(test__f_type_array_uint8s_increase_by__works),
- cmocka_unit_test(test__f_type_array_uint8s_resize__works),
-
- cmocka_unit_test(test__f_type_array_uint8ss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint8ss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint8ss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint8ss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint8ss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint8ss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_uint8ss_adjust__works),
- cmocka_unit_test(test__f_type_array_uint8ss_append__works),
- cmocka_unit_test(test__f_type_array_uint8ss_append_all__works),
- cmocka_unit_test(test__f_type_array_uint8ss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_uint8ss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_uint8ss_increase__works),
- cmocka_unit_test(test__f_type_array_uint8ss_increase_by__works),
- cmocka_unit_test(test__f_type_array_uint8ss_resize__works),
-
- cmocka_unit_test(test__f_type_array_uint16s_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint16s_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint16s_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint16s_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint16s_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_uint16s_adjust__works),
- cmocka_unit_test(test__f_type_array_uint16s_append__works),
- cmocka_unit_test(test__f_type_array_uint16s_append_all__works),
- cmocka_unit_test(test__f_type_array_uint16s_decimate_by__works),
- cmocka_unit_test(test__f_type_array_uint16s_decrease_by__works),
- cmocka_unit_test(test__f_type_array_uint16s_increase__works),
- cmocka_unit_test(test__f_type_array_uint16s_increase_by__works),
- cmocka_unit_test(test__f_type_array_uint16s_resize__works),
-
- cmocka_unit_test(test__f_type_array_uint16ss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint16ss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint16ss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint16ss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint16ss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint16ss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_uint16ss_adjust__works),
- cmocka_unit_test(test__f_type_array_uint16ss_append__works),
- cmocka_unit_test(test__f_type_array_uint16ss_append_all__works),
- cmocka_unit_test(test__f_type_array_uint16ss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_uint16ss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_uint16ss_increase__works),
- cmocka_unit_test(test__f_type_array_uint16ss_increase_by__works),
- cmocka_unit_test(test__f_type_array_uint16ss_resize__works),
-
- cmocka_unit_test(test__f_type_array_uint32s_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint32s_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint32s_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint32s_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint32s_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_uint32s_adjust__works),
- cmocka_unit_test(test__f_type_array_uint32s_append__works),
- cmocka_unit_test(test__f_type_array_uint32s_append_all__works),
- cmocka_unit_test(test__f_type_array_uint32s_decimate_by__works),
- cmocka_unit_test(test__f_type_array_uint32s_decrease_by__works),
- cmocka_unit_test(test__f_type_array_uint32s_increase__works),
- cmocka_unit_test(test__f_type_array_uint32s_increase_by__works),
- cmocka_unit_test(test__f_type_array_uint32s_resize__works),
-
- cmocka_unit_test(test__f_type_array_uint32ss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint32ss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint32ss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint32ss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint32ss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint32ss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_uint32ss_adjust__works),
- cmocka_unit_test(test__f_type_array_uint32ss_append__works),
- cmocka_unit_test(test__f_type_array_uint32ss_append_all__works),
- cmocka_unit_test(test__f_type_array_uint32ss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_uint32ss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_uint32ss_increase__works),
- cmocka_unit_test(test__f_type_array_uint32ss_increase_by__works),
- cmocka_unit_test(test__f_type_array_uint32ss_resize__works),
-
- cmocka_unit_test(test__f_type_array_uint64s_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint64s_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint64s_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint64s_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint64s_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_uint64s_adjust__works),
- cmocka_unit_test(test__f_type_array_uint64s_append__works),
- cmocka_unit_test(test__f_type_array_uint64s_append_all__works),
- cmocka_unit_test(test__f_type_array_uint64s_decimate_by__works),
- cmocka_unit_test(test__f_type_array_uint64s_decrease_by__works),
- cmocka_unit_test(test__f_type_array_uint64s_increase__works),
- cmocka_unit_test(test__f_type_array_uint64s_increase_by__works),
- cmocka_unit_test(test__f_type_array_uint64s_resize__works),
-
- cmocka_unit_test(test__f_type_array_uint64ss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint64ss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint64ss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint64ss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint64ss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint64ss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_uint64ss_adjust__works),
- cmocka_unit_test(test__f_type_array_uint64ss_append__works),
- cmocka_unit_test(test__f_type_array_uint64ss_append_all__works),
- cmocka_unit_test(test__f_type_array_uint64ss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_uint64ss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_uint64ss_increase__works),
- cmocka_unit_test(test__f_type_array_uint64ss_increase_by__works),
- cmocka_unit_test(test__f_type_array_uint64ss_resize__works),
-
- cmocka_unit_test(test__f_type_array_uint128s_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint128s_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint128s_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint128s_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint128s_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_uint128s_adjust__works),
- cmocka_unit_test(test__f_type_array_uint128s_append__works),
- cmocka_unit_test(test__f_type_array_uint128s_append_all__works),
- cmocka_unit_test(test__f_type_array_uint128s_decimate_by__works),
- cmocka_unit_test(test__f_type_array_uint128s_decrease_by__works),
- cmocka_unit_test(test__f_type_array_uint128s_increase__works),
- cmocka_unit_test(test__f_type_array_uint128s_increase_by__works),
- cmocka_unit_test(test__f_type_array_uint128s_resize__works),
-
- cmocka_unit_test(test__f_type_array_uint128ss_append__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint128ss_append_all__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint128ss_decimate_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint128ss_decrease_by__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint128ss_increase__returns_data_not),
- cmocka_unit_test(test__f_type_array_uint128ss_increase_by__returns_data_not),
-
- cmocka_unit_test(test__f_type_array_uint128ss_adjust__works),
- cmocka_unit_test(test__f_type_array_uint128ss_append__works),
- cmocka_unit_test(test__f_type_array_uint128ss_append_all__works),
- cmocka_unit_test(test__f_type_array_uint128ss_decimate_by__works),
- cmocka_unit_test(test__f_type_array_uint128ss_decrease_by__works),
- cmocka_unit_test(test__f_type_array_uint128ss_increase__works),
- cmocka_unit_test(test__f_type_array_uint128ss_increase_by__works),
- cmocka_unit_test(test__f_type_array_uint128ss_resize__works),
+ cmocka_unit_test(test__f_type_array_cells_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_cells_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_files_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_files_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_fll_ids_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_fll_ids_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_int8s_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_int8s_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_int16s_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_int16s_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_int32s_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_int32s_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_int64s_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_int64s_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_int128s_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_int128s_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_number_unsigneds_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_number_unsigneds_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_uint8s_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint8s_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_uint16s_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint16s_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_uint32s_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint32s_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_uint64s_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint64s_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_uint128s_adjust_callback__fails),
+ cmocka_unit_test(test__f_type_array_uint128s_resize_callback__fails),
+
+ cmocka_unit_test(test__f_type_array_cells_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_cells_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_files_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_files_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_fll_ids_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_fll_ids_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_int8s_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_int8s_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_int16s_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_int16s_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_int32s_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_int32s_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_int64s_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_int64s_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_int128s_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_int128s_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_number_unsigneds_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_number_unsigneds_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_uint8s_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_uint8s_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_uint16s_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_uint16s_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_uint32s_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_uint32s_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_uint64s_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_uint64s_resize_callback__works),
+
+ cmocka_unit_test(test__f_type_array_uint128s_adjust_callback__works),
+ cmocka_unit_test(test__f_type_array_uint128s_resize_callback__works),
#ifndef _di_level_0_parameter_checking_
- cmocka_unit_test(test__f_type_array_number_unsigneds_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsigneds_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsigneds_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsigneds_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsigneds_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsigneds_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsigneds_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsigneds_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_number_unsignedss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsignedss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsignedss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsignedss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsignedss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsignedss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsignedss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_number_unsignedss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_cells_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_cells_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_cells_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_cells_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_cells_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_cells_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_cells_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_cells_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_cellss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_cellss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_cellss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_cellss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_cellss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_cellss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_cellss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_cellss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_files_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_files_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_files_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_files_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_files_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_files_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_files_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_files_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_filess_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_filess_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_filess_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_filess_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_filess_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_filess_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_filess_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_filess_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_fll_ids_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_ids_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_ids_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_ids_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_ids_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_ids_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_ids_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_ids_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_fll_idss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_idss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_idss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_idss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_idss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_idss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_idss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_fll_idss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_int8s_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8s_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8s_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8s_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8s_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8s_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8s_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8s_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_int8ss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8ss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8ss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8ss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8ss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8ss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8ss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int8ss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_int16s_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16s_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16s_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16s_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16s_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16s_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16s_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16s_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_int16ss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16ss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16ss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16ss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16ss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16ss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16ss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int16ss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_int32s_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32s_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32s_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32s_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32s_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32s_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32s_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32s_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_int32ss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32ss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32ss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32ss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32ss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32ss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32ss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int32ss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_int64s_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64s_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64s_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64s_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64s_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64s_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64s_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64s_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_int64ss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64ss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64ss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64ss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64ss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64ss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64ss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int64ss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_int128s_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128s_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128s_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128s_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128s_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128s_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128s_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128s_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_int128ss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128ss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128ss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128ss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128ss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128ss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128ss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_int128ss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_polls_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_polls_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_polls_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_polls_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_polls_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_polls_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_polls_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_polls_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_pollss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_pollss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_pollss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_pollss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_pollss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_pollss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_pollss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_pollss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_states_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_states_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_states_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_states_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_states_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_states_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_states_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_states_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_statess_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_statess_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_statess_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_statess_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_statess_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_statess_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_statess_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_statess_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_statuss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_statuss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_statuss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_statuss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_statuss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_statuss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_statuss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_statuss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_statusss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_statusss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_statusss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_statusss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_statusss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_statusss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_statusss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_statusss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_uint8s_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8s_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8s_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8s_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8s_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8s_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8s_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8s_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_uint8ss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8ss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8ss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8ss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8ss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8ss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8ss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint8ss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_uint16s_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16s_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16s_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16s_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16s_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16s_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16s_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16s_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_uint16ss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16ss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16ss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16ss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16ss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16ss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16ss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint16ss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_uint32s_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32s_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32s_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32s_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32s_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32s_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32s_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32s_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_uint32ss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32ss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32ss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32ss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32ss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32ss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32ss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint32ss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_uint64s_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64s_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64s_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64s_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64s_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64s_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64s_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64s_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_uint64ss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64ss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64ss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64ss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64ss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64ss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64ss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint64ss_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_uint128s_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128s_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128s_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128s_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128s_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128s_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128s_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128s_resize__parameter_checking),
-
- cmocka_unit_test(test__f_type_array_uint128ss_adjust__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128ss_append__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128ss_append_all__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128ss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128ss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128ss_increase__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128ss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_type_array_uint128ss_resize__parameter_checking),
+ // f_cells_adjust_callback() doesn't use parameter checking.
+ // f_cells_resize_callback() doesn't use parameter checking.
+
+ // f_files_adjust_callback() doesn't use parameter checking.
+ // f_files_resize_callback() doesn't use parameter checking.
+
+ // f_fll_ids_adjust_callback() doesn't use parameter checking.
+ // f_fll_ids_resize_callback() doesn't use parameter checking.
+
+ // f_int8s_adjust_callback() doesn't use parameter checking.
+ // f_int8s_resize_callback() doesn't use parameter checking.
+
+ // f_int16s_adjust_callback() doesn't use parameter checking.
+ // f_int16s_resize_callback() doesn't use parameter checking.
+
+ // f_int32s_adjust_callback() doesn't use parameter checking.
+ // f_int32s_resize_callback() doesn't use parameter checking.
+
+ // f_int64s_adjust_callback() doesn't use parameter checking.
+ // f_int64s_resize_callback() doesn't use parameter checking.
+
+ // f_int128s_adjust_callback() doesn't use parameter checking.
+ // f_int128s_resize_callback() doesn't use parameter checking.
+
+ // f_number_unsigneds_adjust_callback() doesn't use parameter checking.
+ // f_number_unsigneds_resize_callback() doesn't use parameter checking.
+
+ // f_uint8s_adjust_callback() doesn't use parameter checking.
+ // f_uint8s_resize_callback() doesn't use parameter checking.
+
+ // f_uint16s_adjust_callback() doesn't use parameter checking.
+ // f_uint16s_resize_callback() doesn't use parameter checking.
+
+ // f_uint32s_adjust_callback() doesn't use parameter checking.
+ // f_uint32s_resize_callback() doesn't use parameter checking.
+
+ // f_uint64s_adjust_callback() doesn't use parameter checking.
+ // f_uint64s_resize_callback() doesn't use parameter checking.
+
+ // f_uint128s_adjust_callback() doesn't use parameter checking.
+ // f_uint128s_resize_callback() doesn't use parameter checking.
#endif // _di_level_0_parameter_checking_
};
#include <fll/level_0/type_array_file.h>
// Test includes.
-#include "test-type_array-cells_adjust.h"
-#include "test-type_array-cells_append.h"
-#include "test-type_array-cells_append_all.h"
-#include "test-type_array-cells_decimate_by.h"
-#include "test-type_array-cells_decrease_by.h"
-#include "test-type_array-cells_increase.h"
-#include "test-type_array-cells_increase_by.h"
-#include "test-type_array-cells_resize.h"
-#include "test-type_array-cellss_adjust.h"
-#include "test-type_array-cellss_append.h"
-#include "test-type_array-cellss_append_all.h"
-#include "test-type_array-cellss_decimate_by.h"
-#include "test-type_array-cellss_decrease_by.h"
-#include "test-type_array-cellss_increase.h"
-#include "test-type_array-cellss_increase_by.h"
-#include "test-type_array-cellss_resize.h"
-#include "test-type_array-files_adjust.h"
-#include "test-type_array-files_append.h"
-#include "test-type_array-files_append_all.h"
-#include "test-type_array-files_decimate_by.h"
-#include "test-type_array-files_decrease_by.h"
-#include "test-type_array-files_increase.h"
-#include "test-type_array-files_increase_by.h"
-#include "test-type_array-files_resize.h"
-#include "test-type_array-filess_adjust.h"
-#include "test-type_array-filess_append.h"
-#include "test-type_array-filess_append_all.h"
-#include "test-type_array-filess_decimate_by.h"
-#include "test-type_array-filess_decrease_by.h"
-#include "test-type_array-filess_increase.h"
-#include "test-type_array-filess_increase_by.h"
-#include "test-type_array-filess_resize.h"
-#include "test-type_array-fll_ids_adjust.h"
-#include "test-type_array-fll_ids_append.h"
-#include "test-type_array-fll_ids_append_all.h"
-#include "test-type_array-fll_ids_decimate_by.h"
-#include "test-type_array-fll_ids_decrease_by.h"
-#include "test-type_array-fll_ids_increase.h"
-#include "test-type_array-fll_ids_increase_by.h"
-#include "test-type_array-fll_ids_resize.h"
-#include "test-type_array-fll_idss_adjust.h"
-#include "test-type_array-fll_idss_append.h"
-#include "test-type_array-fll_idss_append_all.h"
-#include "test-type_array-fll_idss_decimate_by.h"
-#include "test-type_array-fll_idss_decrease_by.h"
-#include "test-type_array-fll_idss_increase.h"
-#include "test-type_array-fll_idss_increase_by.h"
-#include "test-type_array-fll_idss_resize.h"
-#include "test-type_array-int8s_adjust.h"
-#include "test-type_array-int8s_append.h"
-#include "test-type_array-int8s_append_all.h"
-#include "test-type_array-int8s_decimate_by.h"
-#include "test-type_array-int8s_decrease_by.h"
-#include "test-type_array-int8s_increase.h"
-#include "test-type_array-int8s_increase_by.h"
-#include "test-type_array-int8s_resize.h"
-#include "test-type_array-int8ss_adjust.h"
-#include "test-type_array-int8ss_append.h"
-#include "test-type_array-int8ss_append_all.h"
-#include "test-type_array-int8ss_decimate_by.h"
-#include "test-type_array-int8ss_decrease_by.h"
-#include "test-type_array-int8ss_increase.h"
-#include "test-type_array-int8ss_increase_by.h"
-#include "test-type_array-int8ss_resize.h"
-#include "test-type_array-int16s_adjust.h"
-#include "test-type_array-int16s_append.h"
-#include "test-type_array-int16s_append_all.h"
-#include "test-type_array-int16s_decimate_by.h"
-#include "test-type_array-int16s_decrease_by.h"
-#include "test-type_array-int16s_increase.h"
-#include "test-type_array-int16s_increase_by.h"
-#include "test-type_array-int16s_resize.h"
-#include "test-type_array-int16ss_adjust.h"
-#include "test-type_array-int16ss_append.h"
-#include "test-type_array-int16ss_append_all.h"
-#include "test-type_array-int16ss_decimate_by.h"
-#include "test-type_array-int16ss_decrease_by.h"
-#include "test-type_array-int16ss_increase.h"
-#include "test-type_array-int16ss_increase_by.h"
-#include "test-type_array-int16ss_resize.h"
-#include "test-type_array-int32s_adjust.h"
-#include "test-type_array-int32s_append.h"
-#include "test-type_array-int32s_append_all.h"
-#include "test-type_array-int32s_decimate_by.h"
-#include "test-type_array-int32s_decrease_by.h"
-#include "test-type_array-int32s_increase.h"
-#include "test-type_array-int32s_increase_by.h"
-#include "test-type_array-int32s_resize.h"
-#include "test-type_array-int32ss_adjust.h"
-#include "test-type_array-int32ss_append.h"
-#include "test-type_array-int32ss_append_all.h"
-#include "test-type_array-int32ss_decimate_by.h"
-#include "test-type_array-int32ss_decrease_by.h"
-#include "test-type_array-int32ss_increase.h"
-#include "test-type_array-int32ss_increase_by.h"
-#include "test-type_array-int32ss_resize.h"
-#include "test-type_array-int64s_adjust.h"
-#include "test-type_array-int64s_append.h"
-#include "test-type_array-int64s_append_all.h"
-#include "test-type_array-int64s_decimate_by.h"
-#include "test-type_array-int64s_decrease_by.h"
-#include "test-type_array-int64s_increase.h"
-#include "test-type_array-int64s_increase_by.h"
-#include "test-type_array-int64s_resize.h"
-#include "test-type_array-int64ss_adjust.h"
-#include "test-type_array-int64ss_append.h"
-#include "test-type_array-int64ss_append_all.h"
-#include "test-type_array-int64ss_decimate_by.h"
-#include "test-type_array-int64ss_decrease_by.h"
-#include "test-type_array-int64ss_increase.h"
-#include "test-type_array-int64ss_increase_by.h"
-#include "test-type_array-int64ss_resize.h"
-#include "test-type_array-int128s_adjust.h"
-#include "test-type_array-int128s_append.h"
-#include "test-type_array-int128s_append_all.h"
-#include "test-type_array-int128s_decimate_by.h"
-#include "test-type_array-int128s_decrease_by.h"
-#include "test-type_array-int128s_increase.h"
-#include "test-type_array-int128s_increase_by.h"
-#include "test-type_array-int128s_resize.h"
-#include "test-type_array-int128ss_adjust.h"
-#include "test-type_array-int128ss_append.h"
-#include "test-type_array-int128ss_append_all.h"
-#include "test-type_array-int128ss_decimate_by.h"
-#include "test-type_array-int128ss_decrease_by.h"
-#include "test-type_array-int128ss_increase.h"
-#include "test-type_array-int128ss_increase_by.h"
-#include "test-type_array-int128ss_resize.h"
-#include "test-type_array-number_unsigneds_adjust.h"
-#include "test-type_array-number_unsigneds_append.h"
-#include "test-type_array-number_unsigneds_append_all.h"
-#include "test-type_array-number_unsigneds_decimate_by.h"
-#include "test-type_array-number_unsigneds_decrease_by.h"
-#include "test-type_array-number_unsigneds_increase.h"
-#include "test-type_array-number_unsigneds_increase_by.h"
-#include "test-type_array-number_unsigneds_resize.h"
-#include "test-type_array-number_unsignedss_adjust.h"
-#include "test-type_array-number_unsignedss_append.h"
-#include "test-type_array-number_unsignedss_append_all.h"
-#include "test-type_array-number_unsignedss_decimate_by.h"
-#include "test-type_array-number_unsignedss_decrease_by.h"
-#include "test-type_array-number_unsignedss_increase.h"
-#include "test-type_array-number_unsignedss_increase_by.h"
-#include "test-type_array-number_unsignedss_resize.h"
-#include "test-type_array-polls_adjust.h"
-#include "test-type_array-polls_append.h"
-#include "test-type_array-polls_append_all.h"
-#include "test-type_array-polls_decimate_by.h"
-#include "test-type_array-polls_decrease_by.h"
-#include "test-type_array-polls_increase.h"
-#include "test-type_array-polls_increase_by.h"
-#include "test-type_array-polls_resize.h"
-#include "test-type_array-pollss_adjust.h"
-#include "test-type_array-pollss_append.h"
-#include "test-type_array-pollss_append_all.h"
-#include "test-type_array-pollss_decimate_by.h"
-#include "test-type_array-pollss_decrease_by.h"
-#include "test-type_array-pollss_increase.h"
-#include "test-type_array-pollss_increase_by.h"
-#include "test-type_array-pollss_resize.h"
-#include "test-type_array-states_adjust.h"
-#include "test-type_array-states_append.h"
-#include "test-type_array-states_append_all.h"
-#include "test-type_array-states_decimate_by.h"
-#include "test-type_array-states_decrease_by.h"
-#include "test-type_array-states_increase.h"
-#include "test-type_array-states_increase_by.h"
-#include "test-type_array-states_resize.h"
-#include "test-type_array-statess_adjust.h"
-#include "test-type_array-statess_append.h"
-#include "test-type_array-statess_append_all.h"
-#include "test-type_array-statess_decimate_by.h"
-#include "test-type_array-statess_decrease_by.h"
-#include "test-type_array-statess_increase.h"
-#include "test-type_array-statess_increase_by.h"
-#include "test-type_array-statess_resize.h"
-#include "test-type_array-statuss_adjust.h"
-#include "test-type_array-statuss_append.h"
-#include "test-type_array-statuss_append_all.h"
-#include "test-type_array-statuss_decimate_by.h"
-#include "test-type_array-statuss_decrease_by.h"
-#include "test-type_array-statuss_increase.h"
-#include "test-type_array-statuss_increase_by.h"
-#include "test-type_array-statuss_resize.h"
-#include "test-type_array-statusss_adjust.h"
-#include "test-type_array-statusss_append.h"
-#include "test-type_array-statusss_append_all.h"
-#include "test-type_array-statusss_decimate_by.h"
-#include "test-type_array-statusss_decrease_by.h"
-#include "test-type_array-statusss_increase.h"
-#include "test-type_array-statusss_increase_by.h"
-#include "test-type_array-statusss_resize.h"
-#include "test-type_array-uint8s_adjust.h"
-#include "test-type_array-uint8s_append.h"
-#include "test-type_array-uint8s_append_all.h"
-#include "test-type_array-uint8s_decimate_by.h"
-#include "test-type_array-uint8s_decrease_by.h"
-#include "test-type_array-uint8s_increase.h"
-#include "test-type_array-uint8s_increase_by.h"
-#include "test-type_array-uint8s_resize.h"
-#include "test-type_array-uint8ss_adjust.h"
-#include "test-type_array-uint8ss_append.h"
-#include "test-type_array-uint8ss_append_all.h"
-#include "test-type_array-uint8ss_decimate_by.h"
-#include "test-type_array-uint8ss_decrease_by.h"
-#include "test-type_array-uint8ss_increase.h"
-#include "test-type_array-uint8ss_increase_by.h"
-#include "test-type_array-uint8ss_resize.h"
-#include "test-type_array-uint16s_adjust.h"
-#include "test-type_array-uint16s_append.h"
-#include "test-type_array-uint16s_append_all.h"
-#include "test-type_array-uint16s_decimate_by.h"
-#include "test-type_array-uint16s_decrease_by.h"
-#include "test-type_array-uint16s_increase.h"
-#include "test-type_array-uint16s_increase_by.h"
-#include "test-type_array-uint16s_resize.h"
-#include "test-type_array-uint16ss_adjust.h"
-#include "test-type_array-uint16ss_append.h"
-#include "test-type_array-uint16ss_append_all.h"
-#include "test-type_array-uint16ss_decimate_by.h"
-#include "test-type_array-uint16ss_decrease_by.h"
-#include "test-type_array-uint16ss_increase.h"
-#include "test-type_array-uint16ss_increase_by.h"
-#include "test-type_array-uint16ss_resize.h"
-#include "test-type_array-uint32s_adjust.h"
-#include "test-type_array-uint32s_append.h"
-#include "test-type_array-uint32s_append_all.h"
-#include "test-type_array-uint32s_decimate_by.h"
-#include "test-type_array-uint32s_decrease_by.h"
-#include "test-type_array-uint32s_increase.h"
-#include "test-type_array-uint32s_increase_by.h"
-#include "test-type_array-uint32s_resize.h"
-#include "test-type_array-uint32ss_adjust.h"
-#include "test-type_array-uint32ss_append.h"
-#include "test-type_array-uint32ss_append_all.h"
-#include "test-type_array-uint32ss_decimate_by.h"
-#include "test-type_array-uint32ss_decrease_by.h"
-#include "test-type_array-uint32ss_increase.h"
-#include "test-type_array-uint32ss_increase_by.h"
-#include "test-type_array-uint32ss_resize.h"
-#include "test-type_array-uint64s_adjust.h"
-#include "test-type_array-uint64s_append.h"
-#include "test-type_array-uint64s_append_all.h"
-#include "test-type_array-uint64s_decimate_by.h"
-#include "test-type_array-uint64s_decrease_by.h"
-#include "test-type_array-uint64s_increase.h"
-#include "test-type_array-uint64s_increase_by.h"
-#include "test-type_array-uint64s_resize.h"
-#include "test-type_array-uint64ss_adjust.h"
-#include "test-type_array-uint64ss_append.h"
-#include "test-type_array-uint64ss_append_all.h"
-#include "test-type_array-uint64ss_decimate_by.h"
-#include "test-type_array-uint64ss_decrease_by.h"
-#include "test-type_array-uint64ss_increase.h"
-#include "test-type_array-uint64ss_increase_by.h"
-#include "test-type_array-uint64ss_resize.h"
-#include "test-type_array-uint128s_adjust.h"
-#include "test-type_array-uint128s_append.h"
-#include "test-type_array-uint128s_append_all.h"
-#include "test-type_array-uint128s_decimate_by.h"
-#include "test-type_array-uint128s_decrease_by.h"
-#include "test-type_array-uint128s_increase.h"
-#include "test-type_array-uint128s_increase_by.h"
-#include "test-type_array-uint128s_resize.h"
-#include "test-type_array-uint128ss_adjust.h"
-#include "test-type_array-uint128ss_append.h"
-#include "test-type_array-uint128ss_append_all.h"
-#include "test-type_array-uint128ss_decimate_by.h"
-#include "test-type_array-uint128ss_decrease_by.h"
-#include "test-type_array-uint128ss_increase.h"
-#include "test-type_array-uint128ss_increase_by.h"
-#include "test-type_array-uint128ss_resize.h"
+#include "test-type_array-cells_adjust_callback.h"
+#include "test-type_array-cells_resize_callback.h"
+#include "test-type_array-files_adjust_callback.h"
+#include "test-type_array-files_resize_callback.h"
+#include "test-type_array-fll_ids_adjust_callback.h"
+#include "test-type_array-fll_ids_resize_callback.h"
+#include "test-type_array-int8s_adjust_callback.h"
+#include "test-type_array-int8s_resize_callback.h"
+#include "test-type_array-int16s_adjust_callback.h"
+#include "test-type_array-int16s_resize_callback.h"
+#include "test-type_array-int32s_adjust_callback.h"
+#include "test-type_array-int32s_resize_callback.h"
+#include "test-type_array-int64s_adjust_callback.h"
+#include "test-type_array-int64s_resize_callback.h"
+#include "test-type_array-int128s_adjust_callback.h"
+#include "test-type_array-int128s_resize_callback.h"
+#include "test-type_array-number_unsigneds_adjust_callback.h"
+#include "test-type_array-number_unsigneds_resize_callback.h"
+#include "test-type_array-uint8s_adjust_callback.h"
+#include "test-type_array-uint8s_resize_callback.h"
+#include "test-type_array-uint16s_adjust_callback.h"
+#include "test-type_array-uint16s_resize_callback.h"
+#include "test-type_array-uint32s_adjust_callback.h"
+#include "test-type_array-uint32s_resize_callback.h"
+#include "test-type_array-uint64s_adjust_callback.h"
+#include "test-type_array-uint64s_resize_callback.h"
+#include "test-type_array-uint128s_adjust_callback.h"
+#include "test-type_array-uint128s_resize_callback.h"
#ifdef __cplusplus
extern "C" {
* F_interrupt (with error bit) if stopping due to an interrupt.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_number_unsigneds_increase().
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
* Errors (with error bit) from: f_fss_is_graph().
* Errors (with error bit) from: f_fss_is_space().
* Errors (with error bit) from: f_fss_is_zero_width().
* Errors (with error bit) from: f_fss_seek_to_eol().
* Errors (with error bit) from: f_fss_skip_past_delimit().
* Errors (with error bit) from: f_fss_skip_past_space().
+ * Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_utf_buffer_increment().
*
- * @see f_number_unsigneds_increase()
- * @see f_number_unsigneds_increase_by()
* @see f_fss_is_graph()
* @see f_fss_is_space()
* @see f_fss_is_zero_width()
* @see f_fss_seek_to_eol()
* @see f_fss_skip_past_delimit()
* @see f_fss_skip_past_space()
+ * @see f_memory_array_increase_by()
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_basic_object_read_
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
return;
}
- state->status = f_number_unsigneds_increase_by((slash_count / 2) + 1, delimits);
+ state->status = f_memory_array_increase_by((slash_count / 2) + 1, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
while (slash_count > 0) {
if (F_status_is_error(state->status)) break;
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
range->start = slash_first;
- state->status = f_number_unsigneds_increase_by((slash_count / 2) + 1, delimits);
+ state->status = f_memory_array_increase_by((slash_count / 2) + 1, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
if (slash_count % 2 == 0) {
graph_first = F_false;
// Comments may only have white space before the '#', therefore only the first slash needs to be delimited.
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = slash_first;
* F_interrupt (with error bit) if stopping due to an interrupt.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_number_unsigneds_increase().
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
+ * Errors (with error bit) from: f_memory_array_increase().
+ * Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_fss_is_space().
* Errors (with error bit) from: f_fss_seek_to_eol().
* Errors (with error bit) from: f_fss_skip_past_delimit().
* Errors (with error bit) from: f_string_ranges_increase().
* Errors (with error bit) from: f_utf_buffer_increment().
*
- * @see f_number_unsigneds_increase()
- * @see f_number_unsigneds_increase_by()
+ * @see f_memory_array_increase()
+ * @see f_memory_array_increase_by()
* @see f_fss_is_space()
* @see f_fss_seek_to_eol()
* @see f_fss_skip_past_delimit()
* F_interrupt (with error bit) if stopping due to an interrupt.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
* Errors (with error bit) from: f_fss_is_graph().
* Errors (with error bit) from: f_fss_is_space().
* Errors (with error bit) from: f_fss_is_zero_width().
* Errors (with error bit) from: f_fss_seek_to_eol().
* Errors (with error bit) from: f_fss_skip_past_delimit().
* Errors (with error bit) from: f_fss_skip_past_space().
+ * Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_utf_buffer_increment().
*
- * @see f_number_unsigneds_increase_by()
* @see f_fss_is_graph()
* @see f_fss_is_space()
* @see f_fss_is_zero_width()
* @see f_fss_seek_to_eol()
* @see f_fss_skip_past_delimit()
* @see f_fss_skip_past_space()
+ * @see f_memory_array_increase_by()
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_basic_list_object_read_
f_number_unsigneds_t positions_start = f_number_unsigneds_t_initialize;
- state->status = f_number_unsigneds_increase(state->step_small, &positions_start);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
if (F_status_is_error(state->status)) return;
f_string_ranges_t objects = f_string_ranges_t_initialize;
f_number_unsigneds_t slashes = f_number_unsigneds_t_initialize;
- state->status = f_number_unsigneds_increase(state->step_small, &slashes);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
if (F_status_is_error(state->status)) {
f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
// When slash is odd and a (delimited) valid open/close is found, then save delimited positions and continue.
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
range->start = slash_first;
- state->status = f_number_unsigneds_increase_by((slashes.array[depth] / 2) + 1, delimits);
+ state->status = f_memory_array_increase_by((slashes.array[depth] / 2) + 1, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
// Apply slash delimits, only slashes and placeholders should be present.
// When slashes are even, the object is valid and needs to be processed.
if (is_object) {
if (++depth > positions_start.size) {
- state->status = f_number_unsigneds_increase(state->step_small, &positions_start);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
if (F_status_is_error(state->status)) break;
state->status = f_string_ranges_increase(state->step_small, &objects);
if (F_status_is_error(state->status)) break;
- state->status = f_number_unsigneds_increase(state->step_small, &slashes);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
if (F_status_is_error(state->status)) break;
}
}
}
else {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = slash_last;
++depth;
if (depth >= positions_start.size) {
- state->status = f_number_unsigneds_increase(state->step_small, &positions_start);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size);
if (F_status_is_error(state->status)) break;
state->status = f_string_ranges_increase(state->step_small, &objects);
if (F_status_is_error(state->status)) break;
- state->status = f_number_unsigneds_increase(state->step_small, &slashes);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size);
if (F_status_is_error(state->status)) break;
}
slashes.array[depth] = 0;
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
if (F_status_is_error(state->status)) break;
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
}
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
}
else {
if (graph_first == 0x2) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = comment_delimit;
range->start = slash_first;
- state->status = f_number_unsigneds_increase_by((slash_count / 2) + 1, delimits);
+ state->status = f_memory_array_increase_by((slash_count / 2) + 1, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
if (slash_count % 2 == 0) {
graph_first = F_false;
// Comments may only have white space before the '#', therefore only the first slash needs to be delimited.
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = slash_first;
* F_interrupt (with error bit) if stopping due to an interrupt.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_number_unsigneds_increase().
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
+ * Errors (with error bit) from: f_memory_array_increase().
+ * Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_fss_is_space().
* Errors (with error bit) from: f_fss_nest_increase().
* Errors (with error bit) from: f_fss_seek_to_eol().
* Errors (with error bit) from: f_string_ranges_increase().
* Errors (with error bit) from: f_utf_buffer_increment().
*
- * @see f_number_unsigneds_increase()
- * @see f_number_unsigneds_increase_by()
+ * @see f_memory_array_increase()
+ * @see f_memory_array_increase_by()
* @see f_fss_is_space()
* @see f_fss_nest_increase()
* @see f_fss_seek_to_eol()
* F_interrupt (with error bit) if stopping due to an interrupt.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
* Errors (with error bit) from: f_fss_is_graph().
* Errors (with error bit) from: f_fss_is_space().
* Errors (with error bit) from: f_fss_is_zero_width().
* Errors (with error bit) from: f_fss_seek_to_eol().
* Errors (with error bit) from: f_fss_skip_past_delimit().
* Errors (with error bit) from: f_fss_skip_past_space().
+ * Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_utf_buffer_increment().
*
- * @see f_number_unsigneds_increase_by()
* @see f_fss_is_graph()
* @see f_fss_is_space()
* @see f_fss_is_zero_width()
* @see f_fss_seek_to_eol()
* @see f_fss_skip_past_delimit()
* @see f_fss_skip_past_space()
+ * @see f_memory_array_increase_by()
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_embedded_list_object_read_
}
if (F_status_is_error_not(status) && quotes) {
- status = f_uint8s_increase(state->step_small, quotes);
+ status = f_memory_array_increase(state->step_small, sizeof(uint8_t), (void **) "es->array, "es->used, "es->size);
}
if (F_status_is_error(status)) {
* F_interrupt (with error bit) if stopping due to an interrupt.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_number_unsigneds_increase().
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
* Errors (with error bit) from: f_fss_is_graph().
* Errors (with error bit) from: f_fss_is_space().
* Errors (with error bit) from: f_fss_is_zero_width().
* Errors (with error bit) from: f_fss_skip_past_space().
* Errors (with error bit) from: f_utf_buffer_increment().
*
- * @see f_number_unsigneds_increase()
- * @see f_number_unsigneds_increase_by()
* @see f_fss_is_graph()
* @see f_fss_is_space()
* @see f_fss_is_zero_width()
* F_interrupt (with error bit) if stopping due to an interrupt.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_number_unsigneds_increase().
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
+ * Errors (with error bit) from: f_memory_array_increase().
* Errors (with error bit) from: f_fss_is_graph().
* Errors (with error bit) from: f_fss_is_space().
* Errors (with error bit) from: f_fss_is_zero_width().
* Errors (with error bit) from: f_fss_skip_past_delimit().
* Errors (with error bit) from: f_fss_skip_past_space().
* Errors (with error bit) from: f_string_ranges_increase().
- * Errors (with error bit) from: f_uint8s_increase().
* Errors (with error bit) from: f_utf_buffer_increment().
*
- * @see f_number_unsigneds_increase()
- * @see f_number_unsigneds_increase_by()
+ * @see f_memory_array_increase()
* @see f_fss_is_graph()
* @see f_fss_is_space()
* @see f_fss_is_zero_width()
* @see f_fss_skip_past_delimit()
* @see f_fss_skip_past_space()
* @see f_string_ranges_increase()
- * @see f_uint8s_increase()
* @see f_utf_buffer_increment()
* @see fl_fss_basic_object_read()
* @see fl_fss_extended_object_read()
if (range->start > range->stop || range->start >= buffer.used) break;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = slash_first;
}
}
else if (buffer.string[range->start] == f_fss_comment_s.string[0]) {
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = slash_first;
start = range->start;
range->start = slash_first;
- state->status = f_number_unsigneds_increase_by((slash_count / 2) + 1, delimits);
+ state->status = f_memory_array_increase_by((slash_count / 2) + 1, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
if (slash_count % 2 == 0) {
graph_first = F_false;
// Comments may only have white space before the '#', therefore only the first slash needs to be delimited.
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
delimits->array[delimits->used++] = slash_first;
* F_interrupt (with error bit) if stopping due to an interrupt.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_number_unsigneds_increase().
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
+ * Errors (with error bit) from: f_memory_array_increase().
+ * Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_fss_is_space().
* Errors (with error bit) from: f_fss_seek_to_eol().
* Errors (with error bit) from: f_fss_skip_past_delimit().
* Errors (with error bit) from: f_string_ranges_increase().
* Errors (with error bit) from: f_utf_buffer_increment().
*
- * @see f_number_unsigneds_increase()
- * @see f_number_unsigneds_increase_by()
+ * @see f_memory_array_increase()
+ * @see f_memory_array_increase_by()
* @see f_fss_is_space()
* @see f_fss_seek_to_eol()
* @see f_fss_skip_past_delimit()
* F_interrupt (with error bit) if stopping due to an interrupt.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
* Errors (with error bit) from: f_fss_is_graph().
* Errors (with error bit) from: f_fss_is_space().
* Errors (with error bit) from: f_fss_is_zero_width().
* Errors (with error bit) from: f_fss_seek_to_eol().
* Errors (with error bit) from: f_fss_skip_past_delimit().
* Errors (with error bit) from: f_fss_skip_past_space().
+ * Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_utf_buffer_increment().
*
- * @see f_number_unsigneds_increase_by()
* @see f_fss_is_graph()
* @see f_fss_is_space()
* @see f_fss_is_zero_width()
* @see f_fss_seek_to_eol()
* @see f_fss_skip_past_delimit()
* @see f_fss_skip_past_space()
+ * @see f_memory_array_increase_by()
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_extended_list_object_read_
// Only the first slash before a quote needs to be escaped (or not) as once there is a slash before a quote, this cannot ever be a quote object.
// This simplifies the number of slashes needed.
- state->status = f_number_unsigneds_increase(state->step_small, delimits);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) return;
delimits->array[delimits->used++] = first_slash;
range->start = first_slash;
if (slash_count % 2 == 0) {
- state->status = f_number_unsigneds_increase_by(slash_count / 2, delimits);
+ state->status = f_memory_array_increase_by(slash_count / 2, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) return;
while (slash_count > 0) {
return;
}
- state->status = f_number_unsigneds_increase_by((slash_count / 2) + 1, delimits);
+ state->status = f_memory_array_increase_by((slash_count / 2) + 1, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) return;
while (slash_count > 0) {
* F_none_eol (with error bit) after reaching an EOL, which is not supported by the standard.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_number_unsigneds_increase().
- * Errors (with error bit) from: f_number_unsigneds_increase_by().
+ * Errors (with error bit) from: f_memory_array_increase().
+ * Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_fss_is_graph().
* Errors (with error bit) from: f_fss_is_space().
* Errors (with error bit) from: f_fss_is_zero_width().
* Errors (with error bit) from: f_fss_skip_past_space().
* Errors (with error bit) from: f_utf_buffer_increment().
*
- * @see f_number_unsigneds_increase()
- * @see f_number_unsigneds_increase_by()
+ * @see f_memory_array_increase()
+ * @see f_memory_array_increase_by()
* @see f_fss_is_graph()
* @see f_fss_is_space()
* @see f_fss_is_zero_width()
do {
if (ids && ids->used + 1 > ids->size) {
- status = f_fll_ids_increase(F_fss_default_allocation_step_small_d, ids);
+ status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_fll_id_t), (void **) &ids->array, &ids->used, &ids->size);
}
if (F_status_is_error_not(status)) {
}
if (ids) {
- status = f_fll_ids_increase(F_fss_default_allocation_step_small_d, ids);
+ status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_fll_id_t), (void **) &ids->array, &ids->used, &ids->size);
if (F_status_is_error(status)) {
if (ids) {
if (F_status_is_error(status)) return status;
if (indexs) {
- status = f_number_unsigneds_increase_by(content->used, indexs[j]);
+ status = f_memory_array_increase_by(content->used, sizeof(f_number_unsigned_t), (void **) &indexs[j]->array, &indexs[j]->used, &indexs[j]->size);
if (F_status_is_error(status)) return status;
}
}
*
* F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
*
- * Errors (with error bit) from: f_fll_ids_increase().
+ * Errors (with error bit) from: f_memory_array_increase().
* Errors (with error bit) from: f_utf_is_whitespace().
* Errors (with error bit) from: f_parse_dynamic_partial_fll_identify().
*
- * @see f_fll_ids_increase()
+ * @see f_memory_array_increase()
* @see f_utf_is_whitespace()
* @see f_parse_dynamic_partial_fll_identify()
*/
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
* Errors (with error bit) from: f_compare_dynamic_partial_trim_string().
+ * Errors (with error bit) from: f_memory_array_increase_by().
+ * Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
*
- * @see f_string_dynamic_partial_append_nulless()
* @see f_compare_trim()
+ * @see f_memory_array_increase_by()
+ * @see f_string_dynamic_partial_append_nulless()
*/
#ifndef _di_fll_fss_snatch_apart_
extern f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_string_ranges_t objects, const f_string_rangess_t contents, const f_string_static_t names[], const f_number_unsigned_t size, f_string_dynamics_t * const values[], bool matches[], f_number_unsigneds_t * const indexs[]);
contents->array[contents->used].used = 0;
if (objects_quoted) {
- state->status = f_uint8s_increase(state->step_small, objects_quoted);
+ state->status = f_memory_array_increase(state->step_small, sizeof(uint8_t), (void **) &objects_quoted->array, &objects_quoted->used, &objects_quoted->size);
if (F_status_is_error(state->status)) return;
}
* F_number_overflow (with error bit) if the maximum buffer size is reached.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_increase().
* Errors (with error bit) from: f_string_ranges_increase().
* Errors (with error bit) from: f_string_rangess_increase().
- * Errors (with error bit) from: f_uint8s_increase().
* Errors (with error bit) from: fl_fss_basic_content_read().
* Errors (with error bit) from: fl_fss_basic_object_read().
*
+ * @see f_memory_array_increase()
* @see f_string_ranges_increase()
* @see f_string_rangess_increase()
- * @see f_uint8s_increase()
* @see fl_fss_basic_content_read()
* @see fl_fss_basic_object_read()
*/
* F_number_overflow (with error bit) if the maximum buffer size is reached.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_increase().
* Errors (with error bit) from: f_string_ranges_increase().
* Errors (with error bit) from: f_string_rangess_increase().
- * Errors (with error bit) from: f_uint8s_increase().
* Errors (with error bit) from: fl_fss_basic_list_content_read().
* Errors (with error bit) from: fl_fss_basic_list_object_read().
*
+ * @see f_memory_array_increase()
* @see f_string_ranges_increase()
* @see f_string_rangess_increase()
- * @see f_uint8s_increase()
* @see fl_fss_basic_list_content_read()
* @see fl_fss_basic_list_object_read()
*/
* F_number_overflow (with error bit) if the maximum buffer size is reached.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_increase().
* Errors (with error bit) from: f_string_ranges_increase().
* Errors (with error bit) from: f_string_rangess_increase().
- * Errors (with error bit) from: f_uint8s_increase().
* Errors (with error bit) from: fl_fss_embedded_list_content_read().
* Errors (with error bit) from: fl_fss_embedded_list_object_read().
*
+ * @see f_memory_array_increase()
* @see f_string_ranges_increase()
* @see f_string_rangess_increase()
- * @see f_uint8s_increase()
* @see fl_fss_embedded_list_content_read()
* @see fl_fss_embedded_list_object_read()
*/
contents->array[contents->used].used = 0;
if (objects_quoted) {
- state->status = f_uint8s_increase(state->step_small, objects_quoted);
+ state->status = f_memory_array_increase(state->step_small, sizeof(uint8_t), (void **) &objects_quoted->array, &objects_quoted->used, &objects_quoted->size);
if (F_status_is_error(state->status)) return;
}
if (contents_quoted) {
- state->status = f_uint8ss_increase(state->step_small, contents_quoted);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_uint8s_t), (void **) &contents_quoted->array, &contents_quoted->used, &contents_quoted->size);
if (F_status_is_error(state->status)) return;
contents_quoted->array[contents_quoted->used].used = 0;
contents->array[contents->used++].used = 0;
if (contents_quoted) {
- status = f_uint8s_increase(state->step_small, &contents_quoted->array[contents_quoted->used]);
+ status = f_memory_array_increase(state->step_small, sizeof(uint8_t), (void **) &contents_quoted->array[contents_quoted->used].array, &contents_quoted->array[contents_quoted->used].used, &contents_quoted->array[contents_quoted->used].size);
if (F_status_is_error(status)) return;
contents_quoted->array[contents_quoted->used++].used = 0;
contents->array[contents->used].used = 0;
if (contents_quoted) {
- state->status = f_uint8s_increase(state->step_small, &contents_quoted->array[contents_quoted->used]);
+ state->status = f_memory_array_increase(state->step_small, sizeof(uint8_t), (void **) &contents_quoted->array[contents_quoted->used].array, &contents_quoted->array[contents_quoted->used].used, &contents_quoted->array[contents_quoted->used].size);
if (F_status_is_error(state->status)) return;
quoted_content = &contents_quoted->array[contents_quoted->used];
* F_number_overflow (with error bit) if the maximum buffer size is reached.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_increase().
* Errors (with error bit) from: f_string_ranges_increase().
* Errors (with error bit) from: f_string_rangess_increase().
- * Errors (with error bit) from: f_uint8s_increase().
* Errors (with error bit) from: fl_fss_extended_content_read().
* Errors (with error bit) from: fl_fss_extended_object_read().
*
+ * @see f_memory_array_increase()
* @see f_string_ranges_increase()
* @see f_string_rangess_increase()
- * @see f_uint8s_increase()
* @see fl_fss_extended_content_read()
* @see fl_fss_extended_object_read()
*/
* F_number_overflow (with error bit) if the maximum buffer size is reached.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_memory_array_increase().
* Errors (with error bit) from: f_string_ranges_increase().
* Errors (with error bit) from: f_string_rangess_increase().
- * Errors (with error bit) from: f_uint8s_increase().
* Errors (with error bit) from: fl_fss_extended_list_content_read().
* Errors (with error bit) from: fl_fss_extended_list_object_read().
*
+ * @see f_memory_array_increase()
* @see f_string_ranges_increase()
* @see f_string_rangess_increase()
- * @see f_uint8s_increase()
* @see fl_fss_extended_list_content_read()
* @see fl_fss_extended_list_object_read()
*/
*
* F_number_overflow (with error bit) if the maximum buffer size is reached.
*
+ * Errors (with error bit) from: f_memory_array_increase().
* Errors (with error bit) from: f_string_ranges_increase().
* Errors (with error bit) from: f_string_rangess_increase().
- * Errors (with error bit) from: f_uint8s_increase().
* Errors (with error bit) from: fl_fss_basic_list_content_read().
* Errors (with error bit) from: fl_fss_basic_list_object_read().
*
+ * @see f_memory_array_increase()
* @see f_string_ranges_increase()
* @see f_string_rangess_increase()
- * @see f_uint8s_increase()
* @see fl_fss_basic_list_content_read()
* @see fl_fss_basic_list_object_read()
*/
}
if (F_status_is_error_not(status)) {
- status = f_number_unsigneds_increase(controller_common_allocation_small_d, &process->stack);
+ status = f_memory_array_increase(controller_common_allocation_small_d, sizeof(f_number_unsigned_t), (void **) &process->stack.array, &process->stack.used, &process->stack.size);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_number_unsigneds_increase", F_true);
+ controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_memory_array_increase", F_true);
}
else {
f_thread_unlock(&process->lock);
main->setting.flag |= fake_main_flag_operation_make_e;
main->setting.flag -= main->setting.flag & fake_main_flag_operation_e;
- main->setting.state.status = f_uint8s_increase_by(1, &main->setting.operations);
+ main->setting.state.status = f_memory_array_increase_by(1, sizeof(uint8_t), (void **) &main->setting.operations.array, &main->setting.operations.used, &main->setting.operations.size);
if (F_status_is_error(main->setting.state.status)) {
if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
}
- fake_print_error(&main->program.error, macro_fake_f(f_uint8s_increase_by));
+ fake_print_error(&main->program.error, macro_fake_f(f_memory_array_increase_by));
return;
}
if (!data->main) return;
- parameter_state->state->status = f_uint8s_increase(parameter_state->state->step_small, &data->main->setting.operations);
+ parameter_state->state->status = f_memory_array_increase(parameter_state->state->step_small, sizeof(uint8_t), (void **) &data->main->setting.operations.array, &data->main->setting.operations.used, &data->main->setting.operations.size);
if (F_status_is_error(parameter_state->state->status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_uint8s_increase));
+ fake_print_error(&data->main->program.error, macro_fake_f(f_memory_array_increase));
return;
}
* F_none on success.
*
* Errors (with error bit) from: f_console_parameter_process().
+ * Errors (with error bit) from: f_memory_array_increase_by().
* Errors (with error bit) from: f_path_directory_cleanup().
* Errors (with error bit) from: f_string_dynamic_resize().
* Errors (with error bit) from: f_utf_is_word_dash_plus().
- * Errors (with error bit) from: f_uint8s_increase_by().
* Errors (with error bit) from: fll_program_parameter_additional_rip().
* Errors (with error bit) from: fll_program_parameter_process_context().
* Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* @see f_console_parameter_process()
+ * @see f_memory_array_increase_by()
* @see f_path_directory_cleanup()
* @see f_string_dynamic_resize()
* @see f_utf_is_word_dash_plus()
- * @see f_uint8s_increase_by()
* @see fll_program_parameter_additional_rip()
* @see fll_program_parameter_process_context()
* @see fll_program_parameter_process_verbosity_standard()
* F_none on success.
* F_process on success, designating that processing should be performed (see f_console_parameter_process()).
*
- * Errors (with error bit) from: f_uint8s_increase().
+ * Errors (with error bit) from: f_memory_array_increase().
+ *
* @param main
* This must be of the type fake_main_t.
*
* @see f_console_parameter_process()
- * @see f_uint8s_increase()
+ * @see f_memory_array_increase()
*/
#ifndef _di_fake_setting_load_parameter_callback_
extern void fake_setting_load_parameter_callback(const f_console_arguments_t arguments, void * const parameters, f_console_parameter_state_t * const parameter_state, void * const main);
const f_string_t fake_f_a[] = {
"f_account_group_id_by_name",
"f_account_id_by_name",
- "f_number_unsigneds_increase",
"f_compare_dynamic_partial",
"f_console_parameter_prioritize_right",
"f_console_parameter_process",
"f_file_write",
"f_fss_apply_delimit",
"f_fss_nameds_resize",
+ "f_memory_array_increase",
+ "f_memory_array_increase_by",
"f_path_change",
"f_path_current",
"f_path_directory_cleanup",
"f_string_dynamics_resize",
"f_string_map_multis_resize",
"f_thread_create",
- "f_uint8s_increase",
- "f_uint8s_increase_by",
"f_utf_is_word_dash_plus",
"fl_conversion_dynamic_to_unsigned_detect",
"fl_directory_create",
enum {
fake_f_f_account_group_id_by_name_e,
fake_f_f_account_id_by_name_e,
- fake_f_f_number_unsigneds_increase_e,
fake_f_f_compare_dynamic_partial_e,
fake_f_f_console_parameter_prioritize_right_e,
fake_f_f_console_parameter_process_e,
fake_f_f_file_write_e,
fake_f_f_fss_apply_delimit_e,
fake_f_f_fss_nameds_resize_e,
+ fake_f_f_memory_array_increase_e,
+ fake_f_f_memory_array_increase_by_e,
fake_f_f_path_change_e,
fake_f_f_path_current_e,
fake_f_f_path_directory_cleanup_e,
fake_f_f_string_dynamics_resize_e,
fake_f_f_string_map_multis_resize_e,
fake_f_f_thread_create_e,
- fake_f_f_uint8s_increase_e,
- fake_f_f_uint8s_increase_by_e,
fake_f_f_utf_is_word_dash_plus_e,
fake_f_fl_conversion_dynamic_to_unsigned_detect_e,
fake_f_fl_directory_create_e,
f_string_dynamics_resize(0, &setting->defines);
f_string_dynamics_resize(0, &setting->modes);
- f_uint8s_resize(0, &setting->operations);
+ f_memory_array_resize(0, sizeof(uint8_t), (void **) &setting->operations.array, &setting->operations.used, &setting->operations.size);
}
#endif // _di_fake_setting_delete_
}
// Add the operation id to the operation stack.
- main->setting.state.status = f_number_unsigneds_increase(main->setting.state.step_small, section_stack);
+ main->setting.state.status = f_memory_array_increase(main->setting.state.step_small, sizeof(f_number_unsigned_t), (void **) §ion_stack->array, §ion_stack->used, §ion_stack->size);
if (F_status_is_error(main->setting.state.status)) {
- fake_print_error(&data_make->error, macro_fake_f(f_number_unsigneds_increase));
+ fake_print_error(&data_make->error, macro_fake_f(f_memory_array_increase));
return 0;
}
* F_recurse (with error bit) is returned if unable to recurse to another operation section (usually max stack depth reached).
* F_valid_not (with error bit) is returned if any part of the section is invalid, such as an invalid operation name.
*
- * Errors (with error bit) from: f_number_unsigneds_increase()
+ * Errors (with error bit) from: f_memory_array_increase()
*
* Errors (with error bit) from: fake_make_operate_block_postprocess()
* Errors (with error bit) from: fake_make_operate_block_prepare()
* The return code of the execution process.
* This generally is only needed when F_child is returned, where this holds the return status of the child process.
*
- * @see f_number_unsigneds_increase()
- * @see fll_program_print_signal_received()
+ * @see f_memory_array_increase()
*
* @see fake_make_operate_block_postprocess()
* @see fake_make_operate_block_prepare()
status = f_string_dynamics_resize(2, &arguments);
if (F_status_is_error(status)) return status;
- status = f_number_unsigneds_increase_by(local->chain_objects.used, &local->chain_ids);
+ status = f_memory_array_increase_by(local->chain_objects.used, sizeof(f_number_unsigned_t), (void **) &local->chain_ids.array, &local->chain_ids.used, &local->chain_ids.size);
if (F_status_is_error(status)) return status;
memset(local->chain_ids.array, 0, sizeof(f_number_unsigned_t) * local->chain_ids.used);
f_string_dynamic_resize(0, &setting->buffer);
- f_fll_ids_resize(0, &setting->ids);
+ f_memory_array_resize(0, sizeof(f_fll_id_t), (void **) &setting->ids.array, &setting->ids.used, &setting->ids.size);
f_string_dynamics_resize(0, &setting->names);
f_string_dynamics_resize(0, &setting->files);
f_number_unsigned_t j = 0;
if (main->setting.quotes_object.used < main->setting.objects.used) {
- main->setting.state.status = f_uint8s_resize(main->setting.objects.used, &main->setting.quotes_object);
+ main->setting.state.status = f_memory_array_resize(main->setting.objects.used, sizeof(uint8_t), (void **) &main->setting.quotes_object.array, &main->setting.quotes_object.used, &main->setting.quotes_object.size);
if (F_status_is_error(main->setting.state.status)) return;
for (i = main->setting.quotes_object.used; i < main->setting.objects.used; ++i) {
}
if (main->setting.quotes_content.used < main->setting.contents.used) {
- main->setting.state.status = f_uint8ss_resize(main->setting.contents.used, &main->setting.quotes_content);
+ f_memory_arrays_resize(main->setting.contents.used, sizeof(f_uint8s_t), (void **) &main->setting.quotes_content.array, &main->setting.quotes_content.used, &main->setting.quotes_content.size, &f_uint8s_resize_callback);
if (F_status_is_error(main->setting.state.status)) return;
for (i = main->setting.quotes_content.used; i < main->setting.contents.used; ++i) {
- main->setting.state.status = f_uint8s_resize(main->setting.contents.array[i].used, &main->setting.quotes_content.array[i]);
+ main->setting.state.status = f_memory_array_resize(main->setting.contents.array[i].used, sizeof(uint8_t), (void **) &main->setting.quotes_content.array[i].array, &main->setting.quotes_content.array[i].used, &main->setting.quotes_content.array[i].size);
if (F_status_is_error(main->setting.state.status)) return;
main->setting.quotes_content.array[i].used = 0;
* This alters main.setting.state.status:
* F_none on success.
*
- * Errors (with error bit) from: f_uint8s_resize().
- * Errors (with error bit) from: f_uint8ss_resize().
+ * Errors (with error bit) from: f_memory_array_resize().
+ * Errors (with error bit) from: f_memory_arrays_resize().
*
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
#ifndef _di_fss_read_ensure_quotes_length_
extern void fss_read_ensure_quotes_length(fss_read_main_t * const main);
f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &setting->delimits_object.array, &setting->delimits_object.used, &setting->delimits_object.size);
f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &setting->delimits_content.array, &setting->delimits_content.used, &setting->delimits_content.size);
- f_uint8s_resize(0, &setting->quotes_object);
- f_uint8ss_resize(0, &setting->quotes_content);
+ f_memory_array_resize(0, sizeof(uint8_t), (void **) &setting->quotes_object.array, &setting->quotes_object.used, &setting->quotes_object.size);
+ f_memory_arrays_resize(0, sizeof(f_uint8s_t), (void **) &setting->quotes_content.array, &setting->quotes_content.used, &setting->quotes_content.size, &f_uint8s_resize_callback);
return F_none;
}