foundational_lib 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Articles/1.html +524 -0
- data/Articles/10.html +63 -0
- data/Articles/11.html +153 -0
- data/Articles/12.html +15 -0
- data/Articles/13.html +14 -0
- data/Articles/14.html +299 -0
- data/Articles/15.html +125 -0
- data/Articles/16.html +908 -0
- data/Articles/2.html +83 -0
- data/Articles/3.html +46 -0
- data/Articles/4.html +108 -0
- data/Articles/5.html +186 -0
- data/Articles/6.html +49 -0
- data/Articles/7.html +25 -0
- data/Articles/8.html +128 -0
- data/Articles/9.html +72 -0
- data/Articles/convert_html_to_markdown.sh +8 -0
- data/Articles/css.css +54 -0
- data/Articles/format.rb +95 -0
- data/Articles/index.html +34 -0
- data/Articles_MD/1.html.md +451 -0
- data/Articles_MD/10.html.md +57 -0
- data/Articles_MD/11.html.md +231 -0
- data/Articles_MD/12.html.md +16 -0
- data/Articles_MD/13.html.md +15 -0
- data/Articles_MD/14.html.md +280 -0
- data/Articles_MD/15.html.md +135 -0
- data/Articles_MD/16.html.md +840 -0
- data/Articles_MD/17.html.md +838 -0
- data/Articles_MD/2.html.md +82 -0
- data/Articles_MD/3.html.md +163 -0
- data/Articles_MD/4.html.md +137 -0
- data/Articles_MD/5.html.md +175 -0
- data/Articles_MD/6.html.md +47 -0
- data/Articles_MD/7.html.md +24 -0
- data/Articles_MD/8.html.md +71 -0
- data/Articles_MD/9.html.md +68 -0
- data/Articles_MD/index.html.md +25 -0
- data/DOCS.md +11153 -0
- data/GENERATE_CUSTOM_FOUNDATIONALLIB.rb +89 -0
- data/LICENSE.md +16 -0
- data/NOTE.md +29 -0
- data/README.md +120 -0
- data/custom_library_example.h +13999 -0
- data/docs/Doxyfile +2746 -0
- data/docs/LICENSE +21 -0
- data/docs/Makefile +39 -0
- data/docs/custom-alternative.css +54 -0
- data/docs/custom.css +57 -0
- data/docs/doxygen-awesome-darkmode-toggle.js +157 -0
- data/docs/doxygen-awesome-fragment-copy-button.js +85 -0
- data/docs/doxygen-awesome-interactive-toc.js +81 -0
- data/docs/doxygen-awesome-paragraph-link.js +51 -0
- data/docs/doxygen-awesome-sidebar-only-darkmode-toggle.css +40 -0
- data/docs/doxygen-awesome-sidebar-only.css +116 -0
- data/docs/doxygen-awesome-tabs.js +90 -0
- data/docs/doxygen-awesome.css +2669 -0
- data/docs/doxygen-custom/custom-alternative.css +54 -0
- data/docs/doxygen-custom/custom.css +57 -0
- data/docs/doxygen-custom/header.html +90 -0
- data/docs/doxygen-custom/toggle-alternative-theme.js +12 -0
- data/docs/header.html +90 -0
- data/docs/html/html/annotated.html +145 -0
- data/docs/html/html/annotated_dup.js +10 -0
- data/docs/html/html/bc_s.png +0 -0
- data/docs/html/html/bdwn.png +0 -0
- data/docs/html/html/classes.html +149 -0
- data/docs/html/html/closed.png +0 -0
- data/docs/html/html/custom-alternative.css +54 -0
- data/docs/html/html/custom.css +57 -0
- data/docs/html/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +141 -0
- data/docs/html/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js +4 -0
- data/docs/html/html/doc.png +0 -0
- data/docs/html/html/doxygen-awesome-darkmode-toggle.js +157 -0
- data/docs/html/html/doxygen-awesome-fragment-copy-button.js +85 -0
- data/docs/html/html/doxygen-awesome-interactive-toc.js +81 -0
- data/docs/html/html/doxygen-awesome-paragraph-link.js +51 -0
- data/docs/html/html/doxygen-awesome-sidebar-only-darkmode-toggle.css +40 -0
- data/docs/html/html/doxygen-awesome-sidebar-only.css +116 -0
- data/docs/html/html/doxygen-awesome-tabs.js +90 -0
- data/docs/html/html/doxygen-awesome.css +2669 -0
- data/docs/html/html/doxygen.css +1793 -0
- data/docs/html/html/doxygen.svg +26 -0
- data/docs/html/html/dynsections.js +121 -0
- data/docs/html/html/files.html +140 -0
- data/docs/html/html/files_dup.js +4 -0
- data/docs/html/html/folderclosed.png +0 -0
- data/docs/html/html/folderopen.png +0 -0
- data/docs/html/html/foundationallib_8h.html +17294 -0
- data/docs/html/html/foundationallib_8h.js +445 -0
- data/docs/html/html/foundationallib_8h__incl.map +15 -0
- data/docs/html/html/foundationallib_8h__incl.md5 +1 -0
- data/docs/html/html/foundationallib_8h__incl.svg +202 -0
- data/docs/html/html/foundationallib_8h_source.html +9125 -0
- data/docs/html/html/functions.html +188 -0
- data/docs/html/html/functions_vars.html +188 -0
- data/docs/html/html/globals.html +158 -0
- data/docs/html/html/globals_b.html +137 -0
- data/docs/html/html/globals_c.html +173 -0
- data/docs/html/html/globals_d.html +185 -0
- data/docs/html/html/globals_defs.html +361 -0
- data/docs/html/html/globals_dup.js +19 -0
- data/docs/html/html/globals_e.html +221 -0
- data/docs/html/html/globals_f.html +560 -0
- data/docs/html/html/globals_func.html +158 -0
- data/docs/html/html/globals_func.js +19 -0
- data/docs/html/html/globals_func_b.html +137 -0
- data/docs/html/html/globals_func_c.html +173 -0
- data/docs/html/html/globals_func_d.html +179 -0
- data/docs/html/html/globals_func_e.html +218 -0
- data/docs/html/html/globals_func_f.html +341 -0
- data/docs/html/html/globals_func_g.html +140 -0
- data/docs/html/html/globals_func_i.html +188 -0
- data/docs/html/html/globals_func_j.html +137 -0
- data/docs/html/html/globals_func_l.html +152 -0
- data/docs/html/html/globals_func_m.html +152 -0
- data/docs/html/html/globals_func_p.html +374 -0
- data/docs/html/html/globals_func_r.html +194 -0
- data/docs/html/html/globals_func_s.html +386 -0
- data/docs/html/html/globals_func_u.html +140 -0
- data/docs/html/html/globals_func_w.html +140 -0
- data/docs/html/html/globals_g.html +140 -0
- data/docs/html/html/globals_i.html +188 -0
- data/docs/html/html/globals_j.html +137 -0
- data/docs/html/html/globals_l.html +152 -0
- data/docs/html/html/globals_m.html +152 -0
- data/docs/html/html/globals_p.html +374 -0
- data/docs/html/html/globals_r.html +194 -0
- data/docs/html/html/globals_s.html +389 -0
- data/docs/html/html/globals_type.html +144 -0
- data/docs/html/html/globals_u.html +140 -0
- data/docs/html/html/globals_vars.html +135 -0
- data/docs/html/html/globals_w.html +140 -0
- data/docs/html/html/graph_legend.html +194 -0
- data/docs/html/html/graph_legend.md5 +1 -0
- data/docs/html/html/graph_legend.svg +117 -0
- data/docs/html/html/index.html +134 -0
- data/docs/html/html/jquery.js +35 -0
- data/docs/html/html/logo.drawio.svg +1 -0
- data/docs/html/html/menu.js +51 -0
- data/docs/html/html/menudata.js +75 -0
- data/docs/html/html/nav_f.png +0 -0
- data/docs/html/html/nav_g.png +0 -0
- data/docs/html/html/nav_h.png +0 -0
- data/docs/html/html/navtree.css +146 -0
- data/docs/html/html/navtree.js +546 -0
- data/docs/html/html/navtreedata.js +57 -0
- data/docs/html/html/navtreeindex0.js +253 -0
- data/docs/html/html/navtreeindex1.js +253 -0
- data/docs/html/html/navtreeindex2.js +18 -0
- data/docs/html/html/open.png +0 -0
- data/docs/html/html/resize.js +140 -0
- data/docs/html/html/search/all_0.html +37 -0
- data/docs/html/html/search/all_0.js +12 -0
- data/docs/html/html/search/all_1.html +37 -0
- data/docs/html/html/search/all_1.js +4 -0
- data/docs/html/html/search/all_10.html +37 -0
- data/docs/html/html/search/all_10.js +6 -0
- data/docs/html/html/search/all_11.html +37 -0
- data/docs/html/html/search/all_11.js +5 -0
- data/docs/html/html/search/all_12.html +37 -0
- data/docs/html/html/search/all_12.js +4 -0
- data/docs/html/html/search/all_13.html +37 -0
- data/docs/html/html/search/all_13.js +5 -0
- data/docs/html/html/search/all_2.html +37 -0
- data/docs/html/html/search/all_2.js +17 -0
- data/docs/html/html/search/all_3.html +37 -0
- data/docs/html/html/search/all_3.js +21 -0
- data/docs/html/html/search/all_4.html +37 -0
- data/docs/html/html/search/all_4.js +34 -0
- data/docs/html/html/search/all_5.html +37 -0
- data/docs/html/html/search/all_5.js +147 -0
- data/docs/html/html/search/all_6.html +37 -0
- data/docs/html/html/search/all_6.js +5 -0
- data/docs/html/html/search/all_7.html +37 -0
- data/docs/html/html/search/all_7.js +22 -0
- data/docs/html/html/search/all_8.html +37 -0
- data/docs/html/html/search/all_8.js +4 -0
- data/docs/html/html/search/all_9.html +37 -0
- data/docs/html/html/search/all_9.js +4 -0
- data/docs/html/html/search/all_a.html +37 -0
- data/docs/html/html/search/all_a.js +9 -0
- data/docs/html/html/search/all_b.html +37 -0
- data/docs/html/html/search/all_b.js +9 -0
- data/docs/html/html/search/all_c.html +37 -0
- data/docs/html/html/search/all_c.js +4 -0
- data/docs/html/html/search/all_d.html +37 -0
- data/docs/html/html/search/all_d.js +83 -0
- data/docs/html/html/search/all_e.html +37 -0
- data/docs/html/html/search/all_e.js +25 -0
- data/docs/html/html/search/all_f.html +37 -0
- data/docs/html/html/search/all_f.js +91 -0
- data/docs/html/html/search/classes_0.html +37 -0
- data/docs/html/html/search/classes_0.js +5 -0
- data/docs/html/html/search/classes_1.html +37 -0
- data/docs/html/html/search/classes_1.js +5 -0
- data/docs/html/html/search/classes_2.html +37 -0
- data/docs/html/html/search/classes_2.js +5 -0
- data/docs/html/html/search/classes_3.html +37 -0
- data/docs/html/html/search/classes_3.js +4 -0
- data/docs/html/html/search/close.svg +31 -0
- data/docs/html/html/search/defines_0.html +37 -0
- data/docs/html/html/search/defines_0.js +4 -0
- data/docs/html/html/search/defines_1.html +37 -0
- data/docs/html/html/search/defines_1.js +4 -0
- data/docs/html/html/search/defines_2.html +37 -0
- data/docs/html/html/search/defines_2.js +74 -0
- data/docs/html/html/search/files_0.html +37 -0
- data/docs/html/html/search/files_0.js +4 -0
- data/docs/html/html/search/functions_0.html +37 -0
- data/docs/html/html/search/functions_0.js +11 -0
- data/docs/html/html/search/functions_1.html +37 -0
- data/docs/html/html/search/functions_1.js +4 -0
- data/docs/html/html/search/functions_2.html +37 -0
- data/docs/html/html/search/functions_2.js +16 -0
- data/docs/html/html/search/functions_3.html +37 -0
- data/docs/html/html/search/functions_3.js +18 -0
- data/docs/html/html/search/functions_4.html +37 -0
- data/docs/html/html/search/functions_4.js +31 -0
- data/docs/html/html/search/functions_5.html +37 -0
- data/docs/html/html/search/functions_5.js +72 -0
- data/docs/html/html/search/functions_6.html +37 -0
- data/docs/html/html/search/functions_6.js +5 -0
- data/docs/html/html/search/functions_7.html +37 -0
- data/docs/html/html/search/functions_7.js +21 -0
- data/docs/html/html/search/functions_8.html +37 -0
- data/docs/html/html/search/functions_8.js +4 -0
- data/docs/html/html/search/functions_9.html +37 -0
- data/docs/html/html/search/functions_9.js +9 -0
- data/docs/html/html/search/functions_a.html +37 -0
- data/docs/html/html/search/functions_a.js +9 -0
- data/docs/html/html/search/functions_b.html +37 -0
- data/docs/html/html/search/functions_b.js +83 -0
- data/docs/html/html/search/functions_c.html +37 -0
- data/docs/html/html/search/functions_c.js +23 -0
- data/docs/html/html/search/functions_d.html +37 -0
- data/docs/html/html/search/functions_d.js +87 -0
- data/docs/html/html/search/functions_e.html +37 -0
- data/docs/html/html/search/functions_e.js +5 -0
- data/docs/html/html/search/functions_f.html +37 -0
- data/docs/html/html/search/functions_f.js +5 -0
- data/docs/html/html/search/mag_sel.svg +74 -0
- data/docs/html/html/search/nomatches.html +13 -0
- data/docs/html/html/search/search.css +257 -0
- data/docs/html/html/search/search.js +816 -0
- data/docs/html/html/search/search_l.png +0 -0
- data/docs/html/html/search/search_m.png +0 -0
- data/docs/html/html/search/search_r.png +0 -0
- data/docs/html/html/search/searchdata.js +33 -0
- data/docs/html/html/search/typedefs_0.html +37 -0
- data/docs/html/html/search/typedefs_0.js +4 -0
- data/docs/html/html/search/typedefs_1.html +37 -0
- data/docs/html/html/search/typedefs_1.js +5 -0
- data/docs/html/html/search/typedefs_2.html +37 -0
- data/docs/html/html/search/typedefs_2.js +4 -0
- data/docs/html/html/search/variables_0.html +37 -0
- data/docs/html/html/search/variables_0.js +4 -0
- data/docs/html/html/search/variables_1.html +37 -0
- data/docs/html/html/search/variables_1.js +4 -0
- data/docs/html/html/search/variables_2.html +37 -0
- data/docs/html/html/search/variables_2.js +5 -0
- data/docs/html/html/search/variables_3.html +37 -0
- data/docs/html/html/search/variables_3.js +5 -0
- data/docs/html/html/search/variables_4.html +37 -0
- data/docs/html/html/search/variables_4.js +4 -0
- data/docs/html/html/search/variables_5.html +37 -0
- data/docs/html/html/search/variables_5.js +4 -0
- data/docs/html/html/search/variables_6.html +37 -0
- data/docs/html/html/search/variables_6.js +4 -0
- data/docs/html/html/search/variables_7.html +37 -0
- data/docs/html/html/search/variables_7.js +5 -0
- data/docs/html/html/search/variables_8.html +37 -0
- data/docs/html/html/search/variables_8.js +5 -0
- data/docs/html/html/search/variables_9.html +37 -0
- data/docs/html/html/search/variables_9.js +5 -0
- data/docs/html/html/search/variables_a.html +37 -0
- data/docs/html/html/search/variables_a.js +4 -0
- data/docs/html/html/splitbar.png +0 -0
- data/docs/html/html/struct_dict.html +195 -0
- data/docs/html/html/struct_dict.js +6 -0
- data/docs/html/html/struct_dict_key_value.html +197 -0
- data/docs/html/html/struct_dict_key_value.js +6 -0
- data/docs/html/html/struct_frozen_dict.html +195 -0
- data/docs/html/html/struct_frozen_dict.js +6 -0
- data/docs/html/html/struct_frozen_set.html +195 -0
- data/docs/html/html/struct_frozen_set.js +6 -0
- data/docs/html/html/struct_set.html +195 -0
- data/docs/html/html/struct_set.js +6 -0
- data/docs/html/html/struct_set_key.html +179 -0
- data/docs/html/html/struct_set_key.js +5 -0
- data/docs/html/html/struct_thread_data.html +291 -0
- data/docs/html/html/struct_thread_data.js +12 -0
- data/docs/html/html/sync_off.png +0 -0
- data/docs/html/html/sync_on.png +0 -0
- data/docs/html/html/tab_a.png +0 -0
- data/docs/html/html/tab_b.png +0 -0
- data/docs/html/html/tab_h.png +0 -0
- data/docs/html/html/tab_s.png +0 -0
- data/docs/html/html/tabs.css +1 -0
- data/docs/html/html/toggle-alternative-theme.js +12 -0
- data/docs/img/screenshot.png +0 -0
- data/docs/img/testimage.png +0 -0
- data/docs/img/theme-variants-base.drawio.svg +117 -0
- data/docs/img/theme-variants-sidebar-only.drawio.svg +102 -0
- data/docs/logo.drawio.svg +1 -0
- data/docs/package.json +34 -0
- data/docs/src/foundationallib.h +13061 -0
- data/docs/toggle-alternative-theme.js +12 -0
- data/example_of_transpilation_comments.txt +167 -0
- data/foundationallib.gemspec +14 -0
- data/foundationallib.h +13999 -0
- data/platforms/README.md +17 -0
- data/platforms/header_and_separate_compilation_unit/Makefile +18 -0
- data/platforms/header_and_separate_compilation_unit/foundationallib_noninline.c +13014 -0
- data/platforms/header_and_separate_compilation_unit/foundationallib_noninline.h +316 -0
- data/platforms/header_and_separate_compilation_unit/foundationallib_noninline.o +0 -0
- data/platforms/header_and_separate_compilation_unit/non_inline_example +0 -0
- data/platforms/header_and_separate_compilation_unit/non_inline_example.c +11 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/Makefile +18 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/foundationallib_noninline.c +13014 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/foundationallib_noninline.h +317 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/foundationallib_noninline.o +0 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/non_inline_example +0 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/non_inline_example.c +11 -0
- data/platforms/header_and_separate_compilation_unit_all_safe_funcs/wont_compile.c +8 -0
- data/tests/decoupled_thorough_tests +0 -0
- data/tests/decoupled_thorough_tests.c +95 -0
- data/tests/decoupled_thorough_tests.exe +0 -0
- data/tests/decoupled_thorough_tests32 +0 -0
- data/tests/deps_for_testing +9 -0
- data/tests/deps_for_testing.sh +23 -0
- data/tests/destination_file.txt +1 -0
- data/tests/ex_ample.txt +1 -0
- data/tests/existing_file.txt +127 -0
- data/tests/lib_and_tests +0 -0
- data/tests/lib_and_tests.c +15920 -0
- data/tests/lib_and_tests.exe +0 -0
- data/tests/lib_and_tests32 +0 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_append_string_to_array.c +33 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_append_string_to_array_no_initial_alloc.c +51 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_array_total_string_length.c +25 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_arraydup.c +33 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_calculate_average_in_int_array.c +70 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_calculate_sum_in_int_array.c +47 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_common_prefix_length.c +23 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_common_suffix_length.c +23 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_concatenate_five_strings.c +32 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_concatenate_four_strings.c +39 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_concatenate_string_array.c +28 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_concatenate_strings.c +47 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_concatenate_three_strings.c +43 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_count_occurrences_of_substr.c +21 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_count_occurrences_of_substr_len.c +66 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_add.c +49 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_del_key.c +26 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_del_keys.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_del_values.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_destructor.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_get.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_get_check.c +75 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_hash.c +18 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_iter.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_new_instance.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_reserve_more.c +21 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_resize.c +8 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_size.c +79 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_to_array.c +26 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dict_to_string.c +29 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_dup_format.c +58 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_ends_with.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_char_ptrs.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_chars.c +53 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_double_ptrs.c +50 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_doubles.c +35 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_float_ptrs.c +36 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_floats.c +45 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_int_ptrs.c +51 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ints.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_long_long_ptrs.c +27 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_long_longs.c +53 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_long_ptrs.c +66 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_longs.c +47 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_short_ptrs.c +36 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_shorts.c +52 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_size_t_ptrs.c +62 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_size_ts.c +62 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_uchar_ptrs.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_uchars.c +60 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_uint_ptrs.c +37 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_uints.c +36 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ulong_long_ptrs.c +56 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ulong_longs.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ulong_ptrs.c +38 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ulongs.c +37 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ushort_ptrs.c +30 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_array_of_ushorts.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_equal_strings.c +45 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_filter.c +59 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_filter_int.c +39 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_find_first_of.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_find_last_of.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_find_max_int_in_array.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_find_min_int_in_array.c +58 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_first_non_repeating_char.c +42 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_format_string.c +68 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_free_array.c +63 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_free_string_array.c +50 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_del_keys.c +28 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_del_values.c +64 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_destructor.c +23 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_get.c +27 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_get_check.c +32 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_new_instance.c +23 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_size.c +33 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_to_array.c +51 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_dict_to_string.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_del_keys.c +35 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_destructor.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_in.c +70 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_iter.c +71 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_new_instance.c +26 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_size.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_to_array.c +70 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_frozen_set_to_string.c +52 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_generate_range.c +62 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_index_of_char.c +77 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_int_to_string.c +54 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_alphanumeric.c +50 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_array_digit.c +67 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_array_lower.c +52 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_array_upper.c +28 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_numeric.c +36 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_string_alpha.c +43 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_string_digit.c +54 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_string_lower.c +50 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_string_space.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_string_upper.c +72 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_valid_integer.c +16 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_is_valid_utf8.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_join.c +53 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_last_index_of_char.c +15 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_list_comprehension.c +95 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_list_comprehension_multithreaded.c +41 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_longest_common_prefix.c +35 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_longest_common_suffix.c +61 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_map.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_map_int.c +59 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_prepend_string_to_array.c +68 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_prepend_string_to_array_no_initial_alloc.c +57 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_rand_number_from_range_inclusive_signed.c +41 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_rand_number_from_range_inclusive_unsigned.c +23 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reduce.c +49 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reduce_int.c +44 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reject_array.c +47 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_replace_all.c +73 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_replace_all_with_callback.c +46 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_replace_all_with_lens.c +61 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_replicate.c +56 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reverse_int_array.c +58 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reverse_string.c +58 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reverse_string_in_place.c +60 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_reverse_words.c +58 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_sample_strings.c +48 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_select_array.c +29 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_add.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_del_key.c +29 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_del_keys.c +35 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_destructor.c +31 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_hash.c +44 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_in.c +52 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_iter.c +69 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_new_instance.c +30 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_reserve_more.c +36 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_resize.c +37 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_size.c +42 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_to_array.c +41 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_set_to_string.c +81 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_shellescape.c +53 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_shuffle_strings_in_place.c +39 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_split.c +64 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_starts_with.c +39 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_str_to_double.c +32 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_array_uniq.c +60 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_array_uniq_adjacent.c +54 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_to_int.c +55 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_to_json.c +98 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_to_lowercase.c +73 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_to_title_case.c +80 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_string_to_uppercase.c +78 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_strip.c +84 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/src/test_trim_chars.c +85 -0
- data/tests/more/experimental/third_test_suite/non_production_ready_test_suite/test_every_relevant_function_in_a_separate_thorough_program/work_in_progress_code/testall.sh +15 -0
- data/tests/run_test_suite.sh +117 -0
- data/tests/source_file.txt +1 -0
- data/tests/test_log.txt +1047 -0
- data/tools/FUTURE +18 -0
- data/tools/HEADERS.h +316 -0
- data/tools/HEADERS_ONLY_FUNCTIONS.h +284 -0
- data/tools/HEADERS_WITH_PREFIX.h +33 -0
- data/tools/RSUB_LICENSE.txt +25 -0
- data/tools/benchmark_libc.c +263 -0
- data/tools/deprecated/GENERATE_CUSTOM_FOUNDATIONALLIB.sh.old +67 -0
- data/tools/deps_for_testing.sh +23 -0
- data/tools/documentation_generate +17 -0
- data/tools/foundationallib.h +13999 -0
- data/tools/funcs_c +15858 -0
- data/tools/funcs_c_with_tests.c +15920 -0
- data/tools/gen_video_new +444 -0
- data/tools/gen_video_new_times +41 -0
- data/tools/generate_promo_video_for_library.rb +19 -0
- data/tools/index.html +147 -0
- data/tools/lib.html +20 -0
- data/tools/lib2.html +22 -0
- data/tools/lib3.html +22 -0
- data/tools/lynx.rb +145 -0
- data/tools/make_image_of_docs +741 -0
- data/tools/pic.png +0 -0
- data/tools/pic2.png +0 -0
- data/tools/pic3.png +0 -0
- data/tools/play_with_string_replace_functions.c +236 -0
- data/tools/rsub +0 -0
- data/tools/rsub.c +501 -0
- data/tools/run_lib +365 -0
- data/tools/update +44 -0
- data/tools/with_tests +0 -0
- data/tools/with_tests32 +0 -0
- data/transpile_slow_scripting_into_c.rb +225 -0
- metadata +693 -0
@@ -0,0 +1,72 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
|
3
|
+
#include <assert.h>
|
4
|
+
#include <stdio.h>
|
5
|
+
|
6
|
+
FOUNDATIONAL_LIB_FUNC int is_string_upper(const char *str)
|
7
|
+
{
|
8
|
+
if (str == NULL)
|
9
|
+
{
|
10
|
+
return 0;
|
11
|
+
}
|
12
|
+
|
13
|
+
while (*str)
|
14
|
+
{
|
15
|
+
if (!(*str >= 'A' && *str <= 'Z'))
|
16
|
+
{
|
17
|
+
return 0;
|
18
|
+
}
|
19
|
+
str++;
|
20
|
+
}
|
21
|
+
return 1;
|
22
|
+
}
|
23
|
+
|
24
|
+
void test_is_string_upper()
|
25
|
+
{
|
26
|
+
// Test with empty string
|
27
|
+
assert(is_string_upper("") == 1);
|
28
|
+
|
29
|
+
// Test with all uppercase string
|
30
|
+
assert(is_string_upper("HELLO") == 1);
|
31
|
+
|
32
|
+
// Test with mixed case string
|
33
|
+
assert(is_string_upper("Hello") == 0);
|
34
|
+
|
35
|
+
// Test with lowercase string
|
36
|
+
assert(is_string_upper("hello") == 0);
|
37
|
+
|
38
|
+
// Test with special characters
|
39
|
+
assert(is_string_upper("!@#$%") == 0);
|
40
|
+
|
41
|
+
// Test with NULL input
|
42
|
+
assert(is_string_upper(NULL) == 0);
|
43
|
+
|
44
|
+
// Test with long uppercase string
|
45
|
+
char long_upper[1000];
|
46
|
+
for (int i = 0; i < 1000; i++)
|
47
|
+
{
|
48
|
+
long_upper[i] = 'A';
|
49
|
+
}
|
50
|
+
long_upper[1000] = '\0';
|
51
|
+
assert(is_string_upper(long_upper) == 1);
|
52
|
+
|
53
|
+
// Test with long mixed case string
|
54
|
+
char long_mixed[1000];
|
55
|
+
for (int i = 0; i < 500; i++)
|
56
|
+
{
|
57
|
+
long_mixed[i] = 'A';
|
58
|
+
}
|
59
|
+
for (int i = 500; i < 1000; i++)
|
60
|
+
{
|
61
|
+
long_mixed[i] = 'a';
|
62
|
+
}
|
63
|
+
long_mixed[1000] = '\0';
|
64
|
+
assert(is_string_upper(long_mixed) == 0);
|
65
|
+
}
|
66
|
+
|
67
|
+
int main()
|
68
|
+
{
|
69
|
+
test_is_string_upper();
|
70
|
+
printf("All tests passed successfully.\n");
|
71
|
+
return 0;
|
72
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
|
3
|
+
#include <assert.h>
|
4
|
+
#include <stdio.h>
|
5
|
+
int main()
|
6
|
+
{
|
7
|
+
assert(is_valid_integer("123456") == 1);
|
8
|
+
assert(is_valid_integer("-123456") == 0);
|
9
|
+
assert(is_valid_integer("12a3456") == 0);
|
10
|
+
assert(is_valid_integer("0") == 1);
|
11
|
+
assert(is_valid_integer("12345678901234567890") == 1);
|
12
|
+
assert(is_valid_integer("") == 0);
|
13
|
+
|
14
|
+
printf("All tests pass!\n");
|
15
|
+
return 0;
|
16
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stddef.h>
|
4
|
+
// Tests for valid UTF-8 sequences
|
5
|
+
void test_valid_utf8_sequences()
|
6
|
+
{
|
7
|
+
const char *valid_sequences[] = {
|
8
|
+
"Hello, world!", "UTF-8 is awesome 😊", "こんにちは",
|
9
|
+
"\xF0\x9F\x98\x8A", // Unicode "grinning face with smiling eyes" emoji
|
10
|
+
"\xE2\x82\xAC", // Euro sign
|
11
|
+
"\xE2\x82\xA1" // Unassigned code point
|
12
|
+
};
|
13
|
+
|
14
|
+
for (size_t i = 0; i < sizeof(valid_sequences) / sizeof(valid_sequences[0]); i++)
|
15
|
+
{
|
16
|
+
assert(is_valid_utf8(valid_sequences[i], len) == 1);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
// Tests for invalid UTF-8 sequences
|
21
|
+
void test_invalid_utf8_sequences()
|
22
|
+
{
|
23
|
+
const char *invalid_sequences[] = {
|
24
|
+
"Hello, \xF0\x9F\x98 world!", // Invalid continuation byte
|
25
|
+
"UTF-8 is awesome \xF0", // Incomplete encoding
|
26
|
+
"こんにちは\x80", // Overlong encoding
|
27
|
+
"Broken \xED\xA0\x80\xED\xB0\x80 sequence", // Surrogate pair
|
28
|
+
"This is not \xC0\xAFbinary",
|
29
|
+
"This is \xC0z", // Overlong encoding
|
30
|
+
"This is \xE0\x80\x80", // Overlong encoding
|
31
|
+
"This is \xF4\x90\x80\x80", // Code point > U+10FFFF
|
32
|
+
"This is \xF8A00000" // Code point > U+10FFFF
|
33
|
+
};
|
34
|
+
|
35
|
+
for (size_t i = 0; i < sizeof(invalid_sequences) / sizeof(invalid_sequences[0]); i++)
|
36
|
+
{
|
37
|
+
assert(is_valid_utf8(invalid_sequences[i], len) == 0);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
int main()
|
42
|
+
{
|
43
|
+
test_valid_utf8_sequences();
|
44
|
+
test_invalid_utf8_sequences();
|
45
|
+
return 0;
|
46
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
#include <string.h>
|
6
|
+
void test_join()
|
7
|
+
{
|
8
|
+
const char *array1[] = {"hello", "world", "good", "morning"};
|
9
|
+
const char *delimiter1 = ",";
|
10
|
+
char *expected_result1 = "hello,world,good,morning";
|
11
|
+
char *result1 = join(array1, 4, delimiter1);
|
12
|
+
assert(strcmp(result1, expected_result1) == 0);
|
13
|
+
free(result1);
|
14
|
+
|
15
|
+
const char *array2[] = {"apple", "orange"};
|
16
|
+
const char *delimiter2 = "|";
|
17
|
+
char *expected_result2 = "apple|orange";
|
18
|
+
char *result2 = join(array2, 2, delimiter2);
|
19
|
+
assert(strcmp(result2, expected_result2) == 0);
|
20
|
+
free(result2);
|
21
|
+
|
22
|
+
const char *array3[] = {"This", "is", "a", "test"};
|
23
|
+
const char *delimiter3 = " ";
|
24
|
+
char *expected_result3 = "This is a test";
|
25
|
+
char *result3 = join(array3, 4, delimiter3);
|
26
|
+
assert(strcmp(result3, expected_result3) == 0);
|
27
|
+
free(result3);
|
28
|
+
|
29
|
+
const char *array4[] = {"Hello"};
|
30
|
+
const char *delimiter4 = "-";
|
31
|
+
char *expected_result4 = "Hello";
|
32
|
+
char *result4 = join(array4, 1, delimiter4);
|
33
|
+
assert(strcmp(result4, expected_result4) == 0);
|
34
|
+
free(result4);
|
35
|
+
|
36
|
+
const char *array5[] = {""};
|
37
|
+
const char *delimiter5 = ":";
|
38
|
+
char *expected_result5 = "";
|
39
|
+
char *result5 = join(array5, 1, delimiter5);
|
40
|
+
assert(strcmp(result5, expected_result5) == 0);
|
41
|
+
free(result5);
|
42
|
+
|
43
|
+
const char *array6[] = {NULL, "world", "hello"};
|
44
|
+
const char *delimiter6 = " ";
|
45
|
+
char *result6 = join(array6, 3, delimiter6);
|
46
|
+
assert(result6 == NULL);
|
47
|
+
}
|
48
|
+
|
49
|
+
int main()
|
50
|
+
{
|
51
|
+
test_join();
|
52
|
+
return 0;
|
53
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
int main()
|
4
|
+
{
|
5
|
+
// Test cases
|
6
|
+
assert(last_index_of_char("hello", 'l') == 3);
|
7
|
+
assert(last_index_of_char("hello", 'o') == 4);
|
8
|
+
assert(last_index_of_char("hello", 'h') == 0);
|
9
|
+
assert(last_index_of_char("hello", 'z') == -1);
|
10
|
+
assert(last_index_of_char("", 'a') == -1);
|
11
|
+
assert(last_index_of_char("hello", '\0') == -1);
|
12
|
+
|
13
|
+
printf("All tests passed!\n");
|
14
|
+
return 0;
|
15
|
+
}
|
@@ -0,0 +1,95 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
#include <string.h>
|
6
|
+
|
7
|
+
// Define the function signature for list_comprehension
|
8
|
+
typedef void *(*LIST_COMP_FUNC)(const void *, size_t, size_t, void (*)(void *), int (*)(void *), size_t *);
|
9
|
+
|
10
|
+
// Function to test list_comprehension with integers
|
11
|
+
void test_list_comprehension_integers(LIST_COMP_FUNC func)
|
12
|
+
{
|
13
|
+
size_t input[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
|
14
|
+
size_t input_size = sizeof(input) / sizeof(input[0]);
|
15
|
+
|
16
|
+
void square_transform(void *value)
|
17
|
+
{
|
18
|
+
size_t *num = (size_t *)value;
|
19
|
+
*num = (*num) * (*num);
|
20
|
+
}
|
21
|
+
|
22
|
+
int odd_filter(void *value)
|
23
|
+
{
|
24
|
+
size_t *num = (size_t *)value;
|
25
|
+
return (*num) % 2 != 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
size_t result_size;
|
29
|
+
size_t *result = (size_t *)func(input, input_size, sizeof(size_t), square_transform, odd_filter, &result_size);
|
30
|
+
|
31
|
+
size_t expected_result[] = {1, 9, 25, 49, 81};
|
32
|
+
size_t expected_result_size = sizeof(expected_result) / sizeof(expected_result[0]);
|
33
|
+
|
34
|
+
assert(result_size == expected_result_size);
|
35
|
+
for (int i = 0; i < result_size; i++)
|
36
|
+
{
|
37
|
+
assert(result[i] == expected_result[i]);
|
38
|
+
}
|
39
|
+
|
40
|
+
free(result);
|
41
|
+
}
|
42
|
+
|
43
|
+
// Function to test list_comprehension with strings
|
44
|
+
void test_list_comprehension_strings(LIST_COMP_FUNC func)
|
45
|
+
{
|
46
|
+
const char *words[] = {"apple", "banana", "orange", "grape", "kiwi"};
|
47
|
+
size_t words_size = sizeof(words) / sizeof(words[0]);
|
48
|
+
|
49
|
+
void uppercase_transform(void *value)
|
50
|
+
{
|
51
|
+
char **str = (char **)value;
|
52
|
+
for (int i = 0; (*str)[i]; ++i)
|
53
|
+
{
|
54
|
+
(*str)[i] = toupper((*str)[i]);
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
int exclude_a_filter(void *value)
|
59
|
+
{
|
60
|
+
char **str = (char **)value;
|
61
|
+
return (*str)[0] != 'a' && (*str)[0] != 'A';
|
62
|
+
}
|
63
|
+
|
64
|
+
size_t result_size;
|
65
|
+
char **result = (char **)func(words, words_size, sizeof(char *), uppercase_transform, exclude_a_filter, &result_size);
|
66
|
+
|
67
|
+
const char *expected_result[] = {"ORANGE", "GRAPE", "KIWI"};
|
68
|
+
size_t expected_result_size = sizeof(expected_result) / sizeof(expected_result[0]);
|
69
|
+
|
70
|
+
assert(result_size == expected_result_size);
|
71
|
+
for (int i = 0; i < result_size; i++)
|
72
|
+
{
|
73
|
+
assert(strcmp(result[i], expected_result[i]) == 0);
|
74
|
+
}
|
75
|
+
|
76
|
+
for (int i = 0; i < result_size; i++)
|
77
|
+
{
|
78
|
+
free(result[i]);
|
79
|
+
}
|
80
|
+
free(result);
|
81
|
+
}
|
82
|
+
|
83
|
+
int main()
|
84
|
+
{
|
85
|
+
// Test list_comprehension with integers
|
86
|
+
printf("Testing list_comprehension with integers...\n");
|
87
|
+
test_list_comprehension_integers(list_comprehension);
|
88
|
+
|
89
|
+
// Test list_comprehension with strings
|
90
|
+
printf("Testing list_comprehension with strings...\n");
|
91
|
+
test_list_comprehension_strings(list_comprehension);
|
92
|
+
|
93
|
+
printf("All tests passed successfully.\n");
|
94
|
+
return 0;
|
95
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
|
3
|
+
#include <assert.h>
|
4
|
+
#include <stdio.h>
|
5
|
+
#include <stdlib.h>
|
6
|
+
void transform_function(void *value)
|
7
|
+
{
|
8
|
+
int *val = (int *)value;
|
9
|
+
*val = *val * 2;
|
10
|
+
}
|
11
|
+
|
12
|
+
int filter_function(void *value)
|
13
|
+
{
|
14
|
+
int *val = (int *)value;
|
15
|
+
return *val % 2 == 0;
|
16
|
+
}
|
17
|
+
|
18
|
+
void test_list_comprehension_multithreaded()
|
19
|
+
{
|
20
|
+
size_t input_array[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
|
21
|
+
size_t array_size = sizeof(input_array) / sizeof(input_array[0]);
|
22
|
+
size_t elem_size = sizeof(input_array[0]);
|
23
|
+
size_t result_size;
|
24
|
+
|
25
|
+
int expected_output[] = {4, 8, 12, 16, 20};
|
26
|
+
void *result = list_comprehension_multithreaded(input_array, array_size, elem_size, transform_function, filter_function, &result_size, 2);
|
27
|
+
|
28
|
+
assert(result_size == sizeof(expected_output) / sizeof(expected_output[0]));
|
29
|
+
for (size_t i = 0; i < result_size; i++)
|
30
|
+
{
|
31
|
+
assert(*(int *)(result + (i * elem_size)) == expected_output[i]);
|
32
|
+
}
|
33
|
+
|
34
|
+
free(result);
|
35
|
+
}
|
36
|
+
|
37
|
+
int main()
|
38
|
+
{
|
39
|
+
test_list_comprehension_multithreaded();
|
40
|
+
return 0;
|
41
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
void test_longest_common_prefix()
|
4
|
+
{
|
5
|
+
const char *input1[] = {"flower", "flow", "flight"};
|
6
|
+
char *result1 = longest_common_prefix(input1, 3);
|
7
|
+
assert(strcmp(result1, "fl") == 0);
|
8
|
+
free(result1);
|
9
|
+
|
10
|
+
const char *input2[] = {"dog", "racecar", "car"};
|
11
|
+
char *result2 = longest_common_prefix(input2, 3);
|
12
|
+
assert(result2 == NULL);
|
13
|
+
|
14
|
+
const char *input3[] = {"", "abc", "def"};
|
15
|
+
char *result3 = longest_common_prefix(input3, 3);
|
16
|
+
assert(strcmp(result3, "") == 0);
|
17
|
+
free(result3);
|
18
|
+
|
19
|
+
const char *input4[] = {"", "", ""};
|
20
|
+
char *result4 = longest_common_prefix(input4, 3);
|
21
|
+
assert(strcmp(result4, "") == 0);
|
22
|
+
free(result4);
|
23
|
+
|
24
|
+
const char *input5[] = {"abcd", "abcd", "abcd"};
|
25
|
+
char *result5 = longest_common_prefix(input5, 3);
|
26
|
+
assert(strcmp(result5, "abcd") == 0);
|
27
|
+
free(result5);
|
28
|
+
}
|
29
|
+
|
30
|
+
int main()
|
31
|
+
{
|
32
|
+
test_longest_common_prefix();
|
33
|
+
printf("All tests passed!\n");
|
34
|
+
return 0;
|
35
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <string.h>
|
4
|
+
|
5
|
+
// Define this if the function is part of a library
|
6
|
+
|
7
|
+
// Function to test
|
8
|
+
FOUNDATIONAL_LIB_FUNC char *longest_common_suffix(const char **strings, size_t count);
|
9
|
+
|
10
|
+
// Test cases
|
11
|
+
void testSingleString()
|
12
|
+
{
|
13
|
+
const char *input[] = {"hello"};
|
14
|
+
char *result = longest_common_suffix(input, 1);
|
15
|
+
assert(strcmp(result, "hello") == 0);
|
16
|
+
free(result);
|
17
|
+
}
|
18
|
+
|
19
|
+
void testEmptyStrings()
|
20
|
+
{
|
21
|
+
const char *input[] = {"", "", ""};
|
22
|
+
char *result = longest_common_suffix(input, 3);
|
23
|
+
assert(strcmp(result, "") == 0);
|
24
|
+
free(result);
|
25
|
+
}
|
26
|
+
|
27
|
+
void testNoCommonSuffix()
|
28
|
+
{
|
29
|
+
const char *input[] = {"hello", "world", "foo"};
|
30
|
+
char *result = longest_common_suffix(input, 3);
|
31
|
+
assert(strcmp(result, "") == 0);
|
32
|
+
free(result);
|
33
|
+
}
|
34
|
+
|
35
|
+
void testCommonSuffix()
|
36
|
+
{
|
37
|
+
const char *input[] = {"testing", "ing", "string"};
|
38
|
+
char *result = longest_common_suffix(input, 3);
|
39
|
+
assert(strcmp(result, "ing") == 0);
|
40
|
+
free(result);
|
41
|
+
}
|
42
|
+
|
43
|
+
void testLongestCommonSuffix()
|
44
|
+
{
|
45
|
+
const char *input[] = {"apple", "people", "staple"};
|
46
|
+
char *result = longest_common_suffix(input, 3);
|
47
|
+
assert(strcmp(result, "ple") == 0);
|
48
|
+
free(result);
|
49
|
+
}
|
50
|
+
|
51
|
+
int main()
|
52
|
+
{
|
53
|
+
testSingleString();
|
54
|
+
testEmptyStrings();
|
55
|
+
testNoCommonSuffix();
|
56
|
+
testCommonSuffix();
|
57
|
+
testLongestCommonSuffix();
|
58
|
+
|
59
|
+
printf("All tests passed!\n");
|
60
|
+
return 0;
|
61
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
|
6
|
+
void map(void *array, size_t size, size_t elem_size, void (*transform)(void *));
|
7
|
+
|
8
|
+
void increment_transform(void *element) { (*(int *)element)++; }
|
9
|
+
|
10
|
+
void double_transform(void *element) { (*(double *)element) *= 2; }
|
11
|
+
|
12
|
+
void test_map()
|
13
|
+
{
|
14
|
+
int int_array[] = {1, 2, 3, 4, 5};
|
15
|
+
double double_array[] = {1.5, 2.5, 3.5, 4.5, 5.5};
|
16
|
+
const size_t int_size = sizeof(int);
|
17
|
+
const size_t double_size = sizeof(double);
|
18
|
+
|
19
|
+
// Test with increment_transform on int_array
|
20
|
+
map(int_array, 5, int_size, increment_transform);
|
21
|
+
assert(int_array[0] == 2);
|
22
|
+
assert(int_array[1] == 3);
|
23
|
+
assert(int_array[2] == 4);
|
24
|
+
assert(int_array[3] == 5);
|
25
|
+
assert(int_array[4] == 6);
|
26
|
+
|
27
|
+
// Test with double_transform on double_array
|
28
|
+
map(double_array, 5, double_size, double_transform);
|
29
|
+
assert(double_array[0] == 3.0);
|
30
|
+
assert(double_array[1] == 5.0);
|
31
|
+
assert(double_array[2] == 7.0);
|
32
|
+
assert(double_array[3] == 9.0);
|
33
|
+
assert(double_array[4] == 11.0);
|
34
|
+
|
35
|
+
// Test with increment_transform on empty array
|
36
|
+
int *empty_array = NULL;
|
37
|
+
map(empty_array, 0, int_size, increment_transform);
|
38
|
+
assert(empty_array == NULL);
|
39
|
+
}
|
40
|
+
|
41
|
+
int main()
|
42
|
+
{
|
43
|
+
test_map();
|
44
|
+
printf("All tests passed successfully!\n");
|
45
|
+
return 0;
|
46
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
|
3
|
+
#define _CRT_SECURE_NO_WARNINGS
|
4
|
+
#include <assert.h>
|
5
|
+
#include <stdio.h>
|
6
|
+
|
7
|
+
// Function to be tested
|
8
|
+
void map_int(int *array, size_t size, int (*transform)(int))
|
9
|
+
{
|
10
|
+
for (size_t i = 0; i < size; i++)
|
11
|
+
{
|
12
|
+
array[i] = transform(array[i]);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
// Test suite
|
17
|
+
void test_map_int()
|
18
|
+
{
|
19
|
+
// Test case 1: Test with an empty array
|
20
|
+
int empty_array[] = {};
|
21
|
+
map_int(empty_array, 0, NULL); // No transformation function, should not crash
|
22
|
+
|
23
|
+
// Test case 2: Test with positive numbers
|
24
|
+
int positive_array[] = {1, 2, 3, 4, 5};
|
25
|
+
map_int(positive_array, 5, NULL); // No transformation function, should not crash
|
26
|
+
assert(positive_array[0] == 1);
|
27
|
+
assert(positive_array[1] == 2);
|
28
|
+
assert(positive_array[2] == 3);
|
29
|
+
assert(positive_array[3] == 4);
|
30
|
+
assert(positive_array[4] == 5);
|
31
|
+
|
32
|
+
// Test case 3: Test with a transformation function
|
33
|
+
int square_array[] = {1, 2, 3, 4, 5};
|
34
|
+
map_int(square_array, 5, square_transform); // User-defined transformation function
|
35
|
+
assert(square_array[0] == 1);
|
36
|
+
assert(square_array[1] == 4);
|
37
|
+
assert(square_array[2] == 9);
|
38
|
+
assert(square_array[3] == 16);
|
39
|
+
assert(square_array[4] == 25);
|
40
|
+
|
41
|
+
// Test case 4: Test with negative numbers
|
42
|
+
int negative_array[] = {-1, -2, -3, -4, -5};
|
43
|
+
map_int(negative_array, 5, NULL); // No transformation function, should not crash
|
44
|
+
assert(negative_array[0] == -1);
|
45
|
+
assert(negative_array[1] == -2);
|
46
|
+
assert(negative_array[2] == -3);
|
47
|
+
assert(negative_array[3] == -4);
|
48
|
+
assert(negative_array[4] == -5);
|
49
|
+
}
|
50
|
+
|
51
|
+
// User-defined transformation function
|
52
|
+
int square_transform(int x) { return x * x; }
|
53
|
+
|
54
|
+
int main()
|
55
|
+
{
|
56
|
+
test_map_int();
|
57
|
+
printf("All tests passed!\n");
|
58
|
+
return 0;
|
59
|
+
}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
#include <string.h>
|
6
|
+
|
7
|
+
int prepend_string_to_array(const char ***array, size_t *array_size, size_t *array_current_alloc_size, const char *string)
|
8
|
+
{
|
9
|
+
if (*array_size >= *array_current_alloc_size)
|
10
|
+
{
|
11
|
+
size_t new_size = *array_current_alloc_size == 0 ? 1 : *array_current_alloc_size * 2;
|
12
|
+
const char **new_array = realloc(*array, new_size * sizeof(const char *));
|
13
|
+
if (!new_array)
|
14
|
+
{
|
15
|
+
return -1; // Realloc failed
|
16
|
+
}
|
17
|
+
*array = new_array;
|
18
|
+
*array_current_alloc_size = new_size;
|
19
|
+
}
|
20
|
+
|
21
|
+
memmove(*array + 1, *array, *array_size * sizeof(const char *)); // Shift existing elements
|
22
|
+
(*array)[0] = strdup(string);
|
23
|
+
(*array_size)++;
|
24
|
+
|
25
|
+
return 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
void test_prepend_string()
|
29
|
+
{
|
30
|
+
const char **array = NULL;
|
31
|
+
size_t array_size = 0;
|
32
|
+
size_t array_current_alloc_size = 0;
|
33
|
+
|
34
|
+
// Test prepending to an empty array
|
35
|
+
prepend_string_to_array(&array, &array_size, &array_current_alloc_size, "first");
|
36
|
+
assert(array_size == 1);
|
37
|
+
assert(array_current_alloc_size >= 1);
|
38
|
+
assert(strcmp(array[0], "first") == 0);
|
39
|
+
|
40
|
+
// Test prepending to a non-empty array
|
41
|
+
prepend_string_to_array(&array, &array_size, &array_current_alloc_size, "second");
|
42
|
+
assert(array_size == 2);
|
43
|
+
assert(array_current_alloc_size >= 2);
|
44
|
+
assert(strcmp(array[0], "second") == 0);
|
45
|
+
assert(strcmp(array[1], "first") == 0);
|
46
|
+
|
47
|
+
// Test prepending to a full array
|
48
|
+
prepend_string_to_array(&array, &array_size, &array_current_alloc_size, "third");
|
49
|
+
assert(array_size == 3);
|
50
|
+
assert(array_current_alloc_size >= 3);
|
51
|
+
assert(strcmp(array[0], "third") == 0);
|
52
|
+
assert(strcmp(array[1], "second") == 0);
|
53
|
+
assert(strcmp(array[2], "first") == 0);
|
54
|
+
|
55
|
+
// Clean up
|
56
|
+
for (size_t i = 0; i < array_size; i++)
|
57
|
+
{
|
58
|
+
free((void *)array[i]);
|
59
|
+
}
|
60
|
+
free(array);
|
61
|
+
}
|
62
|
+
|
63
|
+
int main()
|
64
|
+
{
|
65
|
+
test_prepend_string();
|
66
|
+
printf("All tests passed successfully\n");
|
67
|
+
return 0;
|
68
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
#include <string.h>
|
6
|
+
|
7
|
+
/* The function to be tested */
|
8
|
+
FOUNDATIONAL_LIB_FUNC int prepend_string_to_array_no_initial_alloc(const char ***array, size_t *array_size, size_t *array_current_alloc_size, const char *string)
|
9
|
+
{
|
10
|
+
// Implementation of the function
|
11
|
+
}
|
12
|
+
|
13
|
+
/* Test for adding a string to an empty array */
|
14
|
+
void test_prepend_to_empty_array()
|
15
|
+
{
|
16
|
+
const char **array = NULL;
|
17
|
+
size_t array_size = 0;
|
18
|
+
size_t array_current_alloc_size = 0;
|
19
|
+
const char *new_string = "test";
|
20
|
+
|
21
|
+
prepend_string_to_array_no_initial_alloc(&array, &array_size, &array_current_alloc_size, new_string);
|
22
|
+
|
23
|
+
assert(array_size == 1);
|
24
|
+
assert(array_current_alloc_size >= 1);
|
25
|
+
assert(strcmp(array[0], new_string) == 0);
|
26
|
+
|
27
|
+
free(array);
|
28
|
+
}
|
29
|
+
|
30
|
+
/* Test for adding a string to a non-empty array */
|
31
|
+
void test_prepend_to_non_empty_array()
|
32
|
+
{
|
33
|
+
const char *initial_array[] = {"existing1", "existing2"};
|
34
|
+
const char **array = initial_array;
|
35
|
+
size_t array_size = 2;
|
36
|
+
size_t array_current_alloc_size = 2;
|
37
|
+
const char *new_string = "test";
|
38
|
+
|
39
|
+
prepend_string_to_array_no_initial_alloc(&array, &array_size, &array_current_alloc_size, new_string);
|
40
|
+
|
41
|
+
assert(array_size == 3);
|
42
|
+
assert(array_current_alloc_size >= 3);
|
43
|
+
assert(strcmp(array[0], new_string) == 0);
|
44
|
+
assert(strcmp(array[1], "existing1") == 0);
|
45
|
+
assert(strcmp(array[2], "existing2") == 0);
|
46
|
+
|
47
|
+
free(array);
|
48
|
+
}
|
49
|
+
|
50
|
+
int main()
|
51
|
+
{
|
52
|
+
test_prepend_to_empty_array();
|
53
|
+
test_prepend_to_non_empty_array();
|
54
|
+
|
55
|
+
printf("All tests passed!\n");
|
56
|
+
return 0;
|
57
|
+
}
|