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,41 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
|
6
|
+
FOUNDATIONAL_LIB_FUNC long rand_number_from_range_inclusive_signed(signed long min, signed long max) { return min + rand() % (max - min + 1); }
|
7
|
+
|
8
|
+
int main()
|
9
|
+
{
|
10
|
+
// Test for range [-10, 10]
|
11
|
+
for (int i = 0; i < 1000; i++)
|
12
|
+
{
|
13
|
+
long num = rand_number_from_range_inclusive_signed(-10, 10);
|
14
|
+
assert(num >= -10 && num <= 10);
|
15
|
+
}
|
16
|
+
|
17
|
+
// Test for range [0, 100]
|
18
|
+
for (int i = 0; i < 1000; i++)
|
19
|
+
{
|
20
|
+
long num = rand_number_from_range_inclusive_signed(0, 100);
|
21
|
+
assert(num >= 0 && num <= 100);
|
22
|
+
}
|
23
|
+
|
24
|
+
// Test for range [-100, 0]
|
25
|
+
for (int i = 0; i < 1000; i++)
|
26
|
+
{
|
27
|
+
long num = rand_number_from_range_inclusive_signed(-100, 0);
|
28
|
+
assert(num >= -100 && num <= 0);
|
29
|
+
}
|
30
|
+
|
31
|
+
// Test for range [-10000, 10000]
|
32
|
+
for (int i = 0; i < 1000; i++)
|
33
|
+
{
|
34
|
+
long num = rand_number_from_range_inclusive_signed(-10000, 10000);
|
35
|
+
assert(num >= -10000 && num <= 10000);
|
36
|
+
}
|
37
|
+
|
38
|
+
printf("All tests passed successfully!\n");
|
39
|
+
|
40
|
+
return 0;
|
41
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
void test_rand_number_from_range_inclusive_unsigned()
|
5
|
+
{
|
6
|
+
// Test with min equal to max
|
7
|
+
assert(rand_number_from_range_inclusive_unsigned(5, 5) == 5);
|
8
|
+
|
9
|
+
// Test with min less than max
|
10
|
+
unsigned long result = rand_number_from_range_inclusive_unsigned(5, 10);
|
11
|
+
assert(result >= 5 && result <= 10);
|
12
|
+
|
13
|
+
// Test with min greater than max
|
14
|
+
result = rand_number_from_range_inclusive_unsigned(10, 5);
|
15
|
+
assert(result >= 5 && result <= 10);
|
16
|
+
}
|
17
|
+
|
18
|
+
int main()
|
19
|
+
{
|
20
|
+
test_rand_number_from_range_inclusive_unsigned();
|
21
|
+
printf("All tests passed successfully!\n");
|
22
|
+
return 0;
|
23
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
|
3
|
+
#include <assert.h>
|
4
|
+
#include <stddef.h>
|
5
|
+
#include <stdio.h>
|
6
|
+
|
7
|
+
void reduce(void *array, size_t size, size_t elem_size, void *result, void (*operation)(void *, void *));
|
8
|
+
|
9
|
+
// Define binary operation function for testing
|
10
|
+
void test_sum_operation(void *element1, void *element2) { (*(int *)element1) += (*(int *)element2); }
|
11
|
+
|
12
|
+
int main()
|
13
|
+
{
|
14
|
+
int test_array[] = {1, 2, 3, 4, 5};
|
15
|
+
int test_result = 0;
|
16
|
+
|
17
|
+
// Test case 1: Reduce operation with sum binary function
|
18
|
+
reduce(test_array, 5, sizeof(int), &test_result, test_sum_operation);
|
19
|
+
assert(test_result == 15);
|
20
|
+
|
21
|
+
// Test case 2: Reduce operation with product binary function
|
22
|
+
void test_product_operation(void *element1, void *element2) { (*(int *)element1) *= (*(int *)element2); }
|
23
|
+
test_result = 1;
|
24
|
+
reduce(test_array, 5, sizeof(int), &test_result, test_product_operation);
|
25
|
+
assert(test_result == 120);
|
26
|
+
|
27
|
+
// Test case 3: Reduce operation with max binary function
|
28
|
+
void test_max_operation(void *element1, void *element2)
|
29
|
+
{
|
30
|
+
if ((*(int *)element2) > (*(int *)element1))
|
31
|
+
{
|
32
|
+
(*(int *)element1) = (*(int *)element2);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
test_result = 0;
|
36
|
+
reduce(test_array, 5, sizeof(int), &test_result, test_max_operation);
|
37
|
+
assert(test_result == 5);
|
38
|
+
|
39
|
+
// Add more test cases for corner cases, edge cases, and boundary cases
|
40
|
+
|
41
|
+
printf("All tests passed successfully!\n");
|
42
|
+
|
43
|
+
return 0;
|
44
|
+
}
|
45
|
+
|
46
|
+
void reduce(void *array, size_t size, size_t elem_size, void *result, void (*operation)(void *, void *))
|
47
|
+
{
|
48
|
+
// Implementation of reduce function
|
49
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
|
4
|
+
FOUNDATIONAL_LIB_FUNC int reduce_int(int *array, size_t size, int (*operation)(int, int))
|
5
|
+
{
|
6
|
+
int result = array[0];
|
7
|
+
for (size_t i = 1; i < size; i++)
|
8
|
+
{
|
9
|
+
result = operation(result, array[i]);
|
10
|
+
}
|
11
|
+
return result;
|
12
|
+
}
|
13
|
+
|
14
|
+
// Test cases
|
15
|
+
void test_add_operation()
|
16
|
+
{
|
17
|
+
int test_array[] = {1, 2, 3, 4, 5};
|
18
|
+
int result = reduce_int(test_array, 5, add_operation);
|
19
|
+
assert(result == 15);
|
20
|
+
}
|
21
|
+
|
22
|
+
void test_multiply_operation()
|
23
|
+
{
|
24
|
+
int test_array[] = {1, 2, 3, 4, 5};
|
25
|
+
int result = reduce_int(test_array, 5, multiply_operation);
|
26
|
+
assert(result == 120);
|
27
|
+
}
|
28
|
+
|
29
|
+
int main()
|
30
|
+
{
|
31
|
+
// Run test cases
|
32
|
+
test_add_operation();
|
33
|
+
test_multiply_operation();
|
34
|
+
|
35
|
+
printf("All test cases passed!\n");
|
36
|
+
|
37
|
+
return 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
// Example binary operation function: addition
|
41
|
+
int add_operation(int x, int y) { return x + y; }
|
42
|
+
|
43
|
+
// Example binary operation function: multiplication
|
44
|
+
int multiply_operation(int x, int y) { return x * y; }
|
@@ -0,0 +1,47 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
// Define a condition function for testing
|
6
|
+
int is_even(const void *element)
|
7
|
+
{
|
8
|
+
const int *value = (const int *)element;
|
9
|
+
return *value % 2 != 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
// Define the test suite
|
13
|
+
void test_reject_array()
|
14
|
+
{
|
15
|
+
// Test case 1: Reject all elements
|
16
|
+
{
|
17
|
+
int source[] = {1, 3, 5};
|
18
|
+
size_t source_size = sizeof(source) / sizeof(source[0]);
|
19
|
+
size_t result_size;
|
20
|
+
int *result = reject_array(source, source_size, sizeof(int), is_even, &result_size);
|
21
|
+
assert(result_size == 0);
|
22
|
+
free(result);
|
23
|
+
}
|
24
|
+
|
25
|
+
// Test case 2: Reject no elements
|
26
|
+
{
|
27
|
+
int source[] = {2, 4, 6};
|
28
|
+
size_t source_size = sizeof(source) / sizeof(source[0]);
|
29
|
+
size_t result_size;
|
30
|
+
int *result = reject_array(source, source_size, sizeof(int), is_even, &result_size);
|
31
|
+
assert(result_size == source_size);
|
32
|
+
for (size_t i = 0; i < result_size; i++)
|
33
|
+
{
|
34
|
+
assert(result[i] == source[i]);
|
35
|
+
}
|
36
|
+
free(result);
|
37
|
+
}
|
38
|
+
|
39
|
+
// Additional test cases can be added here
|
40
|
+
}
|
41
|
+
|
42
|
+
int main()
|
43
|
+
{
|
44
|
+
test_reject_array();
|
45
|
+
printf("All tests pass!\n");
|
46
|
+
return 0;
|
47
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
|
3
|
+
#include <assert.h>
|
4
|
+
#include <stdio.h>
|
5
|
+
#include <stdlib.h>
|
6
|
+
#include <string.h>
|
7
|
+
void test_replace_all()
|
8
|
+
{
|
9
|
+
char *input1 = "Hello, world!";
|
10
|
+
char *input2 = "aaa";
|
11
|
+
char *input3 = "abcdabcd";
|
12
|
+
char *input4 = "abcdabcdabcd";
|
13
|
+
char *input5 = "abcdabcdabcdabcd";
|
14
|
+
char *input6 = "";
|
15
|
+
char *input7 = "xyz";
|
16
|
+
char *input8 = "mississippi";
|
17
|
+
|
18
|
+
char *old_substring = "world";
|
19
|
+
char *new_substring = "universe";
|
20
|
+
char *result1 = replace_all(input1, old_substring, new_substring);
|
21
|
+
assert(strcmp(result1, "Hello, universe!") == 0);
|
22
|
+
free(result1);
|
23
|
+
|
24
|
+
old_substring = "aa";
|
25
|
+
new_substring = "bb";
|
26
|
+
char *result2 = replace_all(input2, old_substring, new_substring);
|
27
|
+
assert(strcmp(result2, "bb") == 0);
|
28
|
+
free(result2);
|
29
|
+
|
30
|
+
old_substring = "abcd";
|
31
|
+
new_substring = "xy";
|
32
|
+
char *result3 = replace_all(input3, old_substring, new_substring);
|
33
|
+
assert(strcmp(result3, "xyxy") == 0);
|
34
|
+
free(result3);
|
35
|
+
|
36
|
+
old_substring = "abcd";
|
37
|
+
new_substring = "xy";
|
38
|
+
char *result4 = replace_all(input4, old_substring, new_substring);
|
39
|
+
assert(strcmp(result4, "xyxyxy") == 0);
|
40
|
+
free(result4);
|
41
|
+
|
42
|
+
old_substring = "abcd";
|
43
|
+
new_substring = "xy";
|
44
|
+
char *result5 = replace_all(input5, old_substring, new_substring);
|
45
|
+
assert(strcmp(result5, "xyxyxyxy") == 0);
|
46
|
+
free(result5);
|
47
|
+
|
48
|
+
old_substring = "xyz";
|
49
|
+
new_substring = "abc";
|
50
|
+
char *result6 = replace_all(input6, old_substring, new_substring);
|
51
|
+
assert(strcmp(result6, "") == 0);
|
52
|
+
free(result6);
|
53
|
+
|
54
|
+
old_substring = "iss";
|
55
|
+
new_substring = "ix";
|
56
|
+
char *result7 = replace_all(input7, old_substring, new_substring);
|
57
|
+
assert(strcmp(result7, "xy") == 0);
|
58
|
+
free(result7);
|
59
|
+
|
60
|
+
old_substring = "is";
|
61
|
+
new_substring = "was";
|
62
|
+
char *result8 = replace_all(input8, old_substring, new_substring);
|
63
|
+
assert(strcmp(result8, "wasswasppi") == 0);
|
64
|
+
free(result8);
|
65
|
+
|
66
|
+
printf("All tests passed successfully!\n");
|
67
|
+
}
|
68
|
+
|
69
|
+
int main()
|
70
|
+
{
|
71
|
+
test_replace_all();
|
72
|
+
return 0;
|
73
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
#include <string.h>
|
6
|
+
/* Callback function for testing */
|
7
|
+
const char *test_callback(const char *old_substring)
|
8
|
+
{
|
9
|
+
if (strcmp(old_substring, "old") == 0)
|
10
|
+
{
|
11
|
+
return "new";
|
12
|
+
}
|
13
|
+
else
|
14
|
+
{
|
15
|
+
return old_substring;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
int main()
|
20
|
+
{
|
21
|
+
char *result;
|
22
|
+
|
23
|
+
// Test case 1: Empty string
|
24
|
+
result = replace_all_with_callback("", "old", test_callback);
|
25
|
+
assert(strcmp(result, "") == 0);
|
26
|
+
free(result);
|
27
|
+
|
28
|
+
// Test case 2: No occurrences of old substring
|
29
|
+
result = replace_all_with_callback("test", "old", test_callback);
|
30
|
+
assert(strcmp(result, "test") == 0);
|
31
|
+
free(result);
|
32
|
+
|
33
|
+
// Test case 3: Single occurrence of old substring
|
34
|
+
result = replace_all_with_callback("old test", "old", test_callback);
|
35
|
+
assert(strcmp(result, "new test") == 0);
|
36
|
+
free(result);
|
37
|
+
|
38
|
+
// Test case 4: Multiple occurrences of old substring
|
39
|
+
result = replace_all_with_callback("old old test old", "old", test_callback);
|
40
|
+
assert(strcmp(result, "new new test new") == 0);
|
41
|
+
free(result);
|
42
|
+
|
43
|
+
printf("All tests passed!\n");
|
44
|
+
|
45
|
+
return 0;
|
46
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
#include <string.h>
|
6
|
+
int test_replace_all_with_lens()
|
7
|
+
{
|
8
|
+
const char *source = "Hello world! This is a test";
|
9
|
+
const char *find = "is";
|
10
|
+
const char *replace = "was";
|
11
|
+
size_t source_len = strlen(source);
|
12
|
+
size_t find_len = strlen(find);
|
13
|
+
size_t replace_len = strlen(replace);
|
14
|
+
|
15
|
+
int caller_should_use_orig_string_without_modification;
|
16
|
+
size_t num_matches;
|
17
|
+
char *new_text;
|
18
|
+
|
19
|
+
// Test case 1: Replace 'is' with 'was'
|
20
|
+
int result = replace_all_with_lens(source, find, replace, source_len, find_len, replace_len, &caller_should_use_orig_string_without_modification, &num_matches, &new_text);
|
21
|
+
assert(result == 0);
|
22
|
+
assert(caller_should_use_orig_string_without_modification == 0);
|
23
|
+
assert(num_matches == 2);
|
24
|
+
assert(strcmp(new_text, "Hello world! Thwas was a test") == 0);
|
25
|
+
free(new_text);
|
26
|
+
|
27
|
+
// Test case 2: No replacement, should use original string without modification
|
28
|
+
find = "xyz";
|
29
|
+
replace = "abc";
|
30
|
+
find_len = strlen(find);
|
31
|
+
replace_len = strlen(replace);
|
32
|
+
|
33
|
+
result = replace_all_with_lens(source, find, replace, source_len, find_len, replace_len, &caller_should_use_orig_string_without_modification, &num_matches, &new_text);
|
34
|
+
assert(result == SUCCESS);
|
35
|
+
assert(caller_should_use_orig_string_without_modification == 1);
|
36
|
+
assert(num_matches == 0);
|
37
|
+
assert(new_text == NULL);
|
38
|
+
|
39
|
+
// Test case 3: Empty source string
|
40
|
+
source = "";
|
41
|
+
source_len = strlen(source);
|
42
|
+
find = "abc";
|
43
|
+
replace = "def";
|
44
|
+
find_len = strlen(find);
|
45
|
+
replace_len = strlen(replace);
|
46
|
+
|
47
|
+
result = replace_all_with_lens(source, find, replace, source_len, find_len, replace_len, &caller_should_use_orig_string_without_modification, &num_matches, &new_text);
|
48
|
+
assert(result == SUCCESS);
|
49
|
+
assert(caller_should_use_orig_string_without_modification == 1);
|
50
|
+
assert(num_matches == 0);
|
51
|
+
assert(new_text == NULL);
|
52
|
+
|
53
|
+
return 0;
|
54
|
+
}
|
55
|
+
|
56
|
+
int main()
|
57
|
+
{
|
58
|
+
test_replace_all_with_lens();
|
59
|
+
printf("All tests passed!\n");
|
60
|
+
return 0;
|
61
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
|
5
|
+
// Function to be tested
|
6
|
+
void print_ushort_to_stream(const unsigned short value, FILE *stream) { fprintf(stream, "%hu", value); }
|
7
|
+
|
8
|
+
// Test cases
|
9
|
+
|
10
|
+
void test_print_ushort_to_stream_positive_value()
|
11
|
+
{
|
12
|
+
FILE *stream = fopen("test_output.txt", "w");
|
13
|
+
unsigned short test_value = 123;
|
14
|
+
print_ushort_to_stream(test_value, stream);
|
15
|
+
fclose(stream);
|
16
|
+
FILE *file = fopen("test_output.txt", "r");
|
17
|
+
unsigned short result_value;
|
18
|
+
fscanf(file, "%hu", &result_value);
|
19
|
+
fclose(file);
|
20
|
+
assert(result_value == test_value);
|
21
|
+
}
|
22
|
+
|
23
|
+
void test_print_ushort_to_stream_zero_value()
|
24
|
+
{
|
25
|
+
FILE *stream = fopen("test_output.txt", "w");
|
26
|
+
unsigned short test_value = 0;
|
27
|
+
print_ushort_to_stream(test_value, stream);
|
28
|
+
fclose(stream);
|
29
|
+
FILE *file = fopen("test_output.txt", "r");
|
30
|
+
unsigned short result_value;
|
31
|
+
fscanf(file, "%hu", &result_value);
|
32
|
+
fclose(file);
|
33
|
+
assert(result_value == test_value);
|
34
|
+
}
|
35
|
+
|
36
|
+
void test_print_ushort_to_stream_max_value()
|
37
|
+
{
|
38
|
+
FILE *stream = fopen("test_output.txt", "w");
|
39
|
+
unsigned short test_value = USHRT_MAX;
|
40
|
+
print_ushort_to_stream(test_value, stream);
|
41
|
+
fclose(stream);
|
42
|
+
FILE *file = fopen("test_output.txt", "r");
|
43
|
+
unsigned short result_value;
|
44
|
+
fscanf(file, "%hu", &result_value);
|
45
|
+
fclose(file);
|
46
|
+
assert(result_value == test_value);
|
47
|
+
}
|
48
|
+
|
49
|
+
int main()
|
50
|
+
{
|
51
|
+
test_print_ushort_to_stream_positive_value();
|
52
|
+
test_print_ushort_to_stream_zero_value();
|
53
|
+
test_print_ushort_to_stream_max_value();
|
54
|
+
printf("All tests passed!\n");
|
55
|
+
return 0;
|
56
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
|
5
|
+
// Define the function prototype
|
6
|
+
void reverse_int_array(int *array, size_t size);
|
7
|
+
|
8
|
+
// Test cases
|
9
|
+
void test_reverse_int_array_empty()
|
10
|
+
{
|
11
|
+
int array[] = {};
|
12
|
+
reverse_int_array(array, 0);
|
13
|
+
assert(1); // No assertion to check for empty array
|
14
|
+
}
|
15
|
+
|
16
|
+
void test_reverse_int_array_single()
|
17
|
+
{
|
18
|
+
int array[] = {5};
|
19
|
+
reverse_int_array(array, 1);
|
20
|
+
assert(array[0] == 5);
|
21
|
+
}
|
22
|
+
|
23
|
+
void test_reverse_int_array_even()
|
24
|
+
{
|
25
|
+
int array[] = {1, 2, 3, 4};
|
26
|
+
reverse_int_array(array, 4);
|
27
|
+
assert(array[0] == 4);
|
28
|
+
assert(array[1] == 3);
|
29
|
+
assert(array[2] == 2);
|
30
|
+
assert(array[3] == 1);
|
31
|
+
}
|
32
|
+
|
33
|
+
void test_reverse_int_array_odd()
|
34
|
+
{
|
35
|
+
int array[] = {1, 2, 3, 4, 5};
|
36
|
+
reverse_int_array(array, 5);
|
37
|
+
assert(array[0] == 5);
|
38
|
+
assert(array[1] == 4);
|
39
|
+
assert(array[2] == 3);
|
40
|
+
assert(array[3] == 2);
|
41
|
+
assert(array[4] == 1);
|
42
|
+
}
|
43
|
+
|
44
|
+
void run_tests()
|
45
|
+
{
|
46
|
+
test_reverse_int_array_empty();
|
47
|
+
test_reverse_int_array_single();
|
48
|
+
test_reverse_int_array_even();
|
49
|
+
test_reverse_int_array_odd();
|
50
|
+
|
51
|
+
printf("All tests passed!\n");
|
52
|
+
}
|
53
|
+
|
54
|
+
int main()
|
55
|
+
{
|
56
|
+
run_tests();
|
57
|
+
return 0;
|
58
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <string.h>
|
4
|
+
|
5
|
+
char *reverse_string(const char *str)
|
6
|
+
{
|
7
|
+
if (str == NULL)
|
8
|
+
{
|
9
|
+
return NULL;
|
10
|
+
}
|
11
|
+
|
12
|
+
size_t len = strlen(str);
|
13
|
+
char *reversed = (char *)malloc((len + 1) * sizeof(char));
|
14
|
+
|
15
|
+
if (reversed == NULL)
|
16
|
+
{
|
17
|
+
return NULL;
|
18
|
+
}
|
19
|
+
|
20
|
+
for (size_t i = 0; i < len; i++)
|
21
|
+
{
|
22
|
+
reversed[i] = str[len - 1 - i];
|
23
|
+
}
|
24
|
+
reversed[len] = '\0';
|
25
|
+
|
26
|
+
return reversed;
|
27
|
+
}
|
28
|
+
|
29
|
+
int main()
|
30
|
+
{
|
31
|
+
char *result;
|
32
|
+
|
33
|
+
// Test case 1: Empty string
|
34
|
+
result = reverse_string("");
|
35
|
+
assert(strcmp(result, "") == 0);
|
36
|
+
free(result);
|
37
|
+
|
38
|
+
// Test case 2: Single character string
|
39
|
+
result = reverse_string("a");
|
40
|
+
assert(strcmp(result, "a") == 0);
|
41
|
+
free(result);
|
42
|
+
|
43
|
+
// Test case 3: String with even length
|
44
|
+
result = reverse_string("hello");
|
45
|
+
assert(strcmp(result, "olleh") == 0);
|
46
|
+
free(result);
|
47
|
+
|
48
|
+
// Test case 4: String with odd length
|
49
|
+
result = reverse_string("world");
|
50
|
+
assert(strcmp(result, "dlrow") == 0);
|
51
|
+
free(result);
|
52
|
+
|
53
|
+
// Test case 5: Null input
|
54
|
+
result = reverse_string(NULL);
|
55
|
+
assert(result == NULL);
|
56
|
+
|
57
|
+
return 0;
|
58
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <string.h>
|
5
|
+
|
6
|
+
void reverse_string_in_place(char *str)
|
7
|
+
{
|
8
|
+
if (str == NULL)
|
9
|
+
{
|
10
|
+
return;
|
11
|
+
}
|
12
|
+
|
13
|
+
int len = strlen(str);
|
14
|
+
if (len <= 1)
|
15
|
+
{
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
|
19
|
+
int i = 0;
|
20
|
+
int j = len - 1;
|
21
|
+
while (i < j)
|
22
|
+
{
|
23
|
+
char temp = str[i];
|
24
|
+
str[i] = str[j];
|
25
|
+
str[j] = temp;
|
26
|
+
i++;
|
27
|
+
j--;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
void test_reverse_string()
|
32
|
+
{
|
33
|
+
char str1[] = "hello";
|
34
|
+
reverse_string_in_place(str1);
|
35
|
+
assert(strcmp(str1, "olleh") == 0);
|
36
|
+
|
37
|
+
char str2[] = "racecar";
|
38
|
+
reverse_string_in_place(str2);
|
39
|
+
assert(strcmp(str2, "racecar") == 0);
|
40
|
+
|
41
|
+
char str3[] = "a";
|
42
|
+
reverse_string_in_place(str3);
|
43
|
+
assert(strcmp(str3, "a") == 0);
|
44
|
+
|
45
|
+
char str4[] = "1234567890";
|
46
|
+
reverse_string_in_place(str4);
|
47
|
+
assert(strcmp(str4, "0987654321") == 0);
|
48
|
+
|
49
|
+
char str5[] = "";
|
50
|
+
reverse_string_in_place(str5);
|
51
|
+
assert(strcmp(str5, "") == 0);
|
52
|
+
}
|
53
|
+
|
54
|
+
int main()
|
55
|
+
{
|
56
|
+
test_reverse_string();
|
57
|
+
printf("All tests passed!\n");
|
58
|
+
|
59
|
+
return 0;
|
60
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#include "../foundationallib.h"
|
2
|
+
#include <assert.h>
|
3
|
+
#include <stdio.h>
|
4
|
+
#include <stdlib.h>
|
5
|
+
#include <string.h>
|
6
|
+
|
7
|
+
char *reverse_words(const char *str);
|
8
|
+
|
9
|
+
void test_reverse_words()
|
10
|
+
{
|
11
|
+
char *result = reverse_words("hello world");
|
12
|
+
assert(strcmp(result, "world hello") == 0);
|
13
|
+
free(result);
|
14
|
+
|
15
|
+
result = reverse_words("a b c");
|
16
|
+
assert(strcmp(result, "c b a") == 0);
|
17
|
+
free(result);
|
18
|
+
|
19
|
+
result = reverse_words(" a b c ");
|
20
|
+
assert(strcmp(result, "c b a") == 0);
|
21
|
+
free(result);
|
22
|
+
|
23
|
+
result = reverse_words("test");
|
24
|
+
assert(strcmp(result, "test") == 0);
|
25
|
+
free(result);
|
26
|
+
|
27
|
+
result = reverse_words("");
|
28
|
+
assert(strcmp(result, "") == 0);
|
29
|
+
free(result);
|
30
|
+
|
31
|
+
result = reverse_words("one");
|
32
|
+
assert(strcmp(result, "one") == 0);
|
33
|
+
free(result);
|
34
|
+
|
35
|
+
result = reverse_words("one two three");
|
36
|
+
assert(strcmp(result, "three two one") == 0);
|
37
|
+
free(result);
|
38
|
+
|
39
|
+
// Test a very long string
|
40
|
+
char long_str[1000000];
|
41
|
+
for (int i = 0; i < 1000000; i++)
|
42
|
+
{
|
43
|
+
long_str[i] = 'a';
|
44
|
+
}
|
45
|
+
result = reverse_words(long_str);
|
46
|
+
for (int i = 0; i < 1000000; i++)
|
47
|
+
{
|
48
|
+
assert(long_str[999999 - i] == result[i]);
|
49
|
+
}
|
50
|
+
free(result);
|
51
|
+
}
|
52
|
+
|
53
|
+
int main()
|
54
|
+
{
|
55
|
+
test_reverse_words();
|
56
|
+
printf("All tests passed!\n");
|
57
|
+
return 0;
|
58
|
+
}
|