From 2cfcef538f4e1eefc035f77158d496d6a69d3ef6 Mon Sep 17 00:00:00 2001 From: Bekalu Geta Date: Thu, 1 Jun 2023 16:46:31 +0300 Subject: [PATCH] [feat]: Add test files for each task --- 0x00-hello_world/tests/task_0/0-main.c | 12 + 0x00-hello_world/tests/task_1/1-main.c | 12 + 0x00-hello_world/tests/task_2/2-main.c | 12 + 0x00-hello_world/tests/task_3/3-main.c | 12 + 0x00-hello_world/tests/task_7/100-main.c | 12 + .../tests/task_1/1-main.c | 11 + .../tests/task_1/main.c | 12 + .../tests/task_10/10-main.c | 15 + .../tests/task_10/main_0.c | 16 + .../tests/task_10/main_1.c | 16 + .../tests/task_10/main_2.c | 16 + .../tests/task_10/main_3.c | 16 + .../tests/task_10/main_4.c | 16 + .../tests/task_10/main_5.c | 16 + .../tests/task_10/main_6.c | 16 + .../tests/task_11/11-main.c | 16 + .../tests/task_11/main_0.c | 12 + .../tests/task_11/main_1.c | 12 + .../tests/task_11/main_2.c | 12 + .../tests/task_11/main_3.c | 12 + .../tests/task_11/main_4.c | 12 + .../tests/task_11/main_5.c | 12 + .../tests/task_12/main_0.c | 12 + .../tests/task_12/main_1.c | 12 + .../tests/task_12/main_2.c | 12 + .../tests/task_12/main_3.c | 12 + .../tests/task_12/main_4.c | 12 + .../tests/task_12/main_5.c | 12 + .../tests/task_2/2-main.c | 12 + .../tests/task_2/main.c | 12 + .../tests/task_3/3-main.c | 20 ++ .../tests/task_3/main_0.c | 26 ++ .../tests/task_3/main_1.c | 26 ++ .../tests/task_3/main_10.c | 26 ++ .../tests/task_3/main_2.c | 26 ++ .../tests/task_3/main_3.c | 26 ++ .../tests/task_3/main_4.c | 26 ++ .../tests/task_3/main_5.c | 26 ++ .../tests/task_3/main_6.c | 26 ++ .../tests/task_3/main_7.c | 26 ++ .../tests/task_3/main_8.c | 26 ++ .../tests/task_3/main_9.c | 26 ++ .../tests/task_4/4-main.c | 22 ++ .../tests/task_4/main_0.c | 26 ++ .../tests/task_4/main_1.c | 26 ++ .../tests/task_4/main_10.c | 26 ++ .../tests/task_4/main_2.c | 26 ++ .../tests/task_4/main_3.c | 26 ++ .../tests/task_4/main_4.c | 26 ++ .../tests/task_4/main_5.c | 26 ++ .../tests/task_4/main_6.c | 26 ++ .../tests/task_4/main_7.c | 26 ++ .../tests/task_4/main_8.c | 26 ++ .../tests/task_4/main_9.c | 26 ++ .../tests/task_5/5-main.c | 33 ++ .../tests/task_5/main_0.c | 19 ++ .../tests/task_5/main_1.c | 19 ++ .../tests/task_5/main_2.c | 19 ++ .../tests/task_5/main_3.c | 19 ++ .../tests/task_5/main_4.c | 19 ++ .../tests/task_5/main_5.c | 19 ++ .../tests/task_5/main_6.c | 19 ++ .../tests/task_5/main_7.c | 19 ++ .../tests/task_6/6-main.c | 21 ++ .../tests/task_6/main_0.c | 17 + .../tests/task_6/main_1.c | 17 + .../tests/task_6/main_2.c | 17 + .../tests/task_6/main_3.c | 17 + .../tests/task_6/main_4.c | 17 + .../tests/task_6/main_5.c | 17 + .../tests/task_6/main_6.c | 17 + .../tests/task_6/main_7.c | 17 + .../tests/task_7/7-main.c | 18 + .../tests/task_7/main_0.c | 17 + .../tests/task_7/main_1.c | 17 + .../tests/task_7/main_2.c | 17 + .../tests/task_7/main_3.c | 17 + .../tests/task_7/main_4.c | 17 + .../tests/task_7/main_5.c | 17 + .../tests/task_8/8-main.c | 12 + .../tests/task_8/main_0.c | 12 + .../tests/task_9/9-main.c | 12 + .../tests/task_9/main_0.c | 12 + 0x03-debugging/tests/task_2/2-main.c | 22 ++ 0x03-debugging/tests/task_2/main_0.c | 23 ++ 0x03-debugging/tests/task_2/main_1.c | 23 ++ 0x03-debugging/tests/task_2/main_2.c | 23 ++ 0x03-debugging/tests/task_2/main_3.c | 23 ++ 0x03-debugging/tests/task_2/main_4.c | 23 ++ 0x03-debugging/tests/task_2/main_5.c | 23 ++ 0x03-debugging/tests/task_2/main_6.c | 23 ++ 0x03-debugging/tests/task_2/main_7.c | 23 ++ 0x03-debugging/tests/task_2/main_8.c | 23 ++ 0x03-debugging/tests/task_3/main_0.c | 27 ++ 0x03-debugging/tests/task_3/main_1.c | 27 ++ 0x03-debugging/tests/task_3/main_2.c | 27 ++ 0x03-debugging/tests/task_3/main_3.c | 27 ++ 0x03-debugging/tests/task_3/main_4.c | 27 ++ 0x03-debugging/tests/task_3/main_5.c | 27 ++ 0x03-debugging/tests/task_3/main_6.c | 27 ++ 0x03-debugging/tests/task_3/main_7.c | 27 ++ .../tests/task_0/0-main.c | 17 + .../tests/task_0/main_0.c | 16 + .../tests/task_0/main_1.c | 19 ++ .../tests/task_1/1-main.c | 17 + .../tests/task_1/main_0.c | 16 + .../tests/task_1/main_1.c | 19 ++ .../tests/task_10/10-main.c | 15 + .../tests/task_10/main_0.c | 12 + .../tests/task_10/main_1.c | 12 + .../tests/task_10/main_2.c | 12 + .../tests/task_10/main_3.c | 12 + .../tests/task_10/main_4.c | 12 + .../tests/task_12/main_0.c | 13 + .../tests/task_12/main_1.c | 13 + .../tests/task_12/main_2.c | 13 + .../tests/task_12/main_3.c | 13 + .../tests/task_12/main_4.c | 13 + .../tests/task_12/main_5.c | 13 + .../tests/task_12/main_6.c | 13 + .../tests/task_12/main_7.c | 14 + .../tests/task_12/main_8.c | 14 + .../tests/task_12/main_9.c | 13 + .../tests/task_2/2-main.c | 13 + .../tests/task_2/main_0.c | 18 + .../tests/task_3/3-main.c | 12 + .../tests/task_3/main_0.c | 13 + .../tests/task_4/4-main.c | 12 + .../tests/task_4/main_0.c | 13 + .../tests/task_5/5-main.c | 12 + .../tests/task_5/main_0.c | 13 + .../tests/task_6/6-main.c | 15 + .../tests/task_6/main_0.c | 12 + .../tests/task_6/main_1.c | 12 + .../tests/task_6/main_3.c | 12 + .../tests/task_6/main_4.c | 12 + .../tests/task_7/7-main.c | 15 + .../tests/task_7/main_0.c | 12 + .../tests/task_7/main_1.c | 12 + .../tests/task_7/main_2.c | 12 + .../tests/task_7/main_3.c | 12 + .../tests/task_7/main_4.c | 12 + .../tests/task_8/8-main.c | 14 + .../tests/task_8/main_0.c | 12 + .../tests/task_8/main_1.c | 12 + .../tests/task_8/main_2.c | 12 + .../tests/task_8/main_3.c | 12 + .../tests/task_8/main_4.c | 12 + .../tests/task_0/0-main.c | 18 + .../tests/task_0/main_0.c | 19 ++ .../tests/task_0/main_1.c | 19 ++ .../tests/task_0/main_2.c | 24 ++ .../tests/task_1/1-main.c | 20 ++ .../tests/task_1/main_0.c | 21 ++ .../tests/task_1/main_1.c | 21 ++ .../tests/task_1/main_2.c | 22 ++ .../tests/task_10/main_0.c | 17 + .../tests/task_10/main_1.c | 17 + .../tests/task_10/main_10.c | 17 + .../tests/task_10/main_11.c | 17 + .../tests/task_10/main_12.c | 17 + .../tests/task_10/main_2.c | 17 + .../tests/task_10/main_3.c | 17 + .../tests/task_10/main_4.c | 17 + .../tests/task_10/main_5.c | 17 + .../tests/task_10/main_6.c | 17 + .../tests/task_10/main_7.c | 17 + .../tests/task_10/main_8.c | 17 + .../tests/task_10/main_9.c | 17 + .../tests/task_2/2-main.c | 18 + .../tests/task_2/main_0.c | 19 ++ .../tests/task_2/main_1.c | 19 ++ .../tests/task_2/main_2.c | 19 ++ .../tests/task_3/3-main.c | 15 + .../tests/task_3/main_0.c | 17 + .../tests/task_3/main_1.c | 17 + .../tests/task_3/main_2.c | 17 + .../tests/task_4/4-main.c | 15 + .../tests/task_4/main_0.c | 17 + .../tests/task_4/main_1.c | 17 + .../tests/task_4/main_2.c | 17 + .../tests/task_5/5-main.c | 17 + .../tests/task_5/main_0.c | 18 + .../tests/task_5/main_1.c | 18 + .../tests/task_5/main_2.c | 18 + .../tests/task_6/6-main.c | 15 + .../tests/task_6/main_0.c | 17 + .../tests/task_6/main_1.c | 17 + .../tests/task_6/main_2.c | 17 + .../tests/task_7/7-main.c | 15 + .../tests/task_7/main_0.c | 17 + .../tests/task_7/main_1.c | 17 + .../tests/task_7/main_2.c | 17 + .../tests/task_8/8-main.c | 19 ++ .../tests/task_8/main_0.c | 18 + .../tests/task_8/main_1.c | 59 ++++ .../tests/task_8/main_2.c | 19 ++ .../tests/task_9/9-main.c | 18 + .../tests/task_9/main_0.c | 25 ++ .../tests/task_9/main_1.c | 25 ++ .../tests/task_9/main_2.c | 25 ++ .../tests/task_9/main_3.c | 25 ++ .../tests/task_0/main_0.c | 23 ++ .../tests/task_0/main_1.c | 23 ++ .../tests/task_0/main_2.c | 23 ++ .../tests/task_1/main_0.c | 23 ++ .../tests/task_1/main_1.c | 23 ++ .../tests/task_1/main_2.c | 23 ++ .../tests/task_1/main_3.c | 23 ++ .../tests/task_11/main_0.c | 26 ++ .../tests/task_11/main_1.c | 26 ++ .../tests/task_11/main_2.c | 59 ++++ .../tests/task_12/main_0.c | 18 + .../tests/task_12/main_1.c | 18 + .../tests/task_12/main_2.c | 18 + .../tests/task_12/main_3.c | 18 + .../tests/task_2/main_0.c | 33 ++ .../tests/task_2/main_1.c | 33 ++ .../tests/task_2/main_2.c | 33 ++ .../tests/task_2/main_3.c | 33 ++ .../tests/task_2/main_4.c | 33 ++ .../tests/task_3/main_0.c | 17 + .../tests/task_3/main_1.c | 17 + .../tests/task_3/main_2.c | 16 + .../tests/task_4/main_0.c | 42 +++ .../tests/task_4/main_1.c | 42 +++ .../tests/task_4/main_2.c | 42 +++ .../tests/task_4/main_3.c | 42 +++ .../tests/task_5/main_0.c | 19 ++ .../tests/task_5/main_1.c | 19 ++ .../tests/task_5/main_2.c | 19 ++ .../tests/task_6/main_0.c | 19 ++ .../tests/task_6/main_1.c | 19 ++ .../tests/task_6/main_2.c | 19 ++ .../tests/task_6/main_3.c | 19 ++ .../tests/task_7/main_0.c | 19 ++ .../tests/task_7/main_1.c | 19 ++ .../tests/task_7/main_2.c | 19 ++ .../tests/task_8/main_0.c | 19 ++ .../tests/task_8/main_1.c | 19 ++ .../tests/task_8/main_2.c | 19 ++ .../tests/task_9/main_0.c | 14 + .../tests/task_0/main_0.c | 50 +++ .../tests/task_0/main_1.c | 50 +++ .../tests/task_0/main_2.c | 50 +++ .../tests/task_1/main_0.c | 53 +++ .../tests/task_1/main_1.c | 53 +++ .../tests/task_1/main_2.c | 53 +++ .../tests/task_2/main_0.c | 18 + .../tests/task_2/main_1.c | 19 ++ .../tests/task_2/main_2.c | 18 + .../tests/task_3/main_0.c | 19 ++ .../tests/task_3/main_1.c | 19 ++ .../tests/task_3/main_2.c | 21 ++ .../tests/task_4/main_0.c | 19 ++ .../tests/task_4/main_1.c | 20 ++ .../tests/task_4/main_2.c | 21 ++ .../tests/task_5/main_0.c | 19 ++ .../tests/task_5/main_1.c | 20 ++ .../tests/task_5/main_2.c | 19 ++ .../tests/task_6/main_0.c | 22 ++ .../tests/task_6/main_1.c | 22 ++ .../tests/task_6/main_2.c | 22 ++ .../tests/task_7/main_0.c | 17 + .../tests/task_7/main_1.c | 20 ++ .../tests/task_7/main_2.c | 24 ++ .../tests/task_8/main_0.c | 18 + .../tests/task_8/main_1.c | 18 + .../tests/task_8/main_2.c | 24 ++ 0x08-recursion/tests/task_0/count_loops.c | 60 ++++ .../tests/task_0/count_static_variables.c | 29 ++ 0x08-recursion/tests/task_0/main_0.c | 12 + 0x08-recursion/tests/task_0/main_1.c | 12 + 0x08-recursion/tests/task_0/main_2.c | 12 + 0x08-recursion/tests/task_1/count_loops.c | 60 ++++ .../tests/task_1/count_static_variables.c | 29 ++ 0x08-recursion/tests/task_1/main_0.c | 12 + 0x08-recursion/tests/task_1/main_1.c | 12 + 0x08-recursion/tests/task_1/main_2.c | 12 + 0x08-recursion/tests/task_2/count_loops.c | 60 ++++ .../tests/task_2/count_static_variables.c | 29 ++ 0x08-recursion/tests/task_2/main_0.c | 17 + 0x08-recursion/tests/task_2/main_1.c | 17 + 0x08-recursion/tests/task_2/main_2.c | 17 + 0x08-recursion/tests/task_3/count_loops.pl | 60 ++++ .../tests/task_3/count_static_variables.pl | 29 ++ 0x08-recursion/tests/task_3/main_0.c | 17 + 0x08-recursion/tests/task_3/main_1.c | 17 + 0x08-recursion/tests/task_3/main_2.c | 19 ++ 0x08-recursion/tests/task_4/count_loops.pl | 60 ++++ .../tests/task_4/count_static_variables.pl | 29 ++ 0x08-recursion/tests/task_4/main_0.c | 17 + 0x08-recursion/tests/task_4/main_1.c | 17 + 0x08-recursion/tests/task_4/main_2.c | 17 + 0x08-recursion/tests/task_4/main_3.c | 17 + 0x08-recursion/tests/task_5/count_loops.c | 60 ++++ .../tests/task_5/count_static_variables.c | 29 ++ 0x08-recursion/tests/task_5/main_0.c | 17 + 0x08-recursion/tests/task_5/main_1.c | 17 + 0x08-recursion/tests/task_5/main_2.c | 17 + 0x08-recursion/tests/task_5/main_3.c | 18 + 0x08-recursion/tests/task_6/count_loops.c | 60 ++++ .../tests/task_6/count_static_variables.c | 29 ++ 0x08-recursion/tests/task_6/main_0.c | 17 + 0x08-recursion/tests/task_6/main_1.c | 17 + 0x08-recursion/tests/task_6/main_2.c | 17 + 0x08-recursion/tests/task_6/main_3.c | 17 + 0x08-recursion/tests/task_7/count_loops.c | 60 ++++ .../tests/task_7/count_static_variables.c | 29 ++ 0x08-recursion/tests/task_7/main_0.c | 17 + 0x08-recursion/tests/task_7/main_1.c | 17 + 0x08-recursion/tests/task_7/main_2.c | 17 + 0x08-recursion/tests/task_7/main_3.c | 17 + 0x08-recursion/tests/task_8/count_loops.c | 60 ++++ .../tests/task_8/count_static_variables.c | 29 ++ 0x08-recursion/tests/task_8/main_0.c | 17 + 0x08-recursion/tests/task_8/main_1.c | 17 + 0x08-recursion/tests/task_8/main_10.c | 17 + 0x08-recursion/tests/task_8/main_11.c | 17 + 0x08-recursion/tests/task_8/main_12.c | 17 + 0x08-recursion/tests/task_8/main_13.c | 17 + 0x08-recursion/tests/task_8/main_2.c | 17 + 0x08-recursion/tests/task_8/main_3.c | 17 + 0x08-recursion/tests/task_8/main_4.c | 17 + 0x08-recursion/tests/task_8/main_5.c | 17 + 0x08-recursion/tests/task_8/main_6.c | 17 + 0x08-recursion/tests/task_8/main_7.c | 17 + 0x08-recursion/tests/task_8/main_8.c | 17 + 0x08-recursion/tests/task_8/main_9.c | 17 + 0x09-static_libraries/tests/task_0/main.c | 11 + 0x09-static_libraries/tests/task_1/source_0.c | 8 + 0x09-static_libraries/tests/task_1/source_1.c | 8 + 0x09-static_libraries/tests/task_1/source_2.c | 8 + 0x0B-malloc_free/tests/task_0/main_0.c | 54 +++ 0x0B-malloc_free/tests/task_0/main_1.c | 54 +++ 0x0B-malloc_free/tests/task_0/main_2.c | 54 +++ 0x0B-malloc_free/tests/task_0/main_3.c | 25 ++ 0x0B-malloc_free/tests/task_1/main_0.c | 24 ++ 0x0B-malloc_free/tests/task_1/main_1.c | 24 ++ 0x0B-malloc_free/tests/task_1/main_2.c | 24 ++ 0x0B-malloc_free/tests/task_1/main_3.c | 23 ++ 0x0B-malloc_free/tests/task_2/main_0.c | 24 ++ 0x0B-malloc_free/tests/task_2/main_1.c | 24 ++ 0x0B-malloc_free/tests/task_2/main_2.c | 24 ++ 0x0B-malloc_free/tests/task_2/main_3.c | 43 +++ 0x0B-malloc_free/tests/task_3/main_0.c | 57 ++++ 0x0B-malloc_free/tests/task_3/main_1.c | 57 ++++ 0x0B-malloc_free/tests/task_3/main_2.c | 54 +++ 0x0B-malloc_free/tests/task_3/main_3.c | 55 +++ 0x0B-malloc_free/tests/task_4/main_0.c | 27 ++ 0x0B-malloc_free/tests/task_4/main_1.c | 27 ++ 0x0B-malloc_free/tests/task_4/main_2.c | 27 ++ 0x0B-malloc_free/tests/task_4/main_3.c | 16 + 0x0B-malloc_free/tests/task_5/main_0.c | 23 ++ 0x0B-malloc_free/tests/task_5/main_3.c | 24 ++ 0x0B-malloc_free/tests/task_6/main_0.c | 38 +++ 0x0B-malloc_free/tests/task_6/main_1.c | 38 +++ 0x0B-malloc_free/tests/task_6/main_2.c | 38 +++ 0x0B-malloc_free/tests/task_6/main_3.c | 38 +++ 0x0B-malloc_free/tests/task_6/main_4.c | 38 +++ 0x0C-more_malloc_free/tests/task_0/main_0.c | 19 ++ 0x0C-more_malloc_free/tests/task_0/main_1.c | 19 ++ 0x0C-more_malloc_free/tests/task_0/main_2.c | 18 + 0x0C-more_malloc_free/tests/task_1/main_0.c | 24 ++ 0x0C-more_malloc_free/tests/task_1/main_1.c | 24 ++ 0x0C-more_malloc_free/tests/task_1/main_2.c | 24 ++ 0x0C-more_malloc_free/tests/task_1/main_3.c | 42 +++ 0x0C-more_malloc_free/tests/task_2/main_0.c | 58 ++++ 0x0C-more_malloc_free/tests/task_2/main_1.c | 58 ++++ 0x0C-more_malloc_free/tests/task_2/main_2.c | 58 ++++ 0x0C-more_malloc_free/tests/task_2/main_3.c | 58 ++++ 0x0C-more_malloc_free/tests/task_2/main_4.c | 55 +++ 0x0C-more_malloc_free/tests/task_3/main_0.c | 53 +++ 0x0C-more_malloc_free/tests/task_3/main_1.c | 53 +++ 0x0C-more_malloc_free/tests/task_3/main_2.c | 53 +++ 0x0C-more_malloc_free/tests/task_3/main_3.c | 53 +++ 0x0C-more_malloc_free/tests/task_3/main_4.c | 53 +++ 0x0C-more_malloc_free/tests/task_3/main_5.c | 53 +++ 0x0C-more_malloc_free/tests/task_4/main_0.c | 62 ++++ 0x0C-more_malloc_free/tests/task_4/main_1.c | 61 ++++ 0x0C-more_malloc_free/tests/task_4/main_2.c | 63 ++++ 0x0C-more_malloc_free/tests/task_4/main_3.c | 62 ++++ 0x0C-more_malloc_free/tests/task_4/main_4.c | 61 ++++ 0x0C-more_malloc_free/tests/task_4/main_5.c | 62 ++++ .../tests/task_5/launch_101-mul.c | 44 +++ 0x0D-preprocessor/tests/task_0/main_0.c | 18 + 0x0D-preprocessor/tests/task_1/main_0.c | 18 + 0x0D-preprocessor/tests/task_3/main_0.c | 18 + 0x0D-preprocessor/tests/task_3/main_1.c | 18 + 0x0D-preprocessor/tests/task_3/main_2.c | 18 + 0x0D-preprocessor/tests/task_3/main_3.c | 18 + 0x0D-preprocessor/tests/task_3/main_4.c | 18 + 0x0D-preprocessor/tests/task_3/main_5.c | 18 + 0x0D-preprocessor/tests/task_3/main_6.c | 18 + 0x0D-preprocessor/tests/task_3/main_7.c | 18 + 0x0D-preprocessor/tests/task_4/main_0.c | 18 + 0x0D-preprocessor/tests/task_4/main_1.c | 18 + 0x0D-preprocessor/tests/task_4/main_2.c | 18 + 0x0D-preprocessor/tests/task_4/main_3.c | 18 + 0x0D-preprocessor/tests/task_4/main_4.c | 18 + 0x0D-preprocessor/tests/task_4/main_5.c | 18 + 0x0D-preprocessor/tests/task_4/main_6.c | 18 + 0x0D-preprocessor/tests/task_4/main_7.c | 18 + 0x0E-structures_typedef/tests/task_0/main_0.c | 19 ++ 0x0E-structures_typedef/tests/task_1/main_0.c | 17 + 0x0E-structures_typedef/tests/task_1/main_1.c | 14 + 0x0E-structures_typedef/tests/task_2/main_0.c | 18 + 0x0E-structures_typedef/tests/task_2/main_1.c | 19 ++ 0x0E-structures_typedef/tests/task_2/main_2.c | 14 + 0x0E-structures_typedef/tests/task_3/main_0.c | 24 ++ 0x0E-structures_typedef/tests/task_4/main_0.c | 23 ++ 0x0E-structures_typedef/tests/task_4/main_1.c | 30 ++ 0x0E-structures_typedef/tests/task_5/main_0.c | 18 + 0x0E-structures_typedef/tests/task_5/main_1.c | 13 + 0x0E-structures_typedef/tests/task_5/main_2.c | 21 ++ 0x0F-function_pointers/tests/task_0/0-main.c | 52 +++ 0x0F-function_pointers/tests/task_0/main_0.c | 36 ++ 0x0F-function_pointers/tests/task_0/main_1.c | 13 + 0x0F-function_pointers/tests/task_1/main_0.c | 26 ++ 0x0F-function_pointers/tests/task_1/main_1.c | 319 +++++++++++++++++ 0x0F-function_pointers/tests/task_1/main_2.c | 24 ++ 0x0F-function_pointers/tests/task_1/main_3.c | 26 ++ 0x0F-function_pointers/tests/task_1/main_4.c | 26 ++ 0x0F-function_pointers/tests/task_2/2-main.c | 55 +++ 0x0F-function_pointers/tests/task_2/main_0.c | 31 ++ 0x0F-function_pointers/tests/task_2/main_1.c | 322 ++++++++++++++++++ 0x0F-function_pointers/tests/task_2/main_2.c | 31 ++ 0x0F-function_pointers/tests/task_2/main_3.c | 31 ++ 0x0F-function_pointers/tests/task_2/main_4.c | 27 ++ 0x0F-function_pointers/tests/task_2/main_5.c | 20 ++ .../tests/task_4/helper_0.c | 27 ++ .../tests/task_4/helper_1.c | 27 ++ 0x10-variadic_functions/tests/task_0/0-main.c | 17 + 0x10-variadic_functions/tests/task_0/main_0.c | 16 + 0x10-variadic_functions/tests/task_0/main_1.c | 16 + 0x10-variadic_functions/tests/task_0/main_2.c | 16 + 0x10-variadic_functions/tests/task_0/main_3.c | 16 + 0x10-variadic_functions/tests/task_1/1-main.c | 12 + 0x10-variadic_functions/tests/task_1/main_0.c | 12 + 0x10-variadic_functions/tests/task_1/main_1.c | 12 + 0x10-variadic_functions/tests/task_1/main_2.c | 12 + 0x10-variadic_functions/tests/task_1/main_3.c | 13 + 0x10-variadic_functions/tests/task_1/main_4.c | 12 + 0x10-variadic_functions/tests/task_2/2-main.c | 12 + 0x10-variadic_functions/tests/task_2/main_0.c | 12 + 0x10-variadic_functions/tests/task_2/main_1.c | 12 + 0x10-variadic_functions/tests/task_2/main_2.c | 12 + 0x10-variadic_functions/tests/task_2/main_3.c | 13 + 0x10-variadic_functions/tests/task_2/main_4.c | 12 + 0x10-variadic_functions/tests/task_2/main_5.c | 13 + 0x10-variadic_functions/tests/task_3/3-main.c | 12 + 0x10-variadic_functions/tests/task_3/main_0.c | 13 + 0x10-variadic_functions/tests/task_3/main_1.c | 13 + 0x10-variadic_functions/tests/task_3/main_2.c | 13 + 0x10-variadic_functions/tests/task_3/main_3.c | 13 + 0x10-variadic_functions/tests/task_3/main_4.c | 13 + 0x10-variadic_functions/tests/task_3/main_5.c | 13 + .../tests/task_0/0-main.c | 40 +++ .../tests/task_0/main_0.c | 19 ++ .../tests/task_0/main_1.c | 17 + .../tests/task_0/main_2.c | 116 +++++++ .../tests/task_0/main_3.c | 19 ++ .../tests/task_0/main_4.c | 16 + .../tests/task_0/main_5.c | 19 ++ .../tests/task_1/1-main.c | 34 ++ .../tests/task_1/main_0.c | 19 ++ .../tests/task_1/main_1.c | 17 + .../tests/task_1/main_2.c | 116 +++++++ .../tests/task_1/main_3.c | 19 ++ .../tests/task_1/main_4.c | 16 + .../tests/task_2/2-main.c | 45 +++ .../tests/task_2/main_0.c | 58 ++++ .../tests/task_2/main_1.c | 57 ++++ .../tests/task_2/main_2.c | 57 ++++ .../tests/task_2/main_3.c | 58 ++++ .../tests/task_3/3-main.c | 46 +++ .../tests/task_3/main_0.c | 58 ++++ .../tests/task_3/main_1.c | 57 ++++ .../tests/task_3/main_2.c | 57 ++++ .../tests/task_3/main_3.c | 58 ++++ .../tests/task_4/4-main.c | 25 ++ .../tests/task_4/main_0.c | 101 ++++++ .../tests/task_4/main_1.c | 101 ++++++ .../tests/task_4/main_2.c | 101 ++++++ .../tests/task_4/main_3.c | 104 ++++++ .../tests/task_4/main_4.c | 15 + .../tests/task_0/0-main.c | 29 ++ .../tests/task_0/main_0.c | 19 ++ .../tests/task_0/main_1.c | 17 + .../tests/task_0/main_2.c | 73 ++++ .../tests/task_0/main_3.c | 19 ++ .../tests/task_0/main_4.c | 16 + .../tests/task_1/1-main.c | 29 ++ .../tests/task_1/main_0.c | 19 ++ .../tests/task_1/main_1.c | 17 + .../tests/task_1/main_2.c | 73 ++++ .../tests/task_1/main_3.c | 19 ++ .../tests/task_1/main_4.c | 16 + .../tests/task_10/10-main.c | 65 ++++ .../tests/task_10/main_0.c | 74 ++++ .../tests/task_10/main_1.c | 74 ++++ .../tests/task_10/main_2.c | 78 +++++ .../tests/task_10/main_3.c | 74 ++++ .../tests/task_10/main_4.c | 19 ++ .../tests/task_11/main_0.c | 72 ++++ .../tests/task_11/main_1.c | 72 ++++ .../tests/task_11/main_2.c | 72 ++++ .../tests/task_11/main_3.c | 72 ++++ .../tests/task_11/main_4.c | 18 + .../tests/task_12/main_0.c | 47 +++ .../tests/task_12/main_1.c | 47 +++ .../tests/task_12/main_2.c | 59 ++++ .../tests/task_12/main_3.c | 52 +++ .../tests/task_12/main_4.c | 18 + .../tests/task_12/main_5.c | 62 ++++ .../tests/task_13/main_0.c | 45 +++ .../tests/task_13/main_1.c | 45 +++ .../tests/task_13/main_2.c | 57 ++++ .../tests/task_13/main_3.c | 50 +++ .../tests/task_13/main_4.c | 20 ++ .../tests/task_14/main_0.c | 52 +++ .../tests/task_14/main_1.c | 52 +++ .../tests/task_14/main_2.c | 64 ++++ .../tests/task_14/main_3.c | 57 ++++ .../tests/task_14/main_4.c | 26 ++ .../tests/task_14/main_5.c | 92 +++++ .../tests/task_2/2-main.c | 23 ++ .../tests/task_2/main_0.c | 52 +++ .../tests/task_2/main_1.c | 51 +++ .../tests/task_2/main_2.c | 51 +++ .../tests/task_2/main_3.c | 52 +++ .../tests/task_3/3-main.c | 23 ++ .../tests/task_3/main_0.c | 52 +++ .../tests/task_3/main_1.c | 51 +++ .../tests/task_3/main_2.c | 51 +++ .../tests/task_3/main_3.c | 52 +++ .../tests/task_4/4-main.c | 25 ++ .../tests/task_4/main_0.c | 59 ++++ .../tests/task_4/main_1.c | 59 ++++ .../tests/task_4/main_2.c | 59 ++++ .../tests/task_4/main_3.c | 59 ++++ .../tests/task_4/main_4.c | 15 + .../tests/task_5/5-main.c | 25 ++ .../tests/task_5/main_0.c | 60 ++++ .../tests/task_5/main_1.c | 60 ++++ .../tests/task_5/main_2.c | 60 ++++ .../tests/task_5/main_3.c | 60 ++++ .../tests/task_5/main_4.c | 15 + .../tests/task_6/6-main.c | 32 ++ .../tests/task_6/main_0.c | 74 ++++ .../tests/task_6/main_1.c | 74 ++++ .../tests/task_6/main_2.c | 78 +++++ .../tests/task_6/main_3.c | 74 ++++ .../tests/task_6/main_4.c | 19 ++ .../tests/task_7/7-main.c | 28 ++ .../tests/task_7/main_0.c | 76 +++++ .../tests/task_7/main_1.c | 76 +++++ .../tests/task_7/main_2.c | 80 +++++ .../tests/task_7/main_3.c | 76 +++++ .../tests/task_7/main_4.c | 22 ++ .../tests/task_8/8-main.c | 26 ++ .../tests/task_8/main_0.c | 73 ++++ .../tests/task_8/main_1.c | 73 ++++ .../tests/task_8/main_2.c | 73 ++++ .../tests/task_8/main_3.c | 73 ++++ .../tests/task_8/main_4.c | 19 ++ .../tests/task_9/9-main.c | 27 ++ .../tests/task_9/main_0.c | 77 +++++ .../tests/task_9/main_1.c | 77 +++++ .../tests/task_9/main_2.c | 86 +++++ .../tests/task_9/main_3.c | 77 +++++ .../tests/task_9/main_4.c | 23 ++ 0x14-bit_manipulation/tests/task_0/0-main.c | 24 ++ 0x14-bit_manipulation/tests/task_0/main_0.c | 16 + 0x14-bit_manipulation/tests/task_0/main_1.c | 16 + 0x14-bit_manipulation/tests/task_0/main_2.c | 16 + 0x14-bit_manipulation/tests/task_0/main_3.c | 17 + 0x14-bit_manipulation/tests/task_0/main_4.c | 16 + 0x14-bit_manipulation/tests/task_0/main_5.c | 16 + 0x14-bit_manipulation/tests/task_0/main_6.c | 16 + 0x14-bit_manipulation/tests/task_0/main_7.c | 16 + 0x14-bit_manipulation/tests/task_0/main_8.c | 16 + 0x14-bit_manipulation/tests/task_0/main_9.c | 16 + 0x14-bit_manipulation/tests/task_1/1-main.c | 21 ++ 0x14-bit_manipulation/tests/task_1/main_0.c | 14 + 0x14-bit_manipulation/tests/task_1/main_1.c | 14 + 0x14-bit_manipulation/tests/task_1/main_2.c | 14 + 0x14-bit_manipulation/tests/task_1/main_3.c | 14 + 0x14-bit_manipulation/tests/task_1/main_4.c | 15 + 0x14-bit_manipulation/tests/task_1/main_5.c | 15 + 0x14-bit_manipulation/tests/task_2/2-main.c | 19 ++ 0x14-bit_manipulation/tests/task_2/main_0.c | 16 + 0x14-bit_manipulation/tests/task_2/main_1.c | 16 + 0x14-bit_manipulation/tests/task_2/main_2.c | 16 + 0x14-bit_manipulation/tests/task_2/main_3.c | 17 + 0x14-bit_manipulation/tests/task_2/main_4.c | 17 + 0x14-bit_manipulation/tests/task_2/main_5.c | 17 + 0x14-bit_manipulation/tests/task_3/3-main.c | 22 ++ 0x14-bit_manipulation/tests/task_3/main_0.c | 17 + 0x14-bit_manipulation/tests/task_3/main_1.c | 17 + 0x14-bit_manipulation/tests/task_3/main_2.c | 17 + 0x14-bit_manipulation/tests/task_3/main_3.c | 17 + 0x14-bit_manipulation/tests/task_3/main_4.c | 17 + 0x14-bit_manipulation/tests/task_4/4-main.c | 22 ++ 0x14-bit_manipulation/tests/task_4/main_0.c | 17 + 0x14-bit_manipulation/tests/task_4/main_1.c | 17 + 0x14-bit_manipulation/tests/task_4/main_2.c | 17 + 0x14-bit_manipulation/tests/task_4/main_3.c | 17 + 0x14-bit_manipulation/tests/task_4/main_4.c | 17 + 0x14-bit_manipulation/tests/task_5/5-main.c | 21 ++ 0x14-bit_manipulation/tests/task_5/main_0.c | 16 + 0x14-bit_manipulation/tests/task_5/main_1.c | 16 + 0x14-bit_manipulation/tests/task_5/main_2.c | 16 + 0x14-bit_manipulation/tests/task_5/main_3.c | 17 + 0x14-bit_manipulation/tests/task_5/main_4.c | 17 + 0x14-bit_manipulation/tests/task_6/main_0.c | 18 + 0x14-bit_manipulation/tests/task_7/main_0.c | 63 ++++ 0x15-file_io/tests/task_0/0-main.c | 22 ++ 0x15-file_io/tests/task_0/main_0.c | 52 +++ 0x15-file_io/tests/task_0/no_read_perm.txt | 2 + 0x15-file_io/tests/task_0/textfile_0.txt | 22 ++ 0x15-file_io/tests/task_1/1-main.c | 21 ++ 0x15-file_io/tests/task_1/main_0.c | 25 ++ 0x15-file_io/tests/task_1/main_4.c | 24 ++ 0x15-file_io/tests/task_1/main_5.c | 18 + 0x15-file_io/tests/task_1/no_read_perm.txt | 2 + 0x15-file_io/tests/task_2/2-main.c | 20 ++ 0x15-file_io/tests/task_2/main_0.c | 26 ++ 0x15-file_io/tests/task_2/main_2.c | 25 ++ 0x15-file_io/tests/task_2/main_3.c | 25 ++ 0x15-file_io/tests/task_2/no_read_perm.txt | 2 + 0x15-file_io/tests/task_2/no_write_perm.txt | 2 + 0x15-file_io/tests/task_2/textfile_0.txt | 22 ++ 0x15-file_io/tests/task_3/_constructor.c | 7 + 0x15-file_io/tests/task_3/case_9.bash | 4 + 0x15-file_io/tests/task_3/no_read_perm.txt | 2 + 0x15-file_io/tests/task_3/no_write_perm.txt | 2 + 0x15-file_io/tests/task_3/textfile_0.txt | 22 ++ 0x15-file_io/tests/task_3/textfile_2.txt | 19 ++ 0x15-file_io/tests/task_3/textfile_3 | Bin 0 -> 2877 bytes 0x15-file_io/tests/task_3/textfile_4.txt | 14 + 0x15-file_io/tests/task_3/textfile_5.txt | 14 + 0x15-file_io/tests/task_4/netbsd32 | Bin 0 -> 4917 bytes 0x15-file_io/tests/task_4/solaris32 | Bin 0 -> 184368 bytes 0x15-file_io/tests/task_4/sortix32 | Bin 0 -> 4917 bytes 0x15-file_io/tests/task_4/sparcbigendian32 | Bin 0 -> 85520 bytes 0x15-file_io/tests/task_4/ubuntu64 | Bin 0 -> 8920 bytes 0x15-file_io/tests/task_4/ubuntu64 (1) | Bin 0 -> 8920 bytes .../tests/task_0/0-main.c | 31 ++ .../tests/task_0/main_0.c | 20 ++ .../tests/task_0/main_1.c | 17 + .../tests/task_0/main_2.c | 72 ++++ .../tests/task_0/main_3.c | 20 ++ .../tests/task_0/main_4.c | 16 + .../tests/task_1/1-main.c | 31 ++ .../tests/task_1/main_0.c | 20 ++ .../tests/task_1/main_1.c | 17 + .../tests/task_1/main_2.c | 72 ++++ .../tests/task_1/main_3.c | 20 ++ .../tests/task_1/main_4.c | 16 + .../tests/task_2/2-main.c | 22 ++ .../tests/task_2/main_0.c | 54 +++ .../tests/task_2/main_1.c | 53 +++ .../tests/task_2/main_2.c | 54 +++ .../tests/task_2/main_3.c | 54 +++ .../tests/task_3/3-main.c | 22 ++ .../tests/task_3/main_0.c | 54 +++ .../tests/task_3/main_1.c | 53 +++ .../tests/task_3/main_2.c | 54 +++ .../tests/task_3/main_3.c | 54 +++ .../tests/task_4/4-main.c | 25 ++ .../tests/task_4/main_0.c | 58 ++++ .../tests/task_4/main_1.c | 58 ++++ .../tests/task_4/main_2.c | 58 ++++ .../tests/task_4/main_3.c | 15 + .../tests/task_5/5-main.c | 28 ++ .../tests/task_5/main_0.c | 77 +++++ .../tests/task_5/main_1.c | 77 +++++ .../tests/task_5/main_2.c | 81 +++++ .../tests/task_5/main_3.c | 77 +++++ .../tests/task_5/main_4.c | 22 ++ .../tests/task_6/6-main.c | 27 ++ .../tests/task_6/main_0.c | 74 ++++ .../tests/task_6/main_1.c | 74 ++++ .../tests/task_6/main_2.c | 74 ++++ .../tests/task_6/main_3.c | 74 ++++ .../tests/task_6/main_4.c | 19 ++ .../tests/task_7/7-main.c | 28 ++ .../tests/task_7/main_0.c | 84 +++++ .../tests/task_7/main_1.c | 84 +++++ .../tests/task_7/main_2.c | 93 +++++ .../tests/task_7/main_3.c | 84 +++++ .../tests/task_7/main_4.c | 29 ++ .../tests/task_8/8-main.c | 65 ++++ .../tests/task_8/main_0.c | 81 +++++ .../tests/task_8/main_1.c | 81 +++++ .../tests/task_8/main_2.c | 85 +++++ .../tests/task_8/main_3.c | 81 +++++ .../tests/task_8/main_4.c | 19 ++ .../tests/task_1/source_0.c | 8 + .../tests/task_1/source_1.c | 8 + .../tests/task_1/source_2.c | 8 + 0x1A-hash_tables/tests/task_0/main_0.c | 20 ++ 0x1A-hash_tables/tests/task_1/main_0.c | 17 + 0x1A-hash_tables/tests/task_1/main_1.c | 17 + 0x1A-hash_tables/tests/task_1/main_2.c | 17 + 0x1A-hash_tables/tests/task_1/main_3.c | 17 + 0x1A-hash_tables/tests/task_2/main_0.c | 20 ++ 0x1A-hash_tables/tests/task_2/main_1.c | 20 ++ 0x1A-hash_tables/tests/task_2/main_2.c | 20 ++ 0x1A-hash_tables/tests/task_3/main_0.c | 44 +++ 0x1A-hash_tables/tests/task_3/main_1.c | 70 ++++ 0x1A-hash_tables/tests/task_3/main_2.c | 70 ++++ 0x1A-hash_tables/tests/task_3/main_3.c | 70 ++++ 0x1A-hash_tables/tests/task_3/main_4.c | 48 +++ 0x1A-hash_tables/tests/task_3/main_5.c | 50 +++ 0x1A-hash_tables/tests/task_3/main_6.c | 18 + 0x1A-hash_tables/tests/task_4/main_0.c | 35 ++ 0x1A-hash_tables/tests/task_4/main_1.c | 35 ++ 0x1A-hash_tables/tests/task_4/main_2.c | 18 + 0x1A-hash_tables/tests/task_4/main_3.c | 35 ++ 0x1A-hash_tables/tests/task_5/main_0.c | 33 ++ 0x1A-hash_tables/tests/task_5/main_1.c | 33 ++ 0x1A-hash_tables/tests/task_5/main_2.c | 15 + 0x1A-hash_tables/tests/task_6/main_0.c | 17 + 0x1A-hash_tables/tests/task_6/main_1.c | 30 ++ 0x1A-hash_tables/tests/task_6/main_2.c | 30 ++ 0x1A-hash_tables/tests/task_6/main_3.c | 30 ++ 0x1A-hash_tables/tests/task_6/main_4.c | 22 ++ 0x1A-hash_tables/tests/task_6/main_5.c | 19 ++ 0x1A-hash_tables/tests/task_7/main_0.c | 20 ++ 0x1A-hash_tables/tests/task_7/main_1.c | 70 ++++ 0x1A-hash_tables/tests/task_7/main_10.c | 18 + 0x1A-hash_tables/tests/task_7/main_11.c | 35 ++ 0x1A-hash_tables/tests/task_7/main_12.c | 33 ++ 0x1A-hash_tables/tests/task_7/main_13.c | 33 ++ 0x1A-hash_tables/tests/task_7/main_14.c | 15 + 0x1A-hash_tables/tests/task_7/main_15.c | 33 ++ 0x1A-hash_tables/tests/task_7/main_16.c | 33 ++ 0x1A-hash_tables/tests/task_7/main_17.c | 15 + 0x1A-hash_tables/tests/task_7/main_2.c | 96 ++++++ 0x1A-hash_tables/tests/task_7/main_3.c | 96 ++++++ 0x1A-hash_tables/tests/task_7/main_4.c | 96 ++++++ 0x1A-hash_tables/tests/task_7/main_5.c | 74 ++++ 0x1A-hash_tables/tests/task_7/main_6.c | 78 +++++ 0x1A-hash_tables/tests/task_7/main_7.c | 18 + 0x1A-hash_tables/tests/task_7/main_8.c | 35 ++ 0x1A-hash_tables/tests/task_7/main_9.c | 35 ++ 0x1C-makefiles/tests/task_0/m.h | 9 + 0x1C-makefiles/tests/task_0/main.c | 12 + 0x1C-makefiles/tests/task_0/main_0.c | 12 + 0x1C-makefiles/tests/task_1/m.h | 9 + 0x1C-makefiles/tests/task_1/main.c | 12 + 0x1C-makefiles/tests/task_1/main_0.c | 12 + 0x1C-makefiles/tests/task_1/school.c | 36 ++ 0x1C-makefiles/tests/task_2/m.h | 9 + 0x1C-makefiles/tests/task_2/main.c | 12 + 0x1C-makefiles/tests/task_2/main_0.c | 12 + 0x1C-makefiles/tests/task_3/m.h | 9 + 0x1C-makefiles/tests/task_3/main.c | 12 + 0x1C-makefiles/tests/task_3/main_0.c | 12 + 0x1C-makefiles/tests/task_3/school.c | 36 ++ 0x1C-makefiles/tests/task_4/m.h | 9 + 0x1C-makefiles/tests/task_4/main.c | 12 + 0x1C-makefiles/tests/task_4/main_0.c | 12 + 0x1C-makefiles/tests/task_5/main_0.py | 15 + 0x1C-makefiles/tests/task_5/main_1.py | 13 + 0x1C-makefiles/tests/task_5/main_2.py | 14 + 0x1C-makefiles/tests/task_5/main_3.py | 13 + 0x1C-makefiles/tests/task_5/main_4.py | 13 + 0x1C-makefiles/tests/task_5/main_5.py | 15 + 0x1C-makefiles/tests/task_5/main_6.py | 15 + 0x1C-makefiles/tests/task_6/m.h | 9 + 0x1C-makefiles/tests/task_6/main.c | 12 + 0x1C-makefiles/tests/task_6/main_0.c | 12 + 0x1E-search_algorithms/tests/task_0/main_0.c | 17 + 0x1E-search_algorithms/tests/task_0/main_1.c | 17 + 0x1E-search_algorithms/tests/task_0/main_2.c | 17 + 0x1E-search_algorithms/tests/task_0/main_3.c | 13 + 0x1E-search_algorithms/tests/task_1/main_0.c | 16 + 0x1E-search_algorithms/tests/task_1/main_1.c | 16 + 0x1E-search_algorithms/tests/task_1/main_2.c | 16 + 0x1E-search_algorithms/tests/task_1/main_3.c | 13 + 0x1E-search_algorithms/tests/task_10/main_0.c | 16 + 0x1E-search_algorithms/tests/task_10/main_1.c | 16 + 0x1E-search_algorithms/tests/task_10/main_2.c | 16 + 0x1E-search_algorithms/tests/task_10/main_3.c | 13 + 0x1E-search_algorithms/tests/task_11/main_0.c | 16 + 0x1E-search_algorithms/tests/task_11/main_1.c | 16 + 0x1E-search_algorithms/tests/task_11/main_2.c | 16 + 0x1E-search_algorithms/tests/task_11/main_3.c | 16 + 0x1E-search_algorithms/tests/task_11/main_4.c | 13 + 0x1E-search_algorithms/tests/task_12/main_0.c | 26 ++ 0x1E-search_algorithms/tests/task_13/main_0.c | 26 ++ 0x1E-search_algorithms/tests/task_13/main_1.c | 26 ++ 0x1E-search_algorithms/tests/task_13/main_2.c | 26 ++ 0x1E-search_algorithms/tests/task_13/main_3.c | 14 + 0x1E-search_algorithms/tests/task_7/main_0.c | 16 + 0x1E-search_algorithms/tests/task_7/main_1.c | 16 + 0x1E-search_algorithms/tests/task_7/main_2.c | 16 + 0x1E-search_algorithms/tests/task_7/main_3.c | 13 + 0x1E-search_algorithms/tests/task_9/main_0.c | 17 + 0x1E-search_algorithms/tests/task_9/main_1.c | 17 + 0x1E-search_algorithms/tests/task_9/main_2.c | 17 + 0x1E-search_algorithms/tests/task_9/main_3.c | 13 + l.sh | 6 + tests.sh | 25 ++ 807 files changed, 23145 insertions(+) create mode 100644 0x00-hello_world/tests/task_0/0-main.c create mode 100644 0x00-hello_world/tests/task_1/1-main.c create mode 100644 0x00-hello_world/tests/task_2/2-main.c create mode 100644 0x00-hello_world/tests/task_3/3-main.c create mode 100644 0x00-hello_world/tests/task_7/100-main.c create mode 100644 0x02-functions_nested_loops/tests/task_1/1-main.c create mode 100644 0x02-functions_nested_loops/tests/task_1/main.c create mode 100644 0x02-functions_nested_loops/tests/task_10/10-main.c create mode 100644 0x02-functions_nested_loops/tests/task_10/main_0.c create mode 100644 0x02-functions_nested_loops/tests/task_10/main_1.c create mode 100644 0x02-functions_nested_loops/tests/task_10/main_2.c create mode 100644 0x02-functions_nested_loops/tests/task_10/main_3.c create mode 100644 0x02-functions_nested_loops/tests/task_10/main_4.c create mode 100644 0x02-functions_nested_loops/tests/task_10/main_5.c create mode 100644 0x02-functions_nested_loops/tests/task_10/main_6.c create mode 100644 0x02-functions_nested_loops/tests/task_11/11-main.c create mode 100644 0x02-functions_nested_loops/tests/task_11/main_0.c create mode 100644 0x02-functions_nested_loops/tests/task_11/main_1.c create mode 100644 0x02-functions_nested_loops/tests/task_11/main_2.c create mode 100644 0x02-functions_nested_loops/tests/task_11/main_3.c create mode 100644 0x02-functions_nested_loops/tests/task_11/main_4.c create mode 100644 0x02-functions_nested_loops/tests/task_11/main_5.c create mode 100644 0x02-functions_nested_loops/tests/task_12/main_0.c create mode 100644 0x02-functions_nested_loops/tests/task_12/main_1.c create mode 100644 0x02-functions_nested_loops/tests/task_12/main_2.c create mode 100644 0x02-functions_nested_loops/tests/task_12/main_3.c create mode 100644 0x02-functions_nested_loops/tests/task_12/main_4.c create mode 100644 0x02-functions_nested_loops/tests/task_12/main_5.c create mode 100644 0x02-functions_nested_loops/tests/task_2/2-main.c create mode 100644 0x02-functions_nested_loops/tests/task_2/main.c create mode 100644 0x02-functions_nested_loops/tests/task_3/3-main.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_0.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_1.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_10.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_2.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_3.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_4.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_5.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_6.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_7.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_8.c create mode 100644 0x02-functions_nested_loops/tests/task_3/main_9.c create mode 100644 0x02-functions_nested_loops/tests/task_4/4-main.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_0.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_1.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_10.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_2.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_3.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_4.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_5.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_6.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_7.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_8.c create mode 100644 0x02-functions_nested_loops/tests/task_4/main_9.c create mode 100644 0x02-functions_nested_loops/tests/task_5/5-main.c create mode 100644 0x02-functions_nested_loops/tests/task_5/main_0.c create mode 100644 0x02-functions_nested_loops/tests/task_5/main_1.c create mode 100644 0x02-functions_nested_loops/tests/task_5/main_2.c create mode 100644 0x02-functions_nested_loops/tests/task_5/main_3.c create mode 100644 0x02-functions_nested_loops/tests/task_5/main_4.c create mode 100644 0x02-functions_nested_loops/tests/task_5/main_5.c create mode 100644 0x02-functions_nested_loops/tests/task_5/main_6.c create mode 100644 0x02-functions_nested_loops/tests/task_5/main_7.c create mode 100644 0x02-functions_nested_loops/tests/task_6/6-main.c create mode 100644 0x02-functions_nested_loops/tests/task_6/main_0.c create mode 100644 0x02-functions_nested_loops/tests/task_6/main_1.c create mode 100644 0x02-functions_nested_loops/tests/task_6/main_2.c create mode 100644 0x02-functions_nested_loops/tests/task_6/main_3.c create mode 100644 0x02-functions_nested_loops/tests/task_6/main_4.c create mode 100644 0x02-functions_nested_loops/tests/task_6/main_5.c create mode 100644 0x02-functions_nested_loops/tests/task_6/main_6.c create mode 100644 0x02-functions_nested_loops/tests/task_6/main_7.c create mode 100644 0x02-functions_nested_loops/tests/task_7/7-main.c create mode 100644 0x02-functions_nested_loops/tests/task_7/main_0.c create mode 100644 0x02-functions_nested_loops/tests/task_7/main_1.c create mode 100644 0x02-functions_nested_loops/tests/task_7/main_2.c create mode 100644 0x02-functions_nested_loops/tests/task_7/main_3.c create mode 100644 0x02-functions_nested_loops/tests/task_7/main_4.c create mode 100644 0x02-functions_nested_loops/tests/task_7/main_5.c create mode 100644 0x02-functions_nested_loops/tests/task_8/8-main.c create mode 100644 0x02-functions_nested_loops/tests/task_8/main_0.c create mode 100644 0x02-functions_nested_loops/tests/task_9/9-main.c create mode 100644 0x02-functions_nested_loops/tests/task_9/main_0.c create mode 100644 0x03-debugging/tests/task_2/2-main.c create mode 100644 0x03-debugging/tests/task_2/main_0.c create mode 100644 0x03-debugging/tests/task_2/main_1.c create mode 100644 0x03-debugging/tests/task_2/main_2.c create mode 100644 0x03-debugging/tests/task_2/main_3.c create mode 100644 0x03-debugging/tests/task_2/main_4.c create mode 100644 0x03-debugging/tests/task_2/main_5.c create mode 100644 0x03-debugging/tests/task_2/main_6.c create mode 100644 0x03-debugging/tests/task_2/main_7.c create mode 100644 0x03-debugging/tests/task_2/main_8.c create mode 100644 0x03-debugging/tests/task_3/main_0.c create mode 100644 0x03-debugging/tests/task_3/main_1.c create mode 100644 0x03-debugging/tests/task_3/main_2.c create mode 100644 0x03-debugging/tests/task_3/main_3.c create mode 100644 0x03-debugging/tests/task_3/main_4.c create mode 100644 0x03-debugging/tests/task_3/main_5.c create mode 100644 0x03-debugging/tests/task_3/main_6.c create mode 100644 0x03-debugging/tests/task_3/main_7.c create mode 100644 0x04-more_functions_nested_loops/tests/task_0/0-main.c create mode 100644 0x04-more_functions_nested_loops/tests/task_0/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_0/main_1.c create mode 100644 0x04-more_functions_nested_loops/tests/task_1/1-main.c create mode 100644 0x04-more_functions_nested_loops/tests/task_1/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_1/main_1.c create mode 100644 0x04-more_functions_nested_loops/tests/task_10/10-main.c create mode 100644 0x04-more_functions_nested_loops/tests/task_10/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_10/main_1.c create mode 100644 0x04-more_functions_nested_loops/tests/task_10/main_2.c create mode 100644 0x04-more_functions_nested_loops/tests/task_10/main_3.c create mode 100644 0x04-more_functions_nested_loops/tests/task_10/main_4.c create mode 100644 0x04-more_functions_nested_loops/tests/task_12/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_12/main_1.c create mode 100644 0x04-more_functions_nested_loops/tests/task_12/main_2.c create mode 100644 0x04-more_functions_nested_loops/tests/task_12/main_3.c create mode 100644 0x04-more_functions_nested_loops/tests/task_12/main_4.c create mode 100644 0x04-more_functions_nested_loops/tests/task_12/main_5.c create mode 100644 0x04-more_functions_nested_loops/tests/task_12/main_6.c create mode 100644 0x04-more_functions_nested_loops/tests/task_12/main_7.c create mode 100644 0x04-more_functions_nested_loops/tests/task_12/main_8.c create mode 100644 0x04-more_functions_nested_loops/tests/task_12/main_9.c create mode 100644 0x04-more_functions_nested_loops/tests/task_2/2-main.c create mode 100644 0x04-more_functions_nested_loops/tests/task_2/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_3/3-main.c create mode 100644 0x04-more_functions_nested_loops/tests/task_3/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_4/4-main.c create mode 100644 0x04-more_functions_nested_loops/tests/task_4/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_5/5-main.c create mode 100644 0x04-more_functions_nested_loops/tests/task_5/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_6/6-main.c create mode 100644 0x04-more_functions_nested_loops/tests/task_6/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_6/main_1.c create mode 100644 0x04-more_functions_nested_loops/tests/task_6/main_3.c create mode 100644 0x04-more_functions_nested_loops/tests/task_6/main_4.c create mode 100644 0x04-more_functions_nested_loops/tests/task_7/7-main.c create mode 100644 0x04-more_functions_nested_loops/tests/task_7/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_7/main_1.c create mode 100644 0x04-more_functions_nested_loops/tests/task_7/main_2.c create mode 100644 0x04-more_functions_nested_loops/tests/task_7/main_3.c create mode 100644 0x04-more_functions_nested_loops/tests/task_7/main_4.c create mode 100644 0x04-more_functions_nested_loops/tests/task_8/8-main.c create mode 100644 0x04-more_functions_nested_loops/tests/task_8/main_0.c create mode 100644 0x04-more_functions_nested_loops/tests/task_8/main_1.c create mode 100644 0x04-more_functions_nested_loops/tests/task_8/main_2.c create mode 100644 0x04-more_functions_nested_loops/tests/task_8/main_3.c create mode 100644 0x04-more_functions_nested_loops/tests/task_8/main_4.c create mode 100644 0x05-pointers_arrays_strings/tests/task_0/0-main.c create mode 100644 0x05-pointers_arrays_strings/tests/task_0/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_0/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_0/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_1/1-main.c create mode 100644 0x05-pointers_arrays_strings/tests/task_1/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_1/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_1/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_10.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_11.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_12.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_3.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_4.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_5.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_6.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_7.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_8.c create mode 100644 0x05-pointers_arrays_strings/tests/task_10/main_9.c create mode 100644 0x05-pointers_arrays_strings/tests/task_2/2-main.c create mode 100644 0x05-pointers_arrays_strings/tests/task_2/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_2/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_2/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_3/3-main.c create mode 100644 0x05-pointers_arrays_strings/tests/task_3/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_3/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_3/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_4/4-main.c create mode 100644 0x05-pointers_arrays_strings/tests/task_4/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_4/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_4/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_5/5-main.c create mode 100644 0x05-pointers_arrays_strings/tests/task_5/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_5/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_5/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_6/6-main.c create mode 100644 0x05-pointers_arrays_strings/tests/task_6/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_6/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_6/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_7/7-main.c create mode 100644 0x05-pointers_arrays_strings/tests/task_7/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_7/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_7/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_8/8-main.c create mode 100644 0x05-pointers_arrays_strings/tests/task_8/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_8/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_8/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_9/9-main.c create mode 100644 0x05-pointers_arrays_strings/tests/task_9/main_0.c create mode 100644 0x05-pointers_arrays_strings/tests/task_9/main_1.c create mode 100644 0x05-pointers_arrays_strings/tests/task_9/main_2.c create mode 100644 0x05-pointers_arrays_strings/tests/task_9/main_3.c create mode 100644 0x06-pointers_arrays_strings/tests/task_0/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_0/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_0/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_1/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_1/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_1/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_1/main_3.c create mode 100644 0x06-pointers_arrays_strings/tests/task_11/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_11/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_11/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_12/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_12/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_12/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_12/main_3.c create mode 100644 0x06-pointers_arrays_strings/tests/task_2/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_2/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_2/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_2/main_3.c create mode 100644 0x06-pointers_arrays_strings/tests/task_2/main_4.c create mode 100644 0x06-pointers_arrays_strings/tests/task_3/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_3/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_3/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_4/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_4/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_4/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_4/main_3.c create mode 100644 0x06-pointers_arrays_strings/tests/task_5/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_5/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_5/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_6/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_6/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_6/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_6/main_3.c create mode 100644 0x06-pointers_arrays_strings/tests/task_7/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_7/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_7/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_8/main_0.c create mode 100644 0x06-pointers_arrays_strings/tests/task_8/main_1.c create mode 100644 0x06-pointers_arrays_strings/tests/task_8/main_2.c create mode 100644 0x06-pointers_arrays_strings/tests/task_9/main_0.c create mode 100644 0x07-pointers_arrays_strings/tests/task_0/main_0.c create mode 100644 0x07-pointers_arrays_strings/tests/task_0/main_1.c create mode 100644 0x07-pointers_arrays_strings/tests/task_0/main_2.c create mode 100644 0x07-pointers_arrays_strings/tests/task_1/main_0.c create mode 100644 0x07-pointers_arrays_strings/tests/task_1/main_1.c create mode 100644 0x07-pointers_arrays_strings/tests/task_1/main_2.c create mode 100644 0x07-pointers_arrays_strings/tests/task_2/main_0.c create mode 100644 0x07-pointers_arrays_strings/tests/task_2/main_1.c create mode 100644 0x07-pointers_arrays_strings/tests/task_2/main_2.c create mode 100644 0x07-pointers_arrays_strings/tests/task_3/main_0.c create mode 100644 0x07-pointers_arrays_strings/tests/task_3/main_1.c create mode 100644 0x07-pointers_arrays_strings/tests/task_3/main_2.c create mode 100644 0x07-pointers_arrays_strings/tests/task_4/main_0.c create mode 100644 0x07-pointers_arrays_strings/tests/task_4/main_1.c create mode 100644 0x07-pointers_arrays_strings/tests/task_4/main_2.c create mode 100644 0x07-pointers_arrays_strings/tests/task_5/main_0.c create mode 100644 0x07-pointers_arrays_strings/tests/task_5/main_1.c create mode 100644 0x07-pointers_arrays_strings/tests/task_5/main_2.c create mode 100644 0x07-pointers_arrays_strings/tests/task_6/main_0.c create mode 100644 0x07-pointers_arrays_strings/tests/task_6/main_1.c create mode 100644 0x07-pointers_arrays_strings/tests/task_6/main_2.c create mode 100644 0x07-pointers_arrays_strings/tests/task_7/main_0.c create mode 100644 0x07-pointers_arrays_strings/tests/task_7/main_1.c create mode 100644 0x07-pointers_arrays_strings/tests/task_7/main_2.c create mode 100644 0x07-pointers_arrays_strings/tests/task_8/main_0.c create mode 100644 0x07-pointers_arrays_strings/tests/task_8/main_1.c create mode 100644 0x07-pointers_arrays_strings/tests/task_8/main_2.c create mode 100644 0x08-recursion/tests/task_0/count_loops.c create mode 100644 0x08-recursion/tests/task_0/count_static_variables.c create mode 100644 0x08-recursion/tests/task_0/main_0.c create mode 100644 0x08-recursion/tests/task_0/main_1.c create mode 100644 0x08-recursion/tests/task_0/main_2.c create mode 100644 0x08-recursion/tests/task_1/count_loops.c create mode 100644 0x08-recursion/tests/task_1/count_static_variables.c create mode 100644 0x08-recursion/tests/task_1/main_0.c create mode 100644 0x08-recursion/tests/task_1/main_1.c create mode 100644 0x08-recursion/tests/task_1/main_2.c create mode 100644 0x08-recursion/tests/task_2/count_loops.c create mode 100644 0x08-recursion/tests/task_2/count_static_variables.c create mode 100644 0x08-recursion/tests/task_2/main_0.c create mode 100644 0x08-recursion/tests/task_2/main_1.c create mode 100644 0x08-recursion/tests/task_2/main_2.c create mode 100644 0x08-recursion/tests/task_3/count_loops.pl create mode 100644 0x08-recursion/tests/task_3/count_static_variables.pl create mode 100644 0x08-recursion/tests/task_3/main_0.c create mode 100644 0x08-recursion/tests/task_3/main_1.c create mode 100644 0x08-recursion/tests/task_3/main_2.c create mode 100644 0x08-recursion/tests/task_4/count_loops.pl create mode 100644 0x08-recursion/tests/task_4/count_static_variables.pl create mode 100644 0x08-recursion/tests/task_4/main_0.c create mode 100644 0x08-recursion/tests/task_4/main_1.c create mode 100644 0x08-recursion/tests/task_4/main_2.c create mode 100644 0x08-recursion/tests/task_4/main_3.c create mode 100644 0x08-recursion/tests/task_5/count_loops.c create mode 100644 0x08-recursion/tests/task_5/count_static_variables.c create mode 100644 0x08-recursion/tests/task_5/main_0.c create mode 100644 0x08-recursion/tests/task_5/main_1.c create mode 100644 0x08-recursion/tests/task_5/main_2.c create mode 100644 0x08-recursion/tests/task_5/main_3.c create mode 100644 0x08-recursion/tests/task_6/count_loops.c create mode 100644 0x08-recursion/tests/task_6/count_static_variables.c create mode 100644 0x08-recursion/tests/task_6/main_0.c create mode 100644 0x08-recursion/tests/task_6/main_1.c create mode 100644 0x08-recursion/tests/task_6/main_2.c create mode 100644 0x08-recursion/tests/task_6/main_3.c create mode 100644 0x08-recursion/tests/task_7/count_loops.c create mode 100644 0x08-recursion/tests/task_7/count_static_variables.c create mode 100644 0x08-recursion/tests/task_7/main_0.c create mode 100644 0x08-recursion/tests/task_7/main_1.c create mode 100644 0x08-recursion/tests/task_7/main_2.c create mode 100644 0x08-recursion/tests/task_7/main_3.c create mode 100644 0x08-recursion/tests/task_8/count_loops.c create mode 100644 0x08-recursion/tests/task_8/count_static_variables.c create mode 100644 0x08-recursion/tests/task_8/main_0.c create mode 100644 0x08-recursion/tests/task_8/main_1.c create mode 100644 0x08-recursion/tests/task_8/main_10.c create mode 100644 0x08-recursion/tests/task_8/main_11.c create mode 100644 0x08-recursion/tests/task_8/main_12.c create mode 100644 0x08-recursion/tests/task_8/main_13.c create mode 100644 0x08-recursion/tests/task_8/main_2.c create mode 100644 0x08-recursion/tests/task_8/main_3.c create mode 100644 0x08-recursion/tests/task_8/main_4.c create mode 100644 0x08-recursion/tests/task_8/main_5.c create mode 100644 0x08-recursion/tests/task_8/main_6.c create mode 100644 0x08-recursion/tests/task_8/main_7.c create mode 100644 0x08-recursion/tests/task_8/main_8.c create mode 100644 0x08-recursion/tests/task_8/main_9.c create mode 100644 0x09-static_libraries/tests/task_0/main.c create mode 100644 0x09-static_libraries/tests/task_1/source_0.c create mode 100644 0x09-static_libraries/tests/task_1/source_1.c create mode 100644 0x09-static_libraries/tests/task_1/source_2.c create mode 100644 0x0B-malloc_free/tests/task_0/main_0.c create mode 100644 0x0B-malloc_free/tests/task_0/main_1.c create mode 100644 0x0B-malloc_free/tests/task_0/main_2.c create mode 100644 0x0B-malloc_free/tests/task_0/main_3.c create mode 100644 0x0B-malloc_free/tests/task_1/main_0.c create mode 100644 0x0B-malloc_free/tests/task_1/main_1.c create mode 100644 0x0B-malloc_free/tests/task_1/main_2.c create mode 100644 0x0B-malloc_free/tests/task_1/main_3.c create mode 100644 0x0B-malloc_free/tests/task_2/main_0.c create mode 100644 0x0B-malloc_free/tests/task_2/main_1.c create mode 100644 0x0B-malloc_free/tests/task_2/main_2.c create mode 100644 0x0B-malloc_free/tests/task_2/main_3.c create mode 100644 0x0B-malloc_free/tests/task_3/main_0.c create mode 100644 0x0B-malloc_free/tests/task_3/main_1.c create mode 100644 0x0B-malloc_free/tests/task_3/main_2.c create mode 100644 0x0B-malloc_free/tests/task_3/main_3.c create mode 100644 0x0B-malloc_free/tests/task_4/main_0.c create mode 100644 0x0B-malloc_free/tests/task_4/main_1.c create mode 100644 0x0B-malloc_free/tests/task_4/main_2.c create mode 100644 0x0B-malloc_free/tests/task_4/main_3.c create mode 100644 0x0B-malloc_free/tests/task_5/main_0.c create mode 100644 0x0B-malloc_free/tests/task_5/main_3.c create mode 100644 0x0B-malloc_free/tests/task_6/main_0.c create mode 100644 0x0B-malloc_free/tests/task_6/main_1.c create mode 100644 0x0B-malloc_free/tests/task_6/main_2.c create mode 100644 0x0B-malloc_free/tests/task_6/main_3.c create mode 100644 0x0B-malloc_free/tests/task_6/main_4.c create mode 100644 0x0C-more_malloc_free/tests/task_0/main_0.c create mode 100644 0x0C-more_malloc_free/tests/task_0/main_1.c create mode 100644 0x0C-more_malloc_free/tests/task_0/main_2.c create mode 100644 0x0C-more_malloc_free/tests/task_1/main_0.c create mode 100644 0x0C-more_malloc_free/tests/task_1/main_1.c create mode 100644 0x0C-more_malloc_free/tests/task_1/main_2.c create mode 100644 0x0C-more_malloc_free/tests/task_1/main_3.c create mode 100644 0x0C-more_malloc_free/tests/task_2/main_0.c create mode 100644 0x0C-more_malloc_free/tests/task_2/main_1.c create mode 100644 0x0C-more_malloc_free/tests/task_2/main_2.c create mode 100644 0x0C-more_malloc_free/tests/task_2/main_3.c create mode 100644 0x0C-more_malloc_free/tests/task_2/main_4.c create mode 100644 0x0C-more_malloc_free/tests/task_3/main_0.c create mode 100644 0x0C-more_malloc_free/tests/task_3/main_1.c create mode 100644 0x0C-more_malloc_free/tests/task_3/main_2.c create mode 100644 0x0C-more_malloc_free/tests/task_3/main_3.c create mode 100644 0x0C-more_malloc_free/tests/task_3/main_4.c create mode 100644 0x0C-more_malloc_free/tests/task_3/main_5.c create mode 100644 0x0C-more_malloc_free/tests/task_4/main_0.c create mode 100644 0x0C-more_malloc_free/tests/task_4/main_1.c create mode 100644 0x0C-more_malloc_free/tests/task_4/main_2.c create mode 100644 0x0C-more_malloc_free/tests/task_4/main_3.c create mode 100644 0x0C-more_malloc_free/tests/task_4/main_4.c create mode 100644 0x0C-more_malloc_free/tests/task_4/main_5.c create mode 100644 0x0C-more_malloc_free/tests/task_5/launch_101-mul.c create mode 100644 0x0D-preprocessor/tests/task_0/main_0.c create mode 100644 0x0D-preprocessor/tests/task_1/main_0.c create mode 100644 0x0D-preprocessor/tests/task_3/main_0.c create mode 100644 0x0D-preprocessor/tests/task_3/main_1.c create mode 100644 0x0D-preprocessor/tests/task_3/main_2.c create mode 100644 0x0D-preprocessor/tests/task_3/main_3.c create mode 100644 0x0D-preprocessor/tests/task_3/main_4.c create mode 100644 0x0D-preprocessor/tests/task_3/main_5.c create mode 100644 0x0D-preprocessor/tests/task_3/main_6.c create mode 100644 0x0D-preprocessor/tests/task_3/main_7.c create mode 100644 0x0D-preprocessor/tests/task_4/main_0.c create mode 100644 0x0D-preprocessor/tests/task_4/main_1.c create mode 100644 0x0D-preprocessor/tests/task_4/main_2.c create mode 100644 0x0D-preprocessor/tests/task_4/main_3.c create mode 100644 0x0D-preprocessor/tests/task_4/main_4.c create mode 100644 0x0D-preprocessor/tests/task_4/main_5.c create mode 100644 0x0D-preprocessor/tests/task_4/main_6.c create mode 100644 0x0D-preprocessor/tests/task_4/main_7.c create mode 100644 0x0E-structures_typedef/tests/task_0/main_0.c create mode 100644 0x0E-structures_typedef/tests/task_1/main_0.c create mode 100644 0x0E-structures_typedef/tests/task_1/main_1.c create mode 100644 0x0E-structures_typedef/tests/task_2/main_0.c create mode 100644 0x0E-structures_typedef/tests/task_2/main_1.c create mode 100644 0x0E-structures_typedef/tests/task_2/main_2.c create mode 100644 0x0E-structures_typedef/tests/task_3/main_0.c create mode 100644 0x0E-structures_typedef/tests/task_4/main_0.c create mode 100644 0x0E-structures_typedef/tests/task_4/main_1.c create mode 100644 0x0E-structures_typedef/tests/task_5/main_0.c create mode 100644 0x0E-structures_typedef/tests/task_5/main_1.c create mode 100644 0x0E-structures_typedef/tests/task_5/main_2.c create mode 100644 0x0F-function_pointers/tests/task_0/0-main.c create mode 100644 0x0F-function_pointers/tests/task_0/main_0.c create mode 100644 0x0F-function_pointers/tests/task_0/main_1.c create mode 100644 0x0F-function_pointers/tests/task_1/main_0.c create mode 100644 0x0F-function_pointers/tests/task_1/main_1.c create mode 100644 0x0F-function_pointers/tests/task_1/main_2.c create mode 100644 0x0F-function_pointers/tests/task_1/main_3.c create mode 100644 0x0F-function_pointers/tests/task_1/main_4.c create mode 100644 0x0F-function_pointers/tests/task_2/2-main.c create mode 100644 0x0F-function_pointers/tests/task_2/main_0.c create mode 100644 0x0F-function_pointers/tests/task_2/main_1.c create mode 100644 0x0F-function_pointers/tests/task_2/main_2.c create mode 100644 0x0F-function_pointers/tests/task_2/main_3.c create mode 100644 0x0F-function_pointers/tests/task_2/main_4.c create mode 100644 0x0F-function_pointers/tests/task_2/main_5.c create mode 100644 0x0F-function_pointers/tests/task_4/helper_0.c create mode 100644 0x0F-function_pointers/tests/task_4/helper_1.c create mode 100644 0x10-variadic_functions/tests/task_0/0-main.c create mode 100644 0x10-variadic_functions/tests/task_0/main_0.c create mode 100644 0x10-variadic_functions/tests/task_0/main_1.c create mode 100644 0x10-variadic_functions/tests/task_0/main_2.c create mode 100644 0x10-variadic_functions/tests/task_0/main_3.c create mode 100644 0x10-variadic_functions/tests/task_1/1-main.c create mode 100644 0x10-variadic_functions/tests/task_1/main_0.c create mode 100644 0x10-variadic_functions/tests/task_1/main_1.c create mode 100644 0x10-variadic_functions/tests/task_1/main_2.c create mode 100644 0x10-variadic_functions/tests/task_1/main_3.c create mode 100644 0x10-variadic_functions/tests/task_1/main_4.c create mode 100644 0x10-variadic_functions/tests/task_2/2-main.c create mode 100644 0x10-variadic_functions/tests/task_2/main_0.c create mode 100644 0x10-variadic_functions/tests/task_2/main_1.c create mode 100644 0x10-variadic_functions/tests/task_2/main_2.c create mode 100644 0x10-variadic_functions/tests/task_2/main_3.c create mode 100644 0x10-variadic_functions/tests/task_2/main_4.c create mode 100644 0x10-variadic_functions/tests/task_2/main_5.c create mode 100644 0x10-variadic_functions/tests/task_3/3-main.c create mode 100644 0x10-variadic_functions/tests/task_3/main_0.c create mode 100644 0x10-variadic_functions/tests/task_3/main_1.c create mode 100644 0x10-variadic_functions/tests/task_3/main_2.c create mode 100644 0x10-variadic_functions/tests/task_3/main_3.c create mode 100644 0x10-variadic_functions/tests/task_3/main_4.c create mode 100644 0x10-variadic_functions/tests/task_3/main_5.c create mode 100644 0x12-singly_linked_lists/tests/task_0/0-main.c create mode 100644 0x12-singly_linked_lists/tests/task_0/main_0.c create mode 100644 0x12-singly_linked_lists/tests/task_0/main_1.c create mode 100644 0x12-singly_linked_lists/tests/task_0/main_2.c create mode 100644 0x12-singly_linked_lists/tests/task_0/main_3.c create mode 100644 0x12-singly_linked_lists/tests/task_0/main_4.c create mode 100644 0x12-singly_linked_lists/tests/task_0/main_5.c create mode 100644 0x12-singly_linked_lists/tests/task_1/1-main.c create mode 100644 0x12-singly_linked_lists/tests/task_1/main_0.c create mode 100644 0x12-singly_linked_lists/tests/task_1/main_1.c create mode 100644 0x12-singly_linked_lists/tests/task_1/main_2.c create mode 100644 0x12-singly_linked_lists/tests/task_1/main_3.c create mode 100644 0x12-singly_linked_lists/tests/task_1/main_4.c create mode 100644 0x12-singly_linked_lists/tests/task_2/2-main.c create mode 100644 0x12-singly_linked_lists/tests/task_2/main_0.c create mode 100644 0x12-singly_linked_lists/tests/task_2/main_1.c create mode 100644 0x12-singly_linked_lists/tests/task_2/main_2.c create mode 100644 0x12-singly_linked_lists/tests/task_2/main_3.c create mode 100644 0x12-singly_linked_lists/tests/task_3/3-main.c create mode 100644 0x12-singly_linked_lists/tests/task_3/main_0.c create mode 100644 0x12-singly_linked_lists/tests/task_3/main_1.c create mode 100644 0x12-singly_linked_lists/tests/task_3/main_2.c create mode 100644 0x12-singly_linked_lists/tests/task_3/main_3.c create mode 100644 0x12-singly_linked_lists/tests/task_4/4-main.c create mode 100644 0x12-singly_linked_lists/tests/task_4/main_0.c create mode 100644 0x12-singly_linked_lists/tests/task_4/main_1.c create mode 100644 0x12-singly_linked_lists/tests/task_4/main_2.c create mode 100644 0x12-singly_linked_lists/tests/task_4/main_3.c create mode 100644 0x12-singly_linked_lists/tests/task_4/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_0/0-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_0/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_0/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_0/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_0/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_0/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_1/1-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_1/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_1/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_1/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_1/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_1/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_10/10-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_10/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_10/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_10/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_10/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_10/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_11/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_11/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_11/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_11/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_11/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_12/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_12/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_12/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_12/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_12/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_12/main_5.c create mode 100644 0x13-more_singly_linked_lists/tests/task_13/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_13/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_13/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_13/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_13/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_14/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_14/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_14/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_14/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_14/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_14/main_5.c create mode 100644 0x13-more_singly_linked_lists/tests/task_2/2-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_2/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_2/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_2/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_2/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_3/3-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_3/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_3/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_3/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_3/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_4/4-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_4/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_4/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_4/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_4/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_4/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_5/5-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_5/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_5/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_5/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_5/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_5/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_6/6-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_6/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_6/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_6/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_6/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_6/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_7/7-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_7/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_7/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_7/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_7/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_7/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_8/8-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_8/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_8/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_8/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_8/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_8/main_4.c create mode 100644 0x13-more_singly_linked_lists/tests/task_9/9-main.c create mode 100644 0x13-more_singly_linked_lists/tests/task_9/main_0.c create mode 100644 0x13-more_singly_linked_lists/tests/task_9/main_1.c create mode 100644 0x13-more_singly_linked_lists/tests/task_9/main_2.c create mode 100644 0x13-more_singly_linked_lists/tests/task_9/main_3.c create mode 100644 0x13-more_singly_linked_lists/tests/task_9/main_4.c create mode 100644 0x14-bit_manipulation/tests/task_0/0-main.c create mode 100644 0x14-bit_manipulation/tests/task_0/main_0.c create mode 100644 0x14-bit_manipulation/tests/task_0/main_1.c create mode 100644 0x14-bit_manipulation/tests/task_0/main_2.c create mode 100644 0x14-bit_manipulation/tests/task_0/main_3.c create mode 100644 0x14-bit_manipulation/tests/task_0/main_4.c create mode 100644 0x14-bit_manipulation/tests/task_0/main_5.c create mode 100644 0x14-bit_manipulation/tests/task_0/main_6.c create mode 100644 0x14-bit_manipulation/tests/task_0/main_7.c create mode 100644 0x14-bit_manipulation/tests/task_0/main_8.c create mode 100644 0x14-bit_manipulation/tests/task_0/main_9.c create mode 100644 0x14-bit_manipulation/tests/task_1/1-main.c create mode 100644 0x14-bit_manipulation/tests/task_1/main_0.c create mode 100644 0x14-bit_manipulation/tests/task_1/main_1.c create mode 100644 0x14-bit_manipulation/tests/task_1/main_2.c create mode 100644 0x14-bit_manipulation/tests/task_1/main_3.c create mode 100644 0x14-bit_manipulation/tests/task_1/main_4.c create mode 100644 0x14-bit_manipulation/tests/task_1/main_5.c create mode 100644 0x14-bit_manipulation/tests/task_2/2-main.c create mode 100644 0x14-bit_manipulation/tests/task_2/main_0.c create mode 100644 0x14-bit_manipulation/tests/task_2/main_1.c create mode 100644 0x14-bit_manipulation/tests/task_2/main_2.c create mode 100644 0x14-bit_manipulation/tests/task_2/main_3.c create mode 100644 0x14-bit_manipulation/tests/task_2/main_4.c create mode 100644 0x14-bit_manipulation/tests/task_2/main_5.c create mode 100644 0x14-bit_manipulation/tests/task_3/3-main.c create mode 100644 0x14-bit_manipulation/tests/task_3/main_0.c create mode 100644 0x14-bit_manipulation/tests/task_3/main_1.c create mode 100644 0x14-bit_manipulation/tests/task_3/main_2.c create mode 100644 0x14-bit_manipulation/tests/task_3/main_3.c create mode 100644 0x14-bit_manipulation/tests/task_3/main_4.c create mode 100644 0x14-bit_manipulation/tests/task_4/4-main.c create mode 100644 0x14-bit_manipulation/tests/task_4/main_0.c create mode 100644 0x14-bit_manipulation/tests/task_4/main_1.c create mode 100644 0x14-bit_manipulation/tests/task_4/main_2.c create mode 100644 0x14-bit_manipulation/tests/task_4/main_3.c create mode 100644 0x14-bit_manipulation/tests/task_4/main_4.c create mode 100644 0x14-bit_manipulation/tests/task_5/5-main.c create mode 100644 0x14-bit_manipulation/tests/task_5/main_0.c create mode 100644 0x14-bit_manipulation/tests/task_5/main_1.c create mode 100644 0x14-bit_manipulation/tests/task_5/main_2.c create mode 100644 0x14-bit_manipulation/tests/task_5/main_3.c create mode 100644 0x14-bit_manipulation/tests/task_5/main_4.c create mode 100644 0x14-bit_manipulation/tests/task_6/main_0.c create mode 100644 0x14-bit_manipulation/tests/task_7/main_0.c create mode 100644 0x15-file_io/tests/task_0/0-main.c create mode 100644 0x15-file_io/tests/task_0/main_0.c create mode 100644 0x15-file_io/tests/task_0/no_read_perm.txt create mode 100644 0x15-file_io/tests/task_0/textfile_0.txt create mode 100644 0x15-file_io/tests/task_1/1-main.c create mode 100644 0x15-file_io/tests/task_1/main_0.c create mode 100644 0x15-file_io/tests/task_1/main_4.c create mode 100644 0x15-file_io/tests/task_1/main_5.c create mode 100644 0x15-file_io/tests/task_1/no_read_perm.txt create mode 100644 0x15-file_io/tests/task_2/2-main.c create mode 100644 0x15-file_io/tests/task_2/main_0.c create mode 100644 0x15-file_io/tests/task_2/main_2.c create mode 100644 0x15-file_io/tests/task_2/main_3.c create mode 100644 0x15-file_io/tests/task_2/no_read_perm.txt create mode 100644 0x15-file_io/tests/task_2/no_write_perm.txt create mode 100644 0x15-file_io/tests/task_2/textfile_0.txt create mode 100644 0x15-file_io/tests/task_3/_constructor.c create mode 100644 0x15-file_io/tests/task_3/case_9.bash create mode 100644 0x15-file_io/tests/task_3/no_read_perm.txt create mode 100644 0x15-file_io/tests/task_3/no_write_perm.txt create mode 100644 0x15-file_io/tests/task_3/textfile_0.txt create mode 100644 0x15-file_io/tests/task_3/textfile_2.txt create mode 100644 0x15-file_io/tests/task_3/textfile_3 create mode 100644 0x15-file_io/tests/task_3/textfile_4.txt create mode 100644 0x15-file_io/tests/task_3/textfile_5.txt create mode 100644 0x15-file_io/tests/task_4/netbsd32 create mode 100644 0x15-file_io/tests/task_4/solaris32 create mode 100644 0x15-file_io/tests/task_4/sortix32 create mode 100644 0x15-file_io/tests/task_4/sparcbigendian32 create mode 100644 0x15-file_io/tests/task_4/ubuntu64 create mode 100644 0x15-file_io/tests/task_4/ubuntu64 (1) create mode 100644 0x17-doubly_linked_lists/tests/task_0/0-main.c create mode 100644 0x17-doubly_linked_lists/tests/task_0/main_0.c create mode 100644 0x17-doubly_linked_lists/tests/task_0/main_1.c create mode 100644 0x17-doubly_linked_lists/tests/task_0/main_2.c create mode 100644 0x17-doubly_linked_lists/tests/task_0/main_3.c create mode 100644 0x17-doubly_linked_lists/tests/task_0/main_4.c create mode 100644 0x17-doubly_linked_lists/tests/task_1/1-main.c create mode 100644 0x17-doubly_linked_lists/tests/task_1/main_0.c create mode 100644 0x17-doubly_linked_lists/tests/task_1/main_1.c create mode 100644 0x17-doubly_linked_lists/tests/task_1/main_2.c create mode 100644 0x17-doubly_linked_lists/tests/task_1/main_3.c create mode 100644 0x17-doubly_linked_lists/tests/task_1/main_4.c create mode 100644 0x17-doubly_linked_lists/tests/task_2/2-main.c create mode 100644 0x17-doubly_linked_lists/tests/task_2/main_0.c create mode 100644 0x17-doubly_linked_lists/tests/task_2/main_1.c create mode 100644 0x17-doubly_linked_lists/tests/task_2/main_2.c create mode 100644 0x17-doubly_linked_lists/tests/task_2/main_3.c create mode 100644 0x17-doubly_linked_lists/tests/task_3/3-main.c create mode 100644 0x17-doubly_linked_lists/tests/task_3/main_0.c create mode 100644 0x17-doubly_linked_lists/tests/task_3/main_1.c create mode 100644 0x17-doubly_linked_lists/tests/task_3/main_2.c create mode 100644 0x17-doubly_linked_lists/tests/task_3/main_3.c create mode 100644 0x17-doubly_linked_lists/tests/task_4/4-main.c create mode 100644 0x17-doubly_linked_lists/tests/task_4/main_0.c create mode 100644 0x17-doubly_linked_lists/tests/task_4/main_1.c create mode 100644 0x17-doubly_linked_lists/tests/task_4/main_2.c create mode 100644 0x17-doubly_linked_lists/tests/task_4/main_3.c create mode 100644 0x17-doubly_linked_lists/tests/task_5/5-main.c create mode 100644 0x17-doubly_linked_lists/tests/task_5/main_0.c create mode 100644 0x17-doubly_linked_lists/tests/task_5/main_1.c create mode 100644 0x17-doubly_linked_lists/tests/task_5/main_2.c create mode 100644 0x17-doubly_linked_lists/tests/task_5/main_3.c create mode 100644 0x17-doubly_linked_lists/tests/task_5/main_4.c create mode 100644 0x17-doubly_linked_lists/tests/task_6/6-main.c create mode 100644 0x17-doubly_linked_lists/tests/task_6/main_0.c create mode 100644 0x17-doubly_linked_lists/tests/task_6/main_1.c create mode 100644 0x17-doubly_linked_lists/tests/task_6/main_2.c create mode 100644 0x17-doubly_linked_lists/tests/task_6/main_3.c create mode 100644 0x17-doubly_linked_lists/tests/task_6/main_4.c create mode 100644 0x17-doubly_linked_lists/tests/task_7/7-main.c create mode 100644 0x17-doubly_linked_lists/tests/task_7/main_0.c create mode 100644 0x17-doubly_linked_lists/tests/task_7/main_1.c create mode 100644 0x17-doubly_linked_lists/tests/task_7/main_2.c create mode 100644 0x17-doubly_linked_lists/tests/task_7/main_3.c create mode 100644 0x17-doubly_linked_lists/tests/task_7/main_4.c create mode 100644 0x17-doubly_linked_lists/tests/task_8/8-main.c create mode 100644 0x17-doubly_linked_lists/tests/task_8/main_0.c create mode 100644 0x17-doubly_linked_lists/tests/task_8/main_1.c create mode 100644 0x17-doubly_linked_lists/tests/task_8/main_2.c create mode 100644 0x17-doubly_linked_lists/tests/task_8/main_3.c create mode 100644 0x17-doubly_linked_lists/tests/task_8/main_4.c create mode 100644 0x18-dynamic_libraries/tests/task_1/source_0.c create mode 100644 0x18-dynamic_libraries/tests/task_1/source_1.c create mode 100644 0x18-dynamic_libraries/tests/task_1/source_2.c create mode 100644 0x1A-hash_tables/tests/task_0/main_0.c create mode 100644 0x1A-hash_tables/tests/task_1/main_0.c create mode 100644 0x1A-hash_tables/tests/task_1/main_1.c create mode 100644 0x1A-hash_tables/tests/task_1/main_2.c create mode 100644 0x1A-hash_tables/tests/task_1/main_3.c create mode 100644 0x1A-hash_tables/tests/task_2/main_0.c create mode 100644 0x1A-hash_tables/tests/task_2/main_1.c create mode 100644 0x1A-hash_tables/tests/task_2/main_2.c create mode 100644 0x1A-hash_tables/tests/task_3/main_0.c create mode 100644 0x1A-hash_tables/tests/task_3/main_1.c create mode 100644 0x1A-hash_tables/tests/task_3/main_2.c create mode 100644 0x1A-hash_tables/tests/task_3/main_3.c create mode 100644 0x1A-hash_tables/tests/task_3/main_4.c create mode 100644 0x1A-hash_tables/tests/task_3/main_5.c create mode 100644 0x1A-hash_tables/tests/task_3/main_6.c create mode 100644 0x1A-hash_tables/tests/task_4/main_0.c create mode 100644 0x1A-hash_tables/tests/task_4/main_1.c create mode 100644 0x1A-hash_tables/tests/task_4/main_2.c create mode 100644 0x1A-hash_tables/tests/task_4/main_3.c create mode 100644 0x1A-hash_tables/tests/task_5/main_0.c create mode 100644 0x1A-hash_tables/tests/task_5/main_1.c create mode 100644 0x1A-hash_tables/tests/task_5/main_2.c create mode 100644 0x1A-hash_tables/tests/task_6/main_0.c create mode 100644 0x1A-hash_tables/tests/task_6/main_1.c create mode 100644 0x1A-hash_tables/tests/task_6/main_2.c create mode 100644 0x1A-hash_tables/tests/task_6/main_3.c create mode 100644 0x1A-hash_tables/tests/task_6/main_4.c create mode 100644 0x1A-hash_tables/tests/task_6/main_5.c create mode 100644 0x1A-hash_tables/tests/task_7/main_0.c create mode 100644 0x1A-hash_tables/tests/task_7/main_1.c create mode 100644 0x1A-hash_tables/tests/task_7/main_10.c create mode 100644 0x1A-hash_tables/tests/task_7/main_11.c create mode 100644 0x1A-hash_tables/tests/task_7/main_12.c create mode 100644 0x1A-hash_tables/tests/task_7/main_13.c create mode 100644 0x1A-hash_tables/tests/task_7/main_14.c create mode 100644 0x1A-hash_tables/tests/task_7/main_15.c create mode 100644 0x1A-hash_tables/tests/task_7/main_16.c create mode 100644 0x1A-hash_tables/tests/task_7/main_17.c create mode 100644 0x1A-hash_tables/tests/task_7/main_2.c create mode 100644 0x1A-hash_tables/tests/task_7/main_3.c create mode 100644 0x1A-hash_tables/tests/task_7/main_4.c create mode 100644 0x1A-hash_tables/tests/task_7/main_5.c create mode 100644 0x1A-hash_tables/tests/task_7/main_6.c create mode 100644 0x1A-hash_tables/tests/task_7/main_7.c create mode 100644 0x1A-hash_tables/tests/task_7/main_8.c create mode 100644 0x1A-hash_tables/tests/task_7/main_9.c create mode 100644 0x1C-makefiles/tests/task_0/m.h create mode 100644 0x1C-makefiles/tests/task_0/main.c create mode 100644 0x1C-makefiles/tests/task_0/main_0.c create mode 100644 0x1C-makefiles/tests/task_1/m.h create mode 100644 0x1C-makefiles/tests/task_1/main.c create mode 100644 0x1C-makefiles/tests/task_1/main_0.c create mode 100644 0x1C-makefiles/tests/task_1/school.c create mode 100644 0x1C-makefiles/tests/task_2/m.h create mode 100644 0x1C-makefiles/tests/task_2/main.c create mode 100644 0x1C-makefiles/tests/task_2/main_0.c create mode 100644 0x1C-makefiles/tests/task_3/m.h create mode 100644 0x1C-makefiles/tests/task_3/main.c create mode 100644 0x1C-makefiles/tests/task_3/main_0.c create mode 100644 0x1C-makefiles/tests/task_3/school.c create mode 100644 0x1C-makefiles/tests/task_4/m.h create mode 100644 0x1C-makefiles/tests/task_4/main.c create mode 100644 0x1C-makefiles/tests/task_4/main_0.c create mode 100644 0x1C-makefiles/tests/task_5/main_0.py create mode 100644 0x1C-makefiles/tests/task_5/main_1.py create mode 100644 0x1C-makefiles/tests/task_5/main_2.py create mode 100644 0x1C-makefiles/tests/task_5/main_3.py create mode 100644 0x1C-makefiles/tests/task_5/main_4.py create mode 100644 0x1C-makefiles/tests/task_5/main_5.py create mode 100644 0x1C-makefiles/tests/task_5/main_6.py create mode 100644 0x1C-makefiles/tests/task_6/m.h create mode 100644 0x1C-makefiles/tests/task_6/main.c create mode 100644 0x1C-makefiles/tests/task_6/main_0.c create mode 100644 0x1E-search_algorithms/tests/task_0/main_0.c create mode 100644 0x1E-search_algorithms/tests/task_0/main_1.c create mode 100644 0x1E-search_algorithms/tests/task_0/main_2.c create mode 100644 0x1E-search_algorithms/tests/task_0/main_3.c create mode 100644 0x1E-search_algorithms/tests/task_1/main_0.c create mode 100644 0x1E-search_algorithms/tests/task_1/main_1.c create mode 100644 0x1E-search_algorithms/tests/task_1/main_2.c create mode 100644 0x1E-search_algorithms/tests/task_1/main_3.c create mode 100644 0x1E-search_algorithms/tests/task_10/main_0.c create mode 100644 0x1E-search_algorithms/tests/task_10/main_1.c create mode 100644 0x1E-search_algorithms/tests/task_10/main_2.c create mode 100644 0x1E-search_algorithms/tests/task_10/main_3.c create mode 100644 0x1E-search_algorithms/tests/task_11/main_0.c create mode 100644 0x1E-search_algorithms/tests/task_11/main_1.c create mode 100644 0x1E-search_algorithms/tests/task_11/main_2.c create mode 100644 0x1E-search_algorithms/tests/task_11/main_3.c create mode 100644 0x1E-search_algorithms/tests/task_11/main_4.c create mode 100644 0x1E-search_algorithms/tests/task_12/main_0.c create mode 100644 0x1E-search_algorithms/tests/task_13/main_0.c create mode 100644 0x1E-search_algorithms/tests/task_13/main_1.c create mode 100644 0x1E-search_algorithms/tests/task_13/main_2.c create mode 100644 0x1E-search_algorithms/tests/task_13/main_3.c create mode 100644 0x1E-search_algorithms/tests/task_7/main_0.c create mode 100644 0x1E-search_algorithms/tests/task_7/main_1.c create mode 100644 0x1E-search_algorithms/tests/task_7/main_2.c create mode 100644 0x1E-search_algorithms/tests/task_7/main_3.c create mode 100644 0x1E-search_algorithms/tests/task_9/main_0.c create mode 100644 0x1E-search_algorithms/tests/task_9/main_1.c create mode 100644 0x1E-search_algorithms/tests/task_9/main_2.c create mode 100644 0x1E-search_algorithms/tests/task_9/main_3.c create mode 100644 l.sh create mode 100644 tests.sh diff --git a/0x00-hello_world/tests/task_0/0-main.c b/0x00-hello_world/tests/task_0/0-main.c new file mode 100644 index 00000000..697a757a --- /dev/null +++ b/0x00-hello_world/tests/task_0/0-main.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Holberton School"); + return (0); +} diff --git a/0x00-hello_world/tests/task_1/1-main.c b/0x00-hello_world/tests/task_1/1-main.c new file mode 100644 index 00000000..697a757a --- /dev/null +++ b/0x00-hello_world/tests/task_1/1-main.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Holberton School"); + return (0); +} diff --git a/0x00-hello_world/tests/task_2/2-main.c b/0x00-hello_world/tests/task_2/2-main.c new file mode 100644 index 00000000..697a757a --- /dev/null +++ b/0x00-hello_world/tests/task_2/2-main.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Holberton School"); + return (0); +} diff --git a/0x00-hello_world/tests/task_3/3-main.c b/0x00-hello_world/tests/task_3/3-main.c new file mode 100644 index 00000000..697a757a --- /dev/null +++ b/0x00-hello_world/tests/task_3/3-main.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Holberton School"); + return (0); +} diff --git a/0x00-hello_world/tests/task_7/100-main.c b/0x00-hello_world/tests/task_7/100-main.c new file mode 100644 index 00000000..697a757a --- /dev/null +++ b/0x00-hello_world/tests/task_7/100-main.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Holberton School"); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_1/1-main.c b/0x02-functions_nested_loops/tests/task_1/1-main.c new file mode 100644 index 00000000..2698d930 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_1/1-main.c @@ -0,0 +1,11 @@ +#include "main.h" +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_alphabet(); + return(0); +} diff --git a/0x02-functions_nested_loops/tests/task_1/main.c b/0x02-functions_nested_loops/tests/task_1/main.c new file mode 100644 index 00000000..ed884b7a --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_1/main.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_alphabet(); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_10/10-main.c b/0x02-functions_nested_loops/tests/task_10/10-main.c new file mode 100644 index 00000000..f8ab0f1a --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_10/10-main.c @@ -0,0 +1,15 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = add(89, 9); + printf("%d\n", n); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_10/main_0.c b/0x02-functions_nested_loops/tests/task_10/main_0.c new file mode 100644 index 00000000..7ad80d89 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_10/main_0.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = add(89, 9); + printf("%d\n", n); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_10/main_1.c b/0x02-functions_nested_loops/tests/task_10/main_1.c new file mode 100644 index 00000000..c4907d58 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_10/main_1.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = add(0, 9); + printf("%d\n", n); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_10/main_2.c b/0x02-functions_nested_loops/tests/task_10/main_2.c new file mode 100644 index 00000000..f6ccaa4a --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_10/main_2.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = add(0, 0); + printf("%d\n", n); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_10/main_3.c b/0x02-functions_nested_loops/tests/task_10/main_3.c new file mode 100644 index 00000000..457c36de --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_10/main_3.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = add(89, 0); + printf("%d\n", n); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_10/main_4.c b/0x02-functions_nested_loops/tests/task_10/main_4.c new file mode 100644 index 00000000..19937027 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_10/main_4.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = add(-89, 12); + printf("%d\n", n); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_10/main_5.c b/0x02-functions_nested_loops/tests/task_10/main_5.c new file mode 100644 index 00000000..3e30a89b --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_10/main_5.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = add(12, 12); + printf("%d\n", n); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_10/main_6.c b/0x02-functions_nested_loops/tests/task_10/main_6.c new file mode 100644 index 00000000..1eca5898 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_10/main_6.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = add(-89, -98); + printf("%d\n", n); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_11/11-main.c b/0x02-functions_nested_loops/tests/task_11/11-main.c new file mode 100644 index 00000000..4570cd56 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_11/11-main.c @@ -0,0 +1,16 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_to_98(0); + print_to_98(98); + print_to_98(111); + print_to_98(81); + print_to_98(-10); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_11/main_0.c b/0x02-functions_nested_loops/tests/task_11/main_0.c new file mode 100644 index 00000000..bae8927a --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_11/main_0.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_to_98(98); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_11/main_1.c b/0x02-functions_nested_loops/tests/task_11/main_1.c new file mode 100644 index 00000000..0e8c44df --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_11/main_1.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_to_98(111); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_11/main_2.c b/0x02-functions_nested_loops/tests/task_11/main_2.c new file mode 100644 index 00000000..42c4a340 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_11/main_2.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_to_98(81); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_11/main_3.c b/0x02-functions_nested_loops/tests/task_11/main_3.c new file mode 100644 index 00000000..9c089e56 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_11/main_3.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_to_98(0); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_11/main_4.c b/0x02-functions_nested_loops/tests/task_11/main_4.c new file mode 100644 index 00000000..7064836e --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_11/main_4.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_to_98(-98); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_11/main_5.c b/0x02-functions_nested_loops/tests/task_11/main_5.c new file mode 100644 index 00000000..767d400b --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_11/main_5.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_to_98(-111); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_12/main_0.c b/0x02-functions_nested_loops/tests/task_12/main_0.c new file mode 100644 index 00000000..9960a340 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_12/main_0.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_times_table(2); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_12/main_1.c b/0x02-functions_nested_loops/tests/task_12/main_1.c new file mode 100644 index 00000000..f46bae75 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_12/main_1.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_times_table(10); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_12/main_2.c b/0x02-functions_nested_loops/tests/task_12/main_2.c new file mode 100644 index 00000000..c1eeedee --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_12/main_2.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_times_table(13); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_12/main_3.c b/0x02-functions_nested_loops/tests/task_12/main_3.c new file mode 100644 index 00000000..20742a61 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_12/main_3.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_times_table(-2); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_12/main_4.c b/0x02-functions_nested_loops/tests/task_12/main_4.c new file mode 100644 index 00000000..a45ab2c5 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_12/main_4.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_times_table(0); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_12/main_5.c b/0x02-functions_nested_loops/tests/task_12/main_5.c new file mode 100644 index 00000000..27249e6c --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_12/main_5.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_times_table(100); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_2/2-main.c b/0x02-functions_nested_loops/tests/task_2/2-main.c new file mode 100644 index 00000000..3aba0cfb --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_2/2-main.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code. + * + * Return: Always 0. + */ +int main(void) +{ + print_alphabet_x10(); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_2/main.c b/0x02-functions_nested_loops/tests/task_2/main.c new file mode 100644 index 00000000..1e77204a --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_2/main.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_alphabet_x10(); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/3-main.c b/0x02-functions_nested_loops/tests/task_3/3-main.c new file mode 100644 index 00000000..71c1497b --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/3-main.c @@ -0,0 +1,20 @@ +#include "main.h" + +/** + * main - check the code. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _islower('H'); + _putchar(r + '0'); + r = _islower('o'); + _putchar(r + '0'); + r = _islower(108); + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_0.c b/0x02-functions_nested_loops/tests/task_3/main_0.c new file mode 100644 index 00000000..24206e18 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_0.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower('H'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_1.c b/0x02-functions_nested_loops/tests/task_3/main_1.c new file mode 100644 index 00000000..a120c08d --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_1.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower('o'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_10.c b/0x02-functions_nested_loops/tests/task_3/main_10.c new file mode 100644 index 00000000..52b00346 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_10.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower(0); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_2.c b/0x02-functions_nested_loops/tests/task_3/main_2.c new file mode 100644 index 00000000..eb5b5fe1 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_2.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower(108); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_3.c b/0x02-functions_nested_loops/tests/task_3/main_3.c new file mode 100644 index 00000000..73dbb232 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_3.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower('c'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_4.c b/0x02-functions_nested_loops/tests/task_3/main_4.c new file mode 100644 index 00000000..948f6a82 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_4.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower('I'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_5.c b/0x02-functions_nested_loops/tests/task_3/main_5.c new file mode 100644 index 00000000..996c16a7 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_5.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower('s'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_6.c b/0x02-functions_nested_loops/tests/task_3/main_6.c new file mode 100644 index 00000000..cf7ba8f5 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_6.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower(70); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_7.c b/0x02-functions_nested_loops/tests/task_3/main_7.c new file mode 100644 index 00000000..eb5dc268 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_7.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower(20); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_8.c b/0x02-functions_nested_loops/tests/task_3/main_8.c new file mode 100644 index 00000000..dfece6d1 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_8.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower('U'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_3/main_9.c b/0x02-functions_nested_loops/tests/task_3/main_9.c new file mode 100644 index 00000000..c299b7e2 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_3/main_9.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_islower - Test the _islower function + * + * @n: Number to pass to _islower function + */ +void test_islower(int n) +{ + int r; + + r = _islower(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_islower('n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/4-main.c b/0x02-functions_nested_loops/tests/task_4/4-main.c new file mode 100644 index 00000000..e64d1c9b --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/4-main.c @@ -0,0 +1,22 @@ +#include "main.h" + +/** + * main - check the code. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _isalpha('H'); + _putchar(r + '0'); + r = _isalpha('o'); + _putchar(r + '0'); + r = _isalpha(108); + _putchar(r + '0'); + r = _isalpha(';'); + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_0.c b/0x02-functions_nested_loops/tests/task_4/main_0.c new file mode 100644 index 00000000..b178f0c5 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_0.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha('H'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_1.c b/0x02-functions_nested_loops/tests/task_4/main_1.c new file mode 100644 index 00000000..2c0ce485 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_1.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha('o'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_10.c b/0x02-functions_nested_loops/tests/task_4/main_10.c new file mode 100644 index 00000000..37648d86 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_10.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha('&'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_2.c b/0x02-functions_nested_loops/tests/task_4/main_2.c new file mode 100644 index 00000000..92550527 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_2.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha(108); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_3.c b/0x02-functions_nested_loops/tests/task_4/main_3.c new file mode 100644 index 00000000..0248f54f --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_3.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha(';'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_4.c b/0x02-functions_nested_loops/tests/task_4/main_4.c new file mode 100644 index 00000000..07761f24 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_4.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha('C'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_5.c b/0x02-functions_nested_loops/tests/task_4/main_5.c new file mode 100644 index 00000000..8d910945 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_5.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha('i'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_6.c b/0x02-functions_nested_loops/tests/task_4/main_6.c new file mode 100644 index 00000000..61be9afa --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_6.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha('s'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_7.c b/0x02-functions_nested_loops/tests/task_4/main_7.c new file mode 100644 index 00000000..a723d4e7 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_7.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha('F'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_8.c b/0x02-functions_nested_loops/tests/task_4/main_8.c new file mode 100644 index 00000000..d550591f --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_8.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha('9'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_4/main_9.c b/0x02-functions_nested_loops/tests/task_4/main_9.c new file mode 100644 index 00000000..aa3aa6c0 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_4/main_9.c @@ -0,0 +1,26 @@ +#include "main.h" + +/** + * test_isalpha - Test the _isalpha function + * + * @n: Number to pass to _isalpha function + */ +void test_isalpha(int n) +{ + int r; + + r = _isalpha(n); + _putchar(r + '0'); + _putchar('\n'); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + test_isalpha('M'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_5/5-main.c b/0x02-functions_nested_loops/tests/task_5/5-main.c new file mode 100644 index 00000000..01836496 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_5/5-main.c @@ -0,0 +1,33 @@ +#include "main.h" + +/** + * main - check the code. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_sign(98); + _putchar(','); + _putchar(' '); + _putchar(r + '0'); + _putchar('\n'); + r = print_sign(0); + _putchar(','); + _putchar(' '); + _putchar(r + '0'); + _putchar('\n'); + r = print_sign(0xff); + _putchar(','); + _putchar(' '); + _putchar(r + '0'); + _putchar('\n'); + r = print_sign(-1); + _putchar(','); + _putchar(' '); + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_5/main_0.c b/0x02-functions_nested_loops/tests/task_5/main_0.c new file mode 100644 index 00000000..b31aa306 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_5/main_0.c @@ -0,0 +1,19 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_sign(98); + if (r < 0) + r *= -1; + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_5/main_1.c b/0x02-functions_nested_loops/tests/task_5/main_1.c new file mode 100644 index 00000000..08f37ec1 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_5/main_1.c @@ -0,0 +1,19 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_sign(0); + if (r < 0) + r *= -1; + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_5/main_2.c b/0x02-functions_nested_loops/tests/task_5/main_2.c new file mode 100644 index 00000000..760281f8 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_5/main_2.c @@ -0,0 +1,19 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_sign(0xff); + if (r < 0) + r *= -1; + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_5/main_3.c b/0x02-functions_nested_loops/tests/task_5/main_3.c new file mode 100644 index 00000000..6a1a78a8 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_5/main_3.c @@ -0,0 +1,19 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_sign(-1); + if (r < 0) + r *= -1; + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_5/main_4.c b/0x02-functions_nested_loops/tests/task_5/main_4.c new file mode 100644 index 00000000..dd03ed28 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_5/main_4.c @@ -0,0 +1,19 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_sign(99); + if (r < 0) + r *= -1; + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_5/main_5.c b/0x02-functions_nested_loops/tests/task_5/main_5.c new file mode 100644 index 00000000..109c5b9f --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_5/main_5.c @@ -0,0 +1,19 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_sign(INT_MAX); + if (r < 0) + r *= -1; + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_5/main_6.c b/0x02-functions_nested_loops/tests/task_5/main_6.c new file mode 100644 index 00000000..5825d792 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_5/main_6.c @@ -0,0 +1,19 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_sign(INT_MIN); + if (r < 0) + r *= -1; + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_5/main_7.c b/0x02-functions_nested_loops/tests/task_5/main_7.c new file mode 100644 index 00000000..8bede9a6 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_5/main_7.c @@ -0,0 +1,19 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_sign(-4); + if (r < 0) + r *= -1; + _putchar(r + '0'); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_6/6-main.c b/0x02-functions_nested_loops/tests/task_6/6-main.c new file mode 100644 index 00000000..68cf1a30 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_6/6-main.c @@ -0,0 +1,21 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _abs(-1); + printf("%d\n", r); + r = _abs(0); + printf("%d\n", r); + r = _abs(1); + printf("%d\n", r); + r = _abs(-98); + printf("%d\n", r); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_6/main_0.c b/0x02-functions_nested_loops/tests/task_6/main_0.c new file mode 100644 index 00000000..b1722c8e --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_6/main_0.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _abs(-1); + printf("%d\n", r); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_6/main_1.c b/0x02-functions_nested_loops/tests/task_6/main_1.c new file mode 100644 index 00000000..aaa4da00 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_6/main_1.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _abs(0); + printf("%d\n", r); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_6/main_2.c b/0x02-functions_nested_loops/tests/task_6/main_2.c new file mode 100644 index 00000000..a56fc184 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_6/main_2.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _abs(1); + printf("%d\n", r); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_6/main_3.c b/0x02-functions_nested_loops/tests/task_6/main_3.c new file mode 100644 index 00000000..b78a885d --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_6/main_3.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _abs(-98); + printf("%d\n", r); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_6/main_4.c b/0x02-functions_nested_loops/tests/task_6/main_4.c new file mode 100644 index 00000000..eeb0213f --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_6/main_4.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _abs(INT_MAX); + printf("%d\n", r); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_6/main_5.c b/0x02-functions_nested_loops/tests/task_6/main_5.c new file mode 100644 index 00000000..cb482bc3 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_6/main_5.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _abs(INT_MIN); + printf("%d\n", r); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_6/main_6.c b/0x02-functions_nested_loops/tests/task_6/main_6.c new file mode 100644 index 00000000..92cc2c94 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_6/main_6.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _abs(12); + printf("%d\n", r); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_6/main_7.c b/0x02-functions_nested_loops/tests/task_6/main_7.c new file mode 100644 index 00000000..6c94576d --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_6/main_7.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _abs(0x0F02); + printf("%d\n", r); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_7/7-main.c b/0x02-functions_nested_loops/tests/task_7/7-main.c new file mode 100644 index 00000000..33971d48 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_7/7-main.c @@ -0,0 +1,18 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + print_last_digit(98); + print_last_digit(0); + r = print_last_digit(-1024); + _putchar('0' + r); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_7/main_0.c b/0x02-functions_nested_loops/tests/task_7/main_0.c new file mode 100644 index 00000000..dca75e61 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_7/main_0.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_last_digit(98); + _putchar('0' + r); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_7/main_1.c b/0x02-functions_nested_loops/tests/task_7/main_1.c new file mode 100644 index 00000000..a3b85b93 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_7/main_1.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_last_digit(0); + _putchar('0' + r); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_7/main_2.c b/0x02-functions_nested_loops/tests/task_7/main_2.c new file mode 100644 index 00000000..f54235fc --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_7/main_2.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_last_digit(-1024); + _putchar('0' + r); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_7/main_3.c b/0x02-functions_nested_loops/tests/task_7/main_3.c new file mode 100644 index 00000000..28272f8d --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_7/main_3.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_last_digit(INT_MAX); + _putchar('0' + r); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_7/main_4.c b/0x02-functions_nested_loops/tests/task_7/main_4.c new file mode 100644 index 00000000..5308d1c2 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_7/main_4.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_last_digit(INT_MIN); + _putchar('0' + r); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_7/main_5.c b/0x02-functions_nested_loops/tests/task_7/main_5.c new file mode 100644 index 00000000..8c42dc5d --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_7/main_5.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = print_last_digit(1); + _putchar('0' + r); + _putchar('\n'); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_8/8-main.c b/0x02-functions_nested_loops/tests/task_8/8-main.c new file mode 100644 index 00000000..539c599b --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_8/8-main.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + jack_bauer(); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_8/main_0.c b/0x02-functions_nested_loops/tests/task_8/main_0.c new file mode 100644 index 00000000..ecfff318 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_8/main_0.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + jack_bauer(); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_9/9-main.c b/0x02-functions_nested_loops/tests/task_9/9-main.c new file mode 100644 index 00000000..27924850 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_9/9-main.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + times_table(); + return (0); +} diff --git a/0x02-functions_nested_loops/tests/task_9/main_0.c b/0x02-functions_nested_loops/tests/task_9/main_0.c new file mode 100644 index 00000000..a9296f05 --- /dev/null +++ b/0x02-functions_nested_loops/tests/task_9/main_0.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + times_table(); + return (0); +} diff --git a/0x03-debugging/tests/task_2/2-main.c b/0x03-debugging/tests/task_2/2-main.c new file mode 100644 index 00000000..29c45f64 --- /dev/null +++ b/0x03-debugging/tests/task_2/2-main.c @@ -0,0 +1,22 @@ +#include "main.h" + +/** +* main - prints the largest of 3 integers +* Return: 0 +*/ + +int main(void) +{ + int a, b, c; + int largest; + + a = 972; + b = -98; + c = 0; + + largest = largest_number(a, b, c); + + printf("%d is the largest number\n", largest); + + return (0); +} diff --git a/0x03-debugging/tests/task_2/main_0.c b/0x03-debugging/tests/task_2/main_0.c new file mode 100644 index 00000000..c21ff86b --- /dev/null +++ b/0x03-debugging/tests/task_2/main_0.c @@ -0,0 +1,23 @@ +#include "main.h" +#include + +/** +* main - tests largest_number function +* Return: 0 +*/ + +int main(void) +{ + int a, b, c; + int largest; + + a = 972; + b = -98; + c = 0; + + largest = largest_number(a, b, c); + + printf("%d is the largest number\n", largest); + + return (0); +} diff --git a/0x03-debugging/tests/task_2/main_1.c b/0x03-debugging/tests/task_2/main_1.c new file mode 100644 index 00000000..3b10382a --- /dev/null +++ b/0x03-debugging/tests/task_2/main_1.c @@ -0,0 +1,23 @@ +#include "main.h" +#include + +/** +* main - prints the largest of 3 numbers +* Return: 0 +*/ + +int main(void) +{ + int a, b, c; + int largest; + + a = 3; + b = 5; + c = 2; + + largest = largest_number(a, b, c); + + printf("%d is the largest number\n", largest); + + return (0); +} diff --git a/0x03-debugging/tests/task_2/main_2.c b/0x03-debugging/tests/task_2/main_2.c new file mode 100644 index 00000000..ea439efb --- /dev/null +++ b/0x03-debugging/tests/task_2/main_2.c @@ -0,0 +1,23 @@ +#include "main.h" +#include + +/** +* main - prints the largest of 3 numbers +* Return: 0 +*/ + +int main(void) +{ + int a, b, c; + int largest; + + a = -1; + b = 0; + c = -98; + + largest = largest_number(a, b, c); + + printf("%d is the largest number\n", largest); + + return (0); +} diff --git a/0x03-debugging/tests/task_2/main_3.c b/0x03-debugging/tests/task_2/main_3.c new file mode 100644 index 00000000..e0c6b582 --- /dev/null +++ b/0x03-debugging/tests/task_2/main_3.c @@ -0,0 +1,23 @@ +#include "main.h" +#include + +/** +* main - prints the largest of 3 numbers +* Return: 0 +*/ + +int main(void) +{ + int a, b, c; + int largest; + + a = 98347; + b = 98346; + c = 98345; + + largest = largest_number(a, b, c); + + printf("%d is the largest number\n", largest); + + return (0); +} diff --git a/0x03-debugging/tests/task_2/main_4.c b/0x03-debugging/tests/task_2/main_4.c new file mode 100644 index 00000000..9c82f9f2 --- /dev/null +++ b/0x03-debugging/tests/task_2/main_4.c @@ -0,0 +1,23 @@ +#include "main.h" +#include + +/** +* main - prints the largest of 3 numbers +* Return: 0 +*/ + +int main(void) +{ + int a, b, c; + int largest; + + a = -4756; + b = 3647; + c = -1; + + largest = largest_number(a, b, c); + + printf("%d is the largest number\n", largest); + + return (0); +} diff --git a/0x03-debugging/tests/task_2/main_5.c b/0x03-debugging/tests/task_2/main_5.c new file mode 100644 index 00000000..fc8f1f99 --- /dev/null +++ b/0x03-debugging/tests/task_2/main_5.c @@ -0,0 +1,23 @@ +#include "main.h" +#include + +/** +* main - prints the largest of 3 numbers +* Return: 0 +*/ + +int main(void) +{ + int a, b, c; + int largest; + + a = 98; + b = 98; + c = 98; + + largest = largest_number(a, b, c); + + printf("%d is the largest number\n", largest); + + return (0); +} diff --git a/0x03-debugging/tests/task_2/main_6.c b/0x03-debugging/tests/task_2/main_6.c new file mode 100644 index 00000000..41b31411 --- /dev/null +++ b/0x03-debugging/tests/task_2/main_6.c @@ -0,0 +1,23 @@ +#include "main.h" +#include + +/** +* main - prints the largest of 3 numbers +* Return: 0 +*/ + +int main(void) +{ + int a, b, c; + int largest; + + a = 1; + b = 98; + c = 98; + + largest = largest_number(a, b, c); + + printf("%d is the largest number\n", largest); + + return (0); +} diff --git a/0x03-debugging/tests/task_2/main_7.c b/0x03-debugging/tests/task_2/main_7.c new file mode 100644 index 00000000..24eeecb4 --- /dev/null +++ b/0x03-debugging/tests/task_2/main_7.c @@ -0,0 +1,23 @@ +#include "main.h" +#include + +/** +* main - prints the largest of 3 numbers +* Return: 0 +*/ + +int main(void) +{ + int a, b, c; + int largest; + + a = 98; + b = 1; + c = 98; + + largest = largest_number(a, b, c); + + printf("%d is the largest number\n", largest); + + return (0); +} diff --git a/0x03-debugging/tests/task_2/main_8.c b/0x03-debugging/tests/task_2/main_8.c new file mode 100644 index 00000000..fa1eb121 --- /dev/null +++ b/0x03-debugging/tests/task_2/main_8.c @@ -0,0 +1,23 @@ +#include "main.h" +#include + +/** +* main - prints the largest of 3 numbers +* Return: 0 +*/ + +int main(void) +{ + int a, b, c; + int largest; + + a = 98; + b = 98; + c = 1; + + largest = largest_number(a, b, c); + + printf("%d is the largest number\n", largest); + + return (0); +} diff --git a/0x03-debugging/tests/task_3/main_0.c b/0x03-debugging/tests/task_3/main_0.c new file mode 100644 index 00000000..e44a3ff6 --- /dev/null +++ b/0x03-debugging/tests/task_3/main_0.c @@ -0,0 +1,27 @@ +#include +#include "main.h" + +/** +* main - takes a date and prints how many days are left in the year, taking +* leap years into account +* Return: 0 +*/ + +int main(void) +{ + int month; + int day; + int year; + + month = 4; + day = 10; + year = 1997; + + printf("Date: %02d/%02d/%04d\n", month, day, year); + + day = convert_day(month, day); + + print_remaining_days(month, day, year); + + return (0); +} diff --git a/0x03-debugging/tests/task_3/main_1.c b/0x03-debugging/tests/task_3/main_1.c new file mode 100644 index 00000000..8085141a --- /dev/null +++ b/0x03-debugging/tests/task_3/main_1.c @@ -0,0 +1,27 @@ +#include +#include "main.h" + +/** +* main - takes a date and prints how many days are left in the year, taking +* leap years into account +* Return: 0 +*/ + +int main(void) +{ + int month; + int day; + int year; + + month = 2; + day = 12; + year = 2019; + + printf("Date: %02d/%02d/%04d\n", month, day, year); + + day = convert_day(month, day); + + print_remaining_days(month, day, year); + + return (0); +} diff --git a/0x03-debugging/tests/task_3/main_2.c b/0x03-debugging/tests/task_3/main_2.c new file mode 100644 index 00000000..f1826705 --- /dev/null +++ b/0x03-debugging/tests/task_3/main_2.c @@ -0,0 +1,27 @@ +#include +#include "main.h" + +/** +* main - takes a date and prints how many days are left in the year, taking +* leap years into account +* Return: 0 +*/ + +int main(void) +{ + int month; + int day; + int year; + + month = 2; + day = 29; + year = 2000; + + printf("Date: %02d/%02d/%04d\n", month, day, year); + + day = convert_day(month, day); + + print_remaining_days(month, day, year); + + return (0); +} diff --git a/0x03-debugging/tests/task_3/main_3.c b/0x03-debugging/tests/task_3/main_3.c new file mode 100644 index 00000000..c55ab071 --- /dev/null +++ b/0x03-debugging/tests/task_3/main_3.c @@ -0,0 +1,27 @@ +#include +#include "main.h" + +/** +* main - takes a date and prints how many days are left in the year, taking +* leap years into account +* Return: 0 +*/ + +int main(void) +{ + int month; + int day; + int year; + + month = 2; + day = 29; + year = 2001; + + printf("Date: %02d/%02d/%04d\n", month, day, year); + + day = convert_day(month, day); + + print_remaining_days(month, day, year); + + return (0); +} diff --git a/0x03-debugging/tests/task_3/main_4.c b/0x03-debugging/tests/task_3/main_4.c new file mode 100644 index 00000000..97533052 --- /dev/null +++ b/0x03-debugging/tests/task_3/main_4.c @@ -0,0 +1,27 @@ +#include +#include "main.h" + +/** +* main - takes a date and prints how many days are left in the year, taking +* leap years into account +* Return: 0 +*/ + +int main(void) +{ + int month; + int day; + int year; + + month = 3; + day = 1; + year = 2009; + + printf("Date: %02d/%02d/%04d\n", month, day, year); + + day = convert_day(month, day); + + print_remaining_days(month, day, year); + + return (0); +} diff --git a/0x03-debugging/tests/task_3/main_5.c b/0x03-debugging/tests/task_3/main_5.c new file mode 100644 index 00000000..fa29e56e --- /dev/null +++ b/0x03-debugging/tests/task_3/main_5.c @@ -0,0 +1,27 @@ +#include +#include "main.h" + +/** +* main - takes a date and prints how many days are left in the year, taking +* leap years into account +* Return: 0 +*/ + +int main(void) +{ + int month; + int day; + int year; + + month = 3; + day = 1; + year = 2008; + + printf("Date: %02d/%02d/%04d\n", month, day, year); + + day = convert_day(month, day); + + print_remaining_days(month, day, year); + + return (0); +} diff --git a/0x03-debugging/tests/task_3/main_6.c b/0x03-debugging/tests/task_3/main_6.c new file mode 100644 index 00000000..d35edf4d --- /dev/null +++ b/0x03-debugging/tests/task_3/main_6.c @@ -0,0 +1,27 @@ +#include +#include "main.h" + +/** +* main - takes a date and prints how many days are left in the year, taking +* leap years into account +* Return: 0 +*/ + +int main(void) +{ + int month; + int day; + int year; + + month = 12; + day = 31; + year = 4000; + + printf("Date: %02d/%02d/%04d\n", month, day, year); + + day = convert_day(month, day); + + print_remaining_days(month, day, year); + + return (0); +} diff --git a/0x03-debugging/tests/task_3/main_7.c b/0x03-debugging/tests/task_3/main_7.c new file mode 100644 index 00000000..48a3c0fa --- /dev/null +++ b/0x03-debugging/tests/task_3/main_7.c @@ -0,0 +1,27 @@ +#include +#include "main.h" + +/** +* main - takes a date and prints how many days are left in the year, taking +* leap years into account +* Return: 0 +*/ + +int main(void) +{ + int month; + int day; + int year; + + month = 12; + day = 31; + year = 1899; + + printf("Date: %02d/%02d/%04d\n", month, day, year); + + day = convert_day(month, day); + + print_remaining_days(month, day, year); + + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_0/0-main.c b/0x04-more_functions_nested_loops/tests/task_0/0-main.c new file mode 100644 index 00000000..e0f97d9b --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_0/0-main.c @@ -0,0 +1,17 @@ +#include "main.h" + +/** + * main - check the code. + * + * Return: Always 0. + */ +int main(void) +{ + char c; + + c = 'A'; + printf("%c: %d\n", c, _isupper(c)); + c = 'a'; + printf("%c: %d\n", c, _isupper(c)); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_0/main_0.c b/0x04-more_functions_nested_loops/tests/task_0/main_0.c new file mode 100644 index 00000000..4419bb50 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_0/main_0.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char c; + + for (c = 'A'; c <= 'Z'; ++c) + printf("%c: %d\n", c, _isupper(c)); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_0/main_1.c b/0x04-more_functions_nested_loops/tests/task_0/main_1.c new file mode 100644 index 00000000..e8a333dd --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_0/main_1.c @@ -0,0 +1,19 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char c; + + for (c = 32; c < 127; ++c) + { + if (c < 'A' || c > 'Z') + printf("%c: %d\n", c, _isupper(c)); + } + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_1/1-main.c b/0x04-more_functions_nested_loops/tests/task_1/1-main.c new file mode 100644 index 00000000..16435f6f --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_1/1-main.c @@ -0,0 +1,17 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char c; + + c = '0'; + printf("%c: %d\n", c, _isdigit(c)); + c = 'a'; + printf("%c: %d\n", c, _isdigit(c)); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_1/main_0.c b/0x04-more_functions_nested_loops/tests/task_1/main_0.c new file mode 100644 index 00000000..18b735ed --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_1/main_0.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char c; + + for (c = '0'; c <= '9'; ++c) + printf("%c: %d\n", c, _isdigit(c)); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_1/main_1.c b/0x04-more_functions_nested_loops/tests/task_1/main_1.c new file mode 100644 index 00000000..f3e45b2a --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_1/main_1.c @@ -0,0 +1,19 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char c; + + for (c = 32; c < 127; ++c) + { + if (c < '0' || c > '9') + printf("%c: %d\n", c, _isdigit(c)); + } + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_10/10-main.c b/0x04-more_functions_nested_loops/tests/task_10/10-main.c new file mode 100644 index 00000000..1eab9672 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_10/10-main.c @@ -0,0 +1,15 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_triangle(2); + print_triangle(10); + print_triangle(1); + print_triangle(0); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_10/main_0.c b/0x04-more_functions_nested_loops/tests/task_10/main_0.c new file mode 100644 index 00000000..a9441d42 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_10/main_0.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_triangle(0); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_10/main_1.c b/0x04-more_functions_nested_loops/tests/task_10/main_1.c new file mode 100644 index 00000000..4a226c77 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_10/main_1.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_triangle(-10); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_10/main_2.c b/0x04-more_functions_nested_loops/tests/task_10/main_2.c new file mode 100644 index 00000000..3a201780 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_10/main_2.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_triangle(3); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_10/main_3.c b/0x04-more_functions_nested_loops/tests/task_10/main_3.c new file mode 100644 index 00000000..e41cdae8 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_10/main_3.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_triangle(9); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_10/main_4.c b/0x04-more_functions_nested_loops/tests/task_10/main_4.c new file mode 100644 index 00000000..5a936c1c --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_10/main_4.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_triangle(98); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_12/main_0.c b/0x04-more_functions_nested_loops/tests/task_12/main_0.c new file mode 100644 index 00000000..05c9d562 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_12/main_0.c @@ -0,0 +1,13 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(0); + _putchar('\n'); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_12/main_1.c b/0x04-more_functions_nested_loops/tests/task_12/main_1.c new file mode 100644 index 00000000..8b970b0e --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_12/main_1.c @@ -0,0 +1,13 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(3); + _putchar('\n'); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_12/main_2.c b/0x04-more_functions_nested_loops/tests/task_12/main_2.c new file mode 100644 index 00000000..5c7f9375 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_12/main_2.c @@ -0,0 +1,13 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(-1); + _putchar('\n'); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_12/main_3.c b/0x04-more_functions_nested_loops/tests/task_12/main_3.c new file mode 100644 index 00000000..dd88869e --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_12/main_3.c @@ -0,0 +1,13 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(10); + _putchar('\n'); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_12/main_4.c b/0x04-more_functions_nested_loops/tests/task_12/main_4.c new file mode 100644 index 00000000..0822e357 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_12/main_4.c @@ -0,0 +1,13 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(-99); + _putchar('\n'); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_12/main_5.c b/0x04-more_functions_nested_loops/tests/task_12/main_5.c new file mode 100644 index 00000000..4d225c8b --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_12/main_5.c @@ -0,0 +1,13 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(1024); + _putchar('\n'); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_12/main_6.c b/0x04-more_functions_nested_loops/tests/task_12/main_6.c new file mode 100644 index 00000000..21d0f867 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_12/main_6.c @@ -0,0 +1,13 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(-4096); + _putchar('\n'); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_12/main_7.c b/0x04-more_functions_nested_loops/tests/task_12/main_7.c new file mode 100644 index 00000000..8f9d798b --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_12/main_7.c @@ -0,0 +1,14 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(INT_MAX); + _putchar('\n'); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_12/main_8.c b/0x04-more_functions_nested_loops/tests/task_12/main_8.c new file mode 100644 index 00000000..db9e6fc4 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_12/main_8.c @@ -0,0 +1,14 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(INT_MIN); + _putchar('\n'); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_12/main_9.c b/0x04-more_functions_nested_loops/tests/task_12/main_9.c new file mode 100644 index 00000000..b122ceb7 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_12/main_9.c @@ -0,0 +1,13 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(123456789); + _putchar('\n'); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_2/2-main.c b/0x04-more_functions_nested_loops/tests/task_2/2-main.c new file mode 100644 index 00000000..c2d3d4b0 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_2/2-main.c @@ -0,0 +1,13 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + printf("%d\n", mul(98, 1024)); + printf("%d\n", mul(-402, 4096)); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_2/main_0.c b/0x04-more_functions_nested_loops/tests/task_2/main_0.c new file mode 100644 index 00000000..cee63c3c --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_2/main_0.c @@ -0,0 +1,18 @@ +#include "main.h" +#include + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int i; + int j; + + i = 3; + j = 4; + printf("%d * %d: %d\n", i, j, mul(i, j)); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_3/3-main.c b/0x04-more_functions_nested_loops/tests/task_3/3-main.c new file mode 100644 index 00000000..dcdc5098 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_3/3-main.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_numbers(); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_3/main_0.c b/0x04-more_functions_nested_loops/tests/task_3/main_0.c new file mode 100644 index 00000000..c397fc88 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_3/main_0.c @@ -0,0 +1,13 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_numbers(); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_4/4-main.c b/0x04-more_functions_nested_loops/tests/task_4/4-main.c new file mode 100644 index 00000000..323f8209 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_4/4-main.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_most_numbers(); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_4/main_0.c b/0x04-more_functions_nested_loops/tests/task_4/main_0.c new file mode 100644 index 00000000..f16930f5 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_4/main_0.c @@ -0,0 +1,13 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_most_numbers(); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_5/5-main.c b/0x04-more_functions_nested_loops/tests/task_5/5-main.c new file mode 100644 index 00000000..a9b48b06 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_5/5-main.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + more_numbers(); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_5/main_0.c b/0x04-more_functions_nested_loops/tests/task_5/main_0.c new file mode 100644 index 00000000..7e642b86 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_5/main_0.c @@ -0,0 +1,13 @@ +#include +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + more_numbers(); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_6/6-main.c b/0x04-more_functions_nested_loops/tests/task_6/6-main.c new file mode 100644 index 00000000..39a2b810 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_6/6-main.c @@ -0,0 +1,15 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_line(0); + print_line(2); + print_line(10); + print_line(-4); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_6/main_0.c b/0x04-more_functions_nested_loops/tests/task_6/main_0.c new file mode 100644 index 00000000..020c5dbf --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_6/main_0.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_line(0); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_6/main_1.c b/0x04-more_functions_nested_loops/tests/task_6/main_1.c new file mode 100644 index 00000000..6f5719b1 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_6/main_1.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_line(-10); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_6/main_3.c b/0x04-more_functions_nested_loops/tests/task_6/main_3.c new file mode 100644 index 00000000..8af72224 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_6/main_3.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_line(9); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_6/main_4.c b/0x04-more_functions_nested_loops/tests/task_6/main_4.c new file mode 100644 index 00000000..47fd6083 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_6/main_4.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_line(98); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_7/7-main.c b/0x04-more_functions_nested_loops/tests/task_7/7-main.c new file mode 100644 index 00000000..76bd77a8 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_7/7-main.c @@ -0,0 +1,15 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_diagonal(0); + print_diagonal(2); + print_diagonal(10); + print_diagonal(-4); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_7/main_0.c b/0x04-more_functions_nested_loops/tests/task_7/main_0.c new file mode 100644 index 00000000..5d721e5f --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_7/main_0.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_diagonal(0); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_7/main_1.c b/0x04-more_functions_nested_loops/tests/task_7/main_1.c new file mode 100644 index 00000000..ed269283 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_7/main_1.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_diagonal(-10); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_7/main_2.c b/0x04-more_functions_nested_loops/tests/task_7/main_2.c new file mode 100644 index 00000000..d594f9e1 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_7/main_2.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_diagonal(3); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_7/main_3.c b/0x04-more_functions_nested_loops/tests/task_7/main_3.c new file mode 100644 index 00000000..380b402b --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_7/main_3.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_diagonal(9); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_7/main_4.c b/0x04-more_functions_nested_loops/tests/task_7/main_4.c new file mode 100644 index 00000000..e8a14e80 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_7/main_4.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_diagonal(98); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_8/8-main.c b/0x04-more_functions_nested_loops/tests/task_8/8-main.c new file mode 100644 index 00000000..9f714ed7 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_8/8-main.c @@ -0,0 +1,14 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_square(2); + print_square(10); + print_square(0); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_8/main_0.c b/0x04-more_functions_nested_loops/tests/task_8/main_0.c new file mode 100644 index 00000000..34a24ac8 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_8/main_0.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_square(0); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_8/main_1.c b/0x04-more_functions_nested_loops/tests/task_8/main_1.c new file mode 100644 index 00000000..d4950478 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_8/main_1.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_square(-10); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_8/main_2.c b/0x04-more_functions_nested_loops/tests/task_8/main_2.c new file mode 100644 index 00000000..3a132895 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_8/main_2.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_square(3); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_8/main_3.c b/0x04-more_functions_nested_loops/tests/task_8/main_3.c new file mode 100644 index 00000000..146e7bd8 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_8/main_3.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_square(9); + return (0); +} diff --git a/0x04-more_functions_nested_loops/tests/task_8/main_4.c b/0x04-more_functions_nested_loops/tests/task_8/main_4.c new file mode 100644 index 00000000..70299e46 --- /dev/null +++ b/0x04-more_functions_nested_loops/tests/task_8/main_4.c @@ -0,0 +1,12 @@ +#include "main.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_square(98); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_0/0-main.c b/0x05-pointers_arrays_strings/tests/task_0/0-main.c new file mode 100644 index 00000000..2fca884b --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_0/0-main.c @@ -0,0 +1,18 @@ +#include "../main.h" +#include + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = 402; + printf("n=%d\n", n); + reset_to_98(&n); + printf("n=%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_0/main_0.c b/0x05-pointers_arrays_strings/tests/task_0/main_0.c new file mode 100644 index 00000000..8bd150e1 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_0/main_0.c @@ -0,0 +1,19 @@ +#include + +void reset_to_98(int *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = 402; + printf("%d\n", n); + reset_to_98(&n); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_0/main_1.c b/0x05-pointers_arrays_strings/tests/task_0/main_1.c new file mode 100644 index 00000000..20892e91 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_0/main_1.c @@ -0,0 +1,19 @@ +#include + +void reset_to_98(int *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = -4096; + printf("%d\n", n); + reset_to_98(&n); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_0/main_2.c b/0x05-pointers_arrays_strings/tests/task_0/main_2.c new file mode 100644 index 00000000..44f37213 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_0/main_2.c @@ -0,0 +1,24 @@ +#include +#include + +void reset_to_98(int *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = INT_MAX; + printf("%d\n", n); + reset_to_98(&n); + printf("%d\n", n); + n = INT_MIN; + printf("%d\n", n); + reset_to_98(&n); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_1/1-main.c b/0x05-pointers_arrays_strings/tests/task_1/1-main.c new file mode 100644 index 00000000..19e4568b --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_1/1-main.c @@ -0,0 +1,20 @@ +#include "main.h" +#include + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + int a; + int b; + + a = 98; + b = 42; + printf("a=%d, b=%d\n", a, b); + swap_int(&a, &b); + printf("a=%d, b=%d\n", a, b); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_1/main_0.c b/0x05-pointers_arrays_strings/tests/task_1/main_0.c new file mode 100644 index 00000000..cd788a55 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_1/main_0.c @@ -0,0 +1,21 @@ +#include + +void swap_int(int *, int *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int a; + int b; + + a = 98; + b = 42; + printf("%d, %d\n", a, b); + swap_int(&a, &b); + printf("%d, %d\n", a, b); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_1/main_1.c b/0x05-pointers_arrays_strings/tests/task_1/main_1.c new file mode 100644 index 00000000..09d00c25 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_1/main_1.c @@ -0,0 +1,21 @@ +#include + +void swap_int(int *, int *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int a; + int b; + + a = 1024; + b = -4096; + printf("%d, %d\n", a, b); + swap_int(&a, &b); + printf("%d, %d\n", a, b); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_1/main_2.c b/0x05-pointers_arrays_strings/tests/task_1/main_2.c new file mode 100644 index 00000000..63edcc84 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_1/main_2.c @@ -0,0 +1,22 @@ +#include +#include + +void swap_int(int *, int *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int a; + int b; + + a = INT_MAX; + b = INT_MIN; + printf("%d, %d\n", a, b); + swap_int(&a, &b); + printf("%d, %d\n", a, b); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_0.c b/0x05-pointers_arrays_strings/tests/task_10/main_0.c new file mode 100644 index 00000000..96decf16 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_0.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi("4"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_1.c b/0x05-pointers_arrays_strings/tests/task_10/main_1.c new file mode 100644 index 00000000..1de49b41 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_1.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi("10"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_10.c b/0x05-pointers_arrays_strings/tests/task_10/main_10.c new file mode 100644 index 00000000..854c6225 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_10.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi("Hello ----- world\n"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_11.c b/0x05-pointers_arrays_strings/tests/task_10/main_11.c new file mode 100644 index 00000000..f815d631 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_11.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi("2147483647"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_12.c b/0x05-pointers_arrays_strings/tests/task_10/main_12.c new file mode 100644 index 00000000..03da95e2 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_12.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi("-2147483648"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_2.c b/0x05-pointers_arrays_strings/tests/task_10/main_2.c new file mode 100644 index 00000000..87692c94 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_2.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi("-3"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_3.c b/0x05-pointers_arrays_strings/tests/task_10/main_3.c new file mode 100644 index 00000000..0c328019 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_3.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi("99"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_4.c b/0x05-pointers_arrays_strings/tests/task_10/main_4.c new file mode 100644 index 00000000..d222ae0b --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_4.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi("-40"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_5.c b/0x05-pointers_arrays_strings/tests/task_10/main_5.c new file mode 100644 index 00000000..599276ea --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_5.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi(" ------++++++-----+++++--98"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_6.c b/0x05-pointers_arrays_strings/tests/task_10/main_6.c new file mode 100644 index 00000000..3c415adb --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_6.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi("+++++ +-+ 2242454"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_7.c b/0x05-pointers_arrays_strings/tests/task_10/main_7.c new file mode 100644 index 00000000..944ba7ba --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_7.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi(" + + - -98 Battery Street; San Francisco, CA 94111 - USA "); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_8.c b/0x05-pointers_arrays_strings/tests/task_10/main_8.c new file mode 100644 index 00000000..2140317b --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_8.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi("---++++ -++ Sui - te - 402 #cisfun :)"); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_10/main_9.c b/0x05-pointers_arrays_strings/tests/task_10/main_9.c new file mode 100644 index 00000000..3a321ccc --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_10/main_9.c @@ -0,0 +1,17 @@ +#include + +int _atoi(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _atoi(""); + printf("%d\n", n); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_2/2-main.c b/0x05-pointers_arrays_strings/tests/task_2/2-main.c new file mode 100644 index 00000000..a27413f4 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_2/2-main.c @@ -0,0 +1,18 @@ +#include "main.h" +#include + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + int len; + + str = "My first strlen!"; + len = _strlen(str); + printf("%d\n", len); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_2/main_0.c b/0x05-pointers_arrays_strings/tests/task_2/main_0.c new file mode 100644 index 00000000..664893d8 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_2/main_0.c @@ -0,0 +1,19 @@ +#include + +int _strlen(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + int len; + + str = "Holberton!"; + len = _strlen(str); + printf("%d\n", len); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_2/main_1.c b/0x05-pointers_arrays_strings/tests/task_2/main_1.c new file mode 100644 index 00000000..d72debbe --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_2/main_1.c @@ -0,0 +1,19 @@ +#include + +int _strlen(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + int len; + + str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; + len = _strlen(str); + printf("%d\n", len); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_2/main_2.c b/0x05-pointers_arrays_strings/tests/task_2/main_2.c new file mode 100644 index 00000000..3b472a39 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_2/main_2.c @@ -0,0 +1,19 @@ +#include + +int _strlen(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + int len; + + str = ""; + len = _strlen(str); + printf("%d\n", len); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_3/3-main.c b/0x05-pointers_arrays_strings/tests/task_3/3-main.c new file mode 100644 index 00000000..7392b4ec --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_3/3-main.c @@ -0,0 +1,15 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "I do not fear computers. I fear the lack of them - Isaac Asimov"; + _puts(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_3/main_0.c b/0x05-pointers_arrays_strings/tests/task_3/main_0.c new file mode 100644 index 00000000..b6a3054d --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_3/main_0.c @@ -0,0 +1,17 @@ +#include + +void _puts(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "Holberton!"; + _puts(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_3/main_1.c b/0x05-pointers_arrays_strings/tests/task_3/main_1.c new file mode 100644 index 00000000..246e0400 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_3/main_1.c @@ -0,0 +1,17 @@ +#include + +void _puts(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; + _puts(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_3/main_2.c b/0x05-pointers_arrays_strings/tests/task_3/main_2.c new file mode 100644 index 00000000..42e92a44 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_3/main_2.c @@ -0,0 +1,17 @@ +#include + +void _puts(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = ""; + _puts(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_4/4-main.c b/0x05-pointers_arrays_strings/tests/task_4/4-main.c new file mode 100644 index 00000000..a4d92ba0 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_4/4-main.c @@ -0,0 +1,15 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "I do not fear computers. I fear the lack of them - Isaac Asimov"; + print_rev(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_4/main_0.c b/0x05-pointers_arrays_strings/tests/task_4/main_0.c new file mode 100644 index 00000000..33a711d8 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_4/main_0.c @@ -0,0 +1,17 @@ +#include + +void print_rev(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "Holberton!"; + print_rev(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_4/main_1.c b/0x05-pointers_arrays_strings/tests/task_4/main_1.c new file mode 100644 index 00000000..a4695193 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_4/main_1.c @@ -0,0 +1,17 @@ +#include + +void print_rev(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; + print_rev(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_4/main_2.c b/0x05-pointers_arrays_strings/tests/task_4/main_2.c new file mode 100644 index 00000000..294ebbca --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_4/main_2.c @@ -0,0 +1,17 @@ +#include + +void print_rev(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = ""; + print_rev(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_5/5-main.c b/0x05-pointers_arrays_strings/tests/task_5/5-main.c new file mode 100644 index 00000000..0e97efff --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_5/5-main.c @@ -0,0 +1,17 @@ +#include "main.h" +#include + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char s[10] = "My School"; + + printf("%s\n", s); + rev_string(s); + printf("%s\n", s); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_5/main_0.c b/0x05-pointers_arrays_strings/tests/task_5/main_0.c new file mode 100644 index 00000000..2c655fdf --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_5/main_0.c @@ -0,0 +1,18 @@ +#include + +void rev_string(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[11] = "Holberton!"; + + printf("%s\n", s); + rev_string(s); + printf("%s\n", s); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_5/main_1.c b/0x05-pointers_arrays_strings/tests/task_5/main_1.c new file mode 100644 index 00000000..985d4abb --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_5/main_1.c @@ -0,0 +1,18 @@ +#include + +void rev_string(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[446] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; + + printf("%s\n", s); + rev_string(s); + printf("%s\n", s); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_5/main_2.c b/0x05-pointers_arrays_strings/tests/task_5/main_2.c new file mode 100644 index 00000000..9f2012cf --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_5/main_2.c @@ -0,0 +1,18 @@ +#include + +void rev_string(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[1] = ""; + + printf("%s\n", s); + rev_string(s); + printf("%s\n", s); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_6/6-main.c b/0x05-pointers_arrays_strings/tests/task_6/6-main.c new file mode 100644 index 00000000..e9149b17 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_6/6-main.c @@ -0,0 +1,15 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "0123456789"; + puts2(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_6/main_0.c b/0x05-pointers_arrays_strings/tests/task_6/main_0.c new file mode 100644 index 00000000..281bce45 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_6/main_0.c @@ -0,0 +1,17 @@ +#include + +void puts2(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "Holberton!\0Holberton"; + puts2(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_6/main_1.c b/0x05-pointers_arrays_strings/tests/task_6/main_1.c new file mode 100644 index 00000000..b68d7c6f --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_6/main_1.c @@ -0,0 +1,17 @@ +#include + +void puts2(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\0Holberton"; + puts2(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_6/main_2.c b/0x05-pointers_arrays_strings/tests/task_6/main_2.c new file mode 100644 index 00000000..9790fbb9 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_6/main_2.c @@ -0,0 +1,17 @@ +#include + +void puts2(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "\0Holberton"; + puts2(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_7/7-main.c b/0x05-pointers_arrays_strings/tests/task_7/7-main.c new file mode 100644 index 00000000..47d563b2 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_7/7-main.c @@ -0,0 +1,15 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "0123456789"; + puts_half(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_7/main_0.c b/0x05-pointers_arrays_strings/tests/task_7/main_0.c new file mode 100644 index 00000000..b7067b69 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_7/main_0.c @@ -0,0 +1,17 @@ +#include + +void puts_half(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "Holberton!"; + puts_half(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_7/main_1.c b/0x05-pointers_arrays_strings/tests/task_7/main_1.c new file mode 100644 index 00000000..21f4663c --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_7/main_1.c @@ -0,0 +1,17 @@ +#include + +void puts_half(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; + puts_half(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_7/main_2.c b/0x05-pointers_arrays_strings/tests/task_7/main_2.c new file mode 100644 index 00000000..34b5d59d --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_7/main_2.c @@ -0,0 +1,17 @@ +#include + +void puts_half(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *str; + + str = ""; + puts_half(str); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_8/8-main.c b/0x05-pointers_arrays_strings/tests/task_8/8-main.c new file mode 100644 index 00000000..63e01510 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_8/8-main.c @@ -0,0 +1,19 @@ +#include "main.h" + +/** + * main - check the code for + * + * Return: Always 0. + */ +int main(void) +{ + int array[5]; + + array[0] = 98; + array[1] = 402; + array[2] = -198; + array[3] = 298; + array[4] = -1024; + print_array(array, 5); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_8/main_0.c b/0x05-pointers_arrays_strings/tests/task_8/main_0.c new file mode 100644 index 00000000..90c667a1 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_8/main_0.c @@ -0,0 +1,18 @@ +#include + +void print_array(int *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int array[5] = { + -198, 298, 402, -1024, 98 + }; + + print_array(array, 5); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_8/main_1.c b/0x05-pointers_arrays_strings/tests/task_8/main_1.c new file mode 100644 index 00000000..ea2c84a3 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_8/main_1.c @@ -0,0 +1,59 @@ +#include + +void print_array(int *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int array[256] = { + 4668574, -3727662, 5893000, 1981709, 56942, -4406195, -2800234, + 7551417, 5748541, 175749, 6856543, 7124700, -5734369, 7998441, + 6579852, 3313813, 6568207, 6157189, -8391211, -8269195, + -181716, -9596951, 8829120, -7515444, -3844710, 7124403, + 3401213, -6266079, 9072340, 7888428, -6746487, 235234, + -643649, -6353328, -4112145, 3273886, 5414475, 5686540, + -1319834, -780284, -5916724, 7086706, 780098, -9914426, + 8978603, -2181639, -1931517, -8087784, 6289736, -840370, + 5543970, -496033, 5688943, -7908451, 9961938, -6099772, + -1011572, 3874925, -3915715, 3417668, -4944258, -3090579, + -5220580, -1072612, -2731881, 8975051, 9514295, -6156533, + -2757405, 2672413, 4584530, -9106502, 437154, -1893967, + -6321557, 5799262, 7219174, 22188, 7455896, 426297, -6348562, + 3305489, -5197431, -3337343, -8118472, 164657, 5751024, + -4103581, 1393144, -2768016, -7483989, 3229651, -6673589, + 6846270, 6391829, 4816628, -6996444, 2094759, 485812, 100266, + -2138243, -804725, -9930593, 2657252, -7168432, -9028111, + -5275299, 4849391, 1693543, 2631681, -8056505, -1115248, + -5858797, -5844876, -812512, 3587885, 6640559, -9313992, + 1579927, -7810743, 1743862, 4629504, -6738764, -9484897, + -4172770, -4302680, -2039246, -8350563, -2942731, 3869586, + -571450, 8191915, -2032267, 1205567, -8836437, -5270660, + -3293824, 6049737, -9310420, -378750, 4194729, 9849843, + 8924881, -3281537, 4265149, 5153263, 2992949, -4633533, + -5560175, -3588092, 1145459, 8178598, 5324732, -8623238, + 6326252, 9846952, 4218456, -1209560, 8271018, -3792723, + 6983422, 8130873, -3287712, 2955788, 5700139, 6346870, + 9602308, 2135235, -2937451, -6084622, -4167287, 9233124, + -9400577, 8292582, 4322463, 4089104, 7998239, 8589943, + 3021745, -8823598, -6772942, -6703253, -2903256, -1990349, + -2825567, 5525769, 8007479, 7234778, -8415499, -6687667, + 9502535, -3966350, 9593980, -9387688, 7745105, 7057556, + 9430808, -6093677, -5603392, 1228714, -4862560, -7394513, + -812828, -3722607, -9226239, -985188, -8197156, -5086924, + -6045627, 995242, 6638069, 5539546, -7375592, 8346414, + -2173605, 8183115, -9988634, 6172780, 8530529, -3100439, + -764623, 9456807, 1645723, 936102, -8712300, -9773354, + -3846727, -6025196, 4100312, -6463327, 3337467, -3486593, + -4162204, -8015343, 3522699, -7709578, -6374110, 7520188, + -8664960, 9260631, -1316721, -2008179, 1053062, 6010418, + 574155, -3347800, 1770576, -1902121, -1711230, -351346, + 8843143, 7024034, 524798, -2208942, 8926571, 5710000 + }; + + print_array(array, 256); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_8/main_2.c b/0x05-pointers_arrays_strings/tests/task_8/main_2.c new file mode 100644 index 00000000..208fe1de --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_8/main_2.c @@ -0,0 +1,19 @@ +#include + +void print_array(int *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int array[1] = { + 98 + }; + + print_array(array, 0); + print_array(array, -1); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_9/9-main.c b/0x05-pointers_arrays_strings/tests/task_9/9-main.c new file mode 100644 index 00000000..6ba9eb71 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_9/9-main.c @@ -0,0 +1,18 @@ +#include "main.h" +#include + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char s1[98]; + char *ptr; + + ptr = _strcpy(s1, "First, solve the problem. Then, write the code\n"); + printf("%s", s1); + printf("%s", ptr); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_9/main_0.c b/0x05-pointers_arrays_strings/tests/task_9/main_0.c new file mode 100644 index 00000000..4881f157 --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_9/main_0.c @@ -0,0 +1,25 @@ +#include + +#define LEN 10 + +void _memset(char *s, char c, int len); + +char *_strcpy(char *dest, char *src); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char cpy[LEN + 1] = {0}; + char *str; + char *ret; + + _memset(cpy, 'H', LEN); + str = "Holberton!"; + ret = _strcpy(cpy, str); + printf("%s\n%s\n%s\n", str, cpy, ret); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_9/main_1.c b/0x05-pointers_arrays_strings/tests/task_9/main_1.c new file mode 100644 index 00000000..fdd800ab --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_9/main_1.c @@ -0,0 +1,25 @@ +#include + +#define LEN 445 + +void _memset(char *s, char c, int len); + +char *_strcpy(char *dest, char *src); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char cpy[LEN + 1] = {0}; + char *str; + char *ret; + + _memset(cpy, 'H', LEN); + str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; + ret = _strcpy(cpy, str); + printf("%s\n%s\n%s\n", str, cpy, ret); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_9/main_2.c b/0x05-pointers_arrays_strings/tests/task_9/main_2.c new file mode 100644 index 00000000..7f8a863d --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_9/main_2.c @@ -0,0 +1,25 @@ +#include + +#define LEN 0 + +void _memset(char *s, char c, int len); + +char *_strcpy(char *dest, char *src); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char cpy[LEN + 1] = {0}; + char *str; + char *ret; + + _memset(cpy, 'H', LEN); + str = ""; + ret = _strcpy(cpy, str); + printf("%s\n%s\n%s\n", str, cpy, ret); + return (0); +} diff --git a/0x05-pointers_arrays_strings/tests/task_9/main_3.c b/0x05-pointers_arrays_strings/tests/task_9/main_3.c new file mode 100644 index 00000000..eade9a7c --- /dev/null +++ b/0x05-pointers_arrays_strings/tests/task_9/main_3.c @@ -0,0 +1,25 @@ +#include + +#define LEN 4 + +void _memset(char *s, char c, int len); + +char *_strcpy(char *dest, char *src); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char cpy[LEN + 1] = {0}; + char *str; + char *ret; + + _memset(cpy, 'H', LEN); + str = "Z"; + ret = _strcpy(cpy, str); + printf("%s\n%s\n%s\n", str, cpy, ret); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_0/main_0.c b/0x06-pointers_arrays_strings/tests/task_0/main_0.c new file mode 100644 index 00000000..4f04fc40 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_0/main_0.c @@ -0,0 +1,23 @@ +#include + +char *_strcat(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[98] = "Holberton "; + char s2[] = "School!\n"; + char *p; + + printf("%s\n", s1); + printf("%s", s2); + p = _strcat(s1, s2); + printf("%s", s1); + printf("%s", s2); + printf("%s", p); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_0/main_1.c b/0x06-pointers_arrays_strings/tests/task_0/main_1.c new file mode 100644 index 00000000..fb9dd546 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_0/main_1.c @@ -0,0 +1,23 @@ +#include + +char *_strcat(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[19] = "Holberton "; + char s2[] = "School!\n"; + char *p; + + printf("%s\n", s1); + printf("%s", s2); + p = _strcat(s1, s2); + printf("%s", s1); + printf("%s", s2); + printf("%s", p); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_0/main_2.c b/0x06-pointers_arrays_strings/tests/task_0/main_2.c new file mode 100644 index 00000000..c47a5d76 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_0/main_2.c @@ -0,0 +1,23 @@ +#include + +char *_strcat(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[1] = ""; + char s2[] = ""; + char *p; + + printf("%s\n", s1); + printf("%s\n", s2); + p = _strcat(s1, s2); + printf("%s\n", s1); + printf("%s\n", s2); + printf("%s\n", p); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_1/main_0.c b/0x06-pointers_arrays_strings/tests/task_1/main_0.c new file mode 100644 index 00000000..c396e822 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_1/main_0.c @@ -0,0 +1,23 @@ +#include + +char *_strncat(char *, char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[98] = "Holberton "; + char s2[] = "School!\n"; + char *p; + + printf("%s\n", s1); + printf("%s", s2); + p = _strncat(s1, s2, 5); + printf("%s\n", s1); + printf("%s", s2); + printf("%s\n", p); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_1/main_1.c b/0x06-pointers_arrays_strings/tests/task_1/main_1.c new file mode 100644 index 00000000..129d524f --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_1/main_1.c @@ -0,0 +1,23 @@ +#include + +char *_strncat(char *, char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[98] = "Holberton "; + char s2[] = "School!\n"; + char *p; + + printf("%s\n", s1); + printf("%s", s2); + p = _strncat(s1, s2, 50); + printf("%s\n", s1); + printf("%s", s2); + printf("%s\n", p); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_1/main_2.c b/0x06-pointers_arrays_strings/tests/task_1/main_2.c new file mode 100644 index 00000000..efc27f28 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_1/main_2.c @@ -0,0 +1,23 @@ +#include + +char *_strncat(char *, char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[98] = "Holberton "; + char s2[] = "School!\n"; + char *p; + + printf("%s\n", s1); + printf("%s", s2); + p = _strncat(s1, s2, 0); + printf("%s\n", s1); + printf("%s", s2); + printf("%s\n", p); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_1/main_3.c b/0x06-pointers_arrays_strings/tests/task_1/main_3.c new file mode 100644 index 00000000..b9063508 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_1/main_3.c @@ -0,0 +1,23 @@ +#include + +char *_strncat(char *, char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[1] = ""; + char s2[] = ""; + char *p; + + printf("%s\n", s1); + printf("%s", s2); + p = _strncat(s1, s2, 10); + printf("%s\n", s1); + printf("%s", s2); + printf("%s\n", p); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_11/main_0.c b/0x06-pointers_arrays_strings/tests/task_11/main_0.c new file mode 100644 index 00000000..f7e0ebcb --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_11/main_0.c @@ -0,0 +1,26 @@ +#include "main.h" +#include + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *n = "10"; + char *m = "89"; + char r[100]; + char *res; + + res = infinite_add(n, m, r, 100); + if (res == 0) + { + printf("Error\n"); + } + else + { + printf("%s + %s = %s\n", n, m, res); + } + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_11/main_1.c b/0x06-pointers_arrays_strings/tests/task_11/main_1.c new file mode 100644 index 00000000..56c7e23c --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_11/main_1.c @@ -0,0 +1,26 @@ +#include "main.h" +#include + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *n = "11"; + char *m = "89"; + char r[2]; + char *res; + + res = infinite_add(n, m, r, 2); + if (res == 0) + { + printf("Error\n"); + } + else + { + printf("%s + %s = %s\n", n, m, res); + } + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_11/main_2.c b/0x06-pointers_arrays_strings/tests/task_11/main_2.c new file mode 100644 index 00000000..d7782e9f --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_11/main_2.c @@ -0,0 +1,59 @@ +#include "main.h" +#include + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *n = "1234567892434574367823574575678477685785645685876876774586734734563456453743756756784458"; + char *m = "9034790663470697234682914569346259634958693246597324659762347956349265983465962349569346"; + char r[100]; + char r2[10]; + char r3[11]; + char *res; + + res = infinite_add(n, m, r, 100); + if (res == 0) + { + printf("Error\n"); + } + else + { + printf("%s + %s = %s\n", n, m, res); + } + n = "1234567890"; + m = "1"; + res = infinite_add(n, m, r2, 10); + if (res == 0) + { + printf("Error\n"); + } + else + { + printf("%s + %s = %s\n", n, m, res); + } + n = "999999999"; + m = "1"; + res = infinite_add(n, m, r2, 10); + if (res == 0) + { + printf("Error\n"); + } + else + { + printf("%s + %s = %s\n", n, m, res); + } + res = infinite_add(n, m, r3, 11); + if (res == 0) + { + printf("Error\n"); + } + else + { + printf("%s + %s = %s\n", n, m, res); + } + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_12/main_0.c b/0x06-pointers_arrays_strings/tests/task_12/main_0.c new file mode 100644 index 00000000..5f9f907f --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_12/main_0.c @@ -0,0 +1,18 @@ +#include + +void print_buffer(char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char buffer[] = "Talk is cheap. Show me the code."; + + printf("%s\n", buffer); + printf("---------------------------------\n"); + print_buffer(buffer, sizeof(buffer)); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_12/main_1.c b/0x06-pointers_arrays_strings/tests/task_12/main_1.c new file mode 100644 index 00000000..2f5d5fd6 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_12/main_1.c @@ -0,0 +1,18 @@ +#include + +void print_buffer(char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char buffer[] = "Talk\nis\t\tcheap.\x20 \1Sho\2w\3 me\4 \5the\6 code."; + + printf("%s\n", buffer); + printf("---------------------------------\n"); + print_buffer(buffer, sizeof(buffer)); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_12/main_2.c b/0x06-pointers_arrays_strings/tests/task_12/main_2.c new file mode 100644 index 00000000..4b76e2e7 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_12/main_2.c @@ -0,0 +1,18 @@ +#include + +void print_buffer(char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char buffer[] = "Holberton ! #CisAwesome\0And this is the rest of the #buffer\1\2\3\4\5\6\7:) #cisfun\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x20\x21\x34\x56#pointersarefun #infernumisfun\n"; + + printf("%s\n", buffer); + printf("---------------------------------\n"); + print_buffer(buffer, sizeof(buffer)); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_12/main_3.c b/0x06-pointers_arrays_strings/tests/task_12/main_3.c new file mode 100644 index 00000000..71278c6d --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_12/main_3.c @@ -0,0 +1,18 @@ +#include + +void print_buffer(char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char buffer[] = "Talk is cheap. Show me the code."; + + printf("%s\n", buffer); + printf("---------------------------------\n"); + print_buffer(buffer, 0); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_2/main_0.c b/0x06-pointers_arrays_strings/tests/task_2/main_0.c new file mode 100644 index 00000000..02c79dab --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_2/main_0.c @@ -0,0 +1,33 @@ +#include + +char *_strncpy(char *, char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[98]; + char *p; + int i; + + for (i = 0; i < 98 - 1; i++) + s1[i] = '-'; + s1[i] = '\0'; + printf("%s\n", s1); + p = _strncpy(s1, "Talk is cheap. Show me the code.\n", 14); + printf("%s\n", s1); + printf("%s\n", p); + for (i = 0; i < 98; i++) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", s1[i]); + } + printf("\n"); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_2/main_1.c b/0x06-pointers_arrays_strings/tests/task_2/main_1.c new file mode 100644 index 00000000..ec058401 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_2/main_1.c @@ -0,0 +1,33 @@ +#include + +char *_strncpy(char *, char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[98]; + char *p; + int i; + + for (i = 0; i < 98 - 1; i++) + s1[i] = '-'; + s1[i] = '\0'; + printf("%s\n", s1); + p = _strncpy(s1 + 10, "Talk is cheap. Show me the code.\n", 14); + printf("%s\n", s1); + printf("%s\n", p); + for (i = 0; i < 98; i++) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", s1[i]); + } + printf("\n"); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_2/main_2.c b/0x06-pointers_arrays_strings/tests/task_2/main_2.c new file mode 100644 index 00000000..351708ac --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_2/main_2.c @@ -0,0 +1,33 @@ +#include + +char *_strncpy(char *, char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[98]; + char *p; + int i; + + for (i = 0; i < 98 - 1; i++) + s1[i] = '-'; + s1[i] = '\0'; + printf("%s\n", s1); + p = _strncpy(s1, "Talk is cheap. Show me the code.\n", 0); + printf("%s\n", s1); + printf("%s\n", p); + for (i = 0; i < 98; i++) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", s1[i]); + } + printf("\n"); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_2/main_3.c b/0x06-pointers_arrays_strings/tests/task_2/main_3.c new file mode 100644 index 00000000..570374ea --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_2/main_3.c @@ -0,0 +1,33 @@ +#include + +char *_strncpy(char *, char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[98]; + char *p; + int i; + + for (i = 0; i < 98 - 1; i++) + s1[i] = '-'; + s1[i] = '\0'; + printf("%s\n", s1); + p = _strncpy(s1, "", 4); + printf("%s\n", s1); + printf("%s\n", p); + for (i = 0; i < 98; i++) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", s1[i]); + } + printf("\n"); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_2/main_4.c b/0x06-pointers_arrays_strings/tests/task_2/main_4.c new file mode 100644 index 00000000..639f5299 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_2/main_4.c @@ -0,0 +1,33 @@ +#include + +char *_strncpy(char *, char *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[98]; + char *p; + int i; + + for (i = 0; i < 98 - 1; i++) + s1[i] = '-'; + s1[i] = '\0'; + printf("%s\n", s1); + p = _strncpy(s1, "Talk is cheap. Show me the code.\n", 64); + printf("%s\n", s1); + printf("%s\n", p); + for (i = 0; i < 98; i++) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", s1[i]); + } + printf("\n"); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_3/main_0.c b/0x06-pointers_arrays_strings/tests/task_3/main_0.c new file mode 100644 index 00000000..aba1c119 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_3/main_0.c @@ -0,0 +1,17 @@ +#include + +int _strcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[] = "Holberton"; + char s2[] = "Holbeerton"; + + printf("%d\n", _strcmp(s1, s2)); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_3/main_1.c b/0x06-pointers_arrays_strings/tests/task_3/main_1.c new file mode 100644 index 00000000..5802aa0e --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_3/main_1.c @@ -0,0 +1,17 @@ +#include + +int _strcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[] = "Holberton"; + char s2[] = "Holbeerton"; + + printf("%d\n", _strcmp(s2, s1)); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_3/main_2.c b/0x06-pointers_arrays_strings/tests/task_3/main_2.c new file mode 100644 index 00000000..4f269e29 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_3/main_2.c @@ -0,0 +1,16 @@ +#include + +int _strcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s1[] = "Holberton"; + + printf("%d\n", _strcmp(s1, s1)); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_4/main_0.c b/0x06-pointers_arrays_strings/tests/task_4/main_0.c new file mode 100644 index 00000000..c0888562 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_4/main_0.c @@ -0,0 +1,42 @@ +#include + +void reverse_array(int *, int); + +/** + * print_array - Print an array of int + * + * @a: an array of integers + * @n: the number of elements in @a + */ +void print_array(int *a, int n) +{ + int i; + + i = 0; + while (i < n) + { + if (i != 0) + printf(", "); + printf("%d", a[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int a[] = { + 234234, 64534, 77632, 8723451, 98987, 1345231, 98534597, + 23456789, 6235456, 41235416, 374578, 10435434, 89734567 + }; + + print_array(a, sizeof(a) / sizeof(int)); + reverse_array(a, sizeof(a) / sizeof(int)); + print_array(a, sizeof(a) / sizeof(int)); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_4/main_1.c b/0x06-pointers_arrays_strings/tests/task_4/main_1.c new file mode 100644 index 00000000..62f06480 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_4/main_1.c @@ -0,0 +1,42 @@ +#include + +void reverse_array(int *, int); + +/** + * print_array - Print an array of int + * + * @a: an array of integers + * @n: the number of elements in @a + */ +void print_array(int *a, int n) +{ + int i; + + i = 0; + while (i < n) + { + if (i != 0) + printf(", "); + printf("%d", a[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int a[] = { + 234234, 64534, 77632, 8723451, 98987, 1345231, 98534597, + 23456789, 6235456, 41235416, 374578, 10435434, 89734567 + }; + + print_array(a, sizeof(a) / sizeof(int)); + reverse_array(a, 5); + print_array(a, sizeof(a) / sizeof(int)); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_4/main_2.c b/0x06-pointers_arrays_strings/tests/task_4/main_2.c new file mode 100644 index 00000000..44b8fd72 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_4/main_2.c @@ -0,0 +1,42 @@ +#include + +void reverse_array(int *, int); + +/** + * print_array - Print an array of int + * + * @a: an array of integers + * @n: the number of elements in @a + */ +void print_array(int *a, int n) +{ + int i; + + i = 0; + while (i < n) + { + if (i != 0) + printf(", "); + printf("%d", a[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int a[] = { + 234234, 64534, 77632, 8723451, 98987, 1345231, 98534597, + 23456789, 6235456, 41235416, 374578, 10435434, 89734567 + }; + + print_array(a, sizeof(a) / sizeof(int)); + reverse_array(a, 0); + print_array(a, sizeof(a) / sizeof(int)); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_4/main_3.c b/0x06-pointers_arrays_strings/tests/task_4/main_3.c new file mode 100644 index 00000000..545fea32 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_4/main_3.c @@ -0,0 +1,42 @@ +#include + +void reverse_array(int *, int); + +/** + * print_array - Print an array of int + * + * @a: an array of integers + * @n: the number of elements in @a + */ +void print_array(int *a, int n) +{ + int i; + + i = 0; + while (i < n) + { + if (i != 0) + printf(", "); + printf("%d", a[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int a[] = { + 234234, 64534, 77632, 8723451, 98987, 1345231, 98534597, + 23456789, 6235456, 41235416, 374578, 10435434, 89734567 + }; + + print_array(a, sizeof(a) / sizeof(int)); + reverse_array(a, -10); + print_array(a, sizeof(a) / sizeof(int)); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_5/main_0.c b/0x06-pointers_arrays_strings/tests/task_5/main_0.c new file mode 100644 index 00000000..b1300cad --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_5/main_0.c @@ -0,0 +1,19 @@ +#include + +char *string_toupper(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = "Hello"; + char *p; + + p = string_toupper(s); + printf("%s\n", p); + printf("%s\n", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_5/main_1.c b/0x06-pointers_arrays_strings/tests/task_5/main_1.c new file mode 100644 index 00000000..94c1e974 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_5/main_1.c @@ -0,0 +1,19 @@ +#include + +char *string_toupper(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = "Talk is cheap. Show me the code.\n"; + char *p; + + p = string_toupper(s); + printf("%s", p); + printf("%s", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_5/main_2.c b/0x06-pointers_arrays_strings/tests/task_5/main_2.c new file mode 100644 index 00000000..d2308706 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_5/main_2.c @@ -0,0 +1,19 @@ +#include + +char *string_toupper(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = ""; + char *p; + + p = string_toupper(s); + printf("%s\n", p); + printf("%s\n", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_6/main_0.c b/0x06-pointers_arrays_strings/tests/task_6/main_0.c new file mode 100644 index 00000000..51e5309b --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_6/main_0.c @@ -0,0 +1,19 @@ +#include + +char *cap_string(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = "hello world! expect the best. Prepare for the worst. Capitalize on what comes.\nhello world! hello-world 0123456hello world\thello world.hello world\n"; + char *p; + + p = cap_string(s); + printf("%s", p); + printf("%s", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_6/main_1.c b/0x06-pointers_arrays_strings/tests/task_6/main_1.c new file mode 100644 index 00000000..93d60928 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_6/main_1.c @@ -0,0 +1,19 @@ +#include + +char *cap_string(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = "HELLO WORLD! expect the best. Prepare for the worst. Capitalize on what comes.\nhello world! hello-world 0123456hello world\thello world.hello world\n"; + char *p; + + p = cap_string(s); + printf("%s", p); + printf("%s", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_6/main_2.c b/0x06-pointers_arrays_strings/tests/task_6/main_2.c new file mode 100644 index 00000000..e3eeb43a --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_6/main_2.c @@ -0,0 +1,19 @@ +#include + +char *cap_string(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = "-- expect the best. Prepare for the worst. Capitalize on what comes.\nhello world! hello-world 0123456hello world\thello world.hello world\n"; + char *p; + + p = cap_string(s); + printf("%s", p); + printf("%s", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_6/main_3.c b/0x06-pointers_arrays_strings/tests/task_6/main_3.c new file mode 100644 index 00000000..e584b74f --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_6/main_3.c @@ -0,0 +1,19 @@ +#include + +char *cap_string(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = ""; + char *p; + + p = cap_string(s); + printf("%s\n", p); + printf("%s\n", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_7/main_0.c b/0x06-pointers_arrays_strings/tests/task_7/main_0.c new file mode 100644 index 00000000..506ef9b3 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_7/main_0.c @@ -0,0 +1,19 @@ +#include + +char *leet(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = "Talk is cheap. Show me the code.\n"; + char *p; + + p = leet(s); + printf("%s", p); + printf("%s", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_7/main_1.c b/0x06-pointers_arrays_strings/tests/task_7/main_1.c new file mode 100644 index 00000000..84f77fbf --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_7/main_1.c @@ -0,0 +1,19 @@ +#include + +char *leet(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = "TALK IS CHEAP. SHOW ME THE CODE.\n"; + char *p; + + p = leet(s); + printf("%s", p); + printf("%s", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_7/main_2.c b/0x06-pointers_arrays_strings/tests/task_7/main_2.c new file mode 100644 index 00000000..ffdfe9bb --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_7/main_2.c @@ -0,0 +1,19 @@ +#include + +char *leet(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = ""; + char *p; + + p = leet(s); + printf("%s\n", p); + printf("%s\n", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_8/main_0.c b/0x06-pointers_arrays_strings/tests/task_8/main_0.c new file mode 100644 index 00000000..a5339f6a --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_8/main_0.c @@ -0,0 +1,19 @@ +#include + +char *rot13(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = "Talk is cheap. Show me the code ([#CisFun, #CisAwesome])\n"; + char *p; + + p = rot13(s); + printf("%s", p); + printf("%s", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_8/main_1.c b/0x06-pointers_arrays_strings/tests/task_8/main_1.c new file mode 100644 index 00000000..1ef78a73 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_8/main_1.c @@ -0,0 +1,19 @@ +#include + +char *rot13(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = "[]{}()*&^$#@!,.<>/?|;:~=-_+"; + char *p; + + p = rot13(s); + printf("%s\n", p); + printf("%s\n", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_8/main_2.c b/0x06-pointers_arrays_strings/tests/task_8/main_2.c new file mode 100644 index 00000000..247abfff --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_8/main_2.c @@ -0,0 +1,19 @@ +#include + +char *rot13(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char s[] = ""; + char *p; + + p = rot13(s); + printf("%s\n", p); + printf("%s\n", s); + return (0); +} diff --git a/0x06-pointers_arrays_strings/tests/task_9/main_0.c b/0x06-pointers_arrays_strings/tests/task_9/main_0.c new file mode 100644 index 00000000..f1dc2cd3 --- /dev/null +++ b/0x06-pointers_arrays_strings/tests/task_9/main_0.c @@ -0,0 +1,14 @@ +#include "main.h" +#include + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + print_number(0); + _putchar('\n'); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_0/main_0.c b/0x07-pointers_arrays_strings/tests/task_0/main_0.c new file mode 100644 index 00000000..41f26894 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_0/main_0.c @@ -0,0 +1,50 @@ +#include + +char *_memset(char *, char, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char buffer[] = "Talk is cheap. Show me the code."; + char *p; + unsigned int len; + unsigned int offset; + + len = 33; + simple_print_buffer(buffer, len); + printf("-------------------------------------------------\n"); + offset = 0; + p = _memset(buffer + offset, 0x20, 16); + simple_print_buffer(buffer, len); + printf("-------------------------------------------------\n"); + simple_print_buffer(p, len - offset); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_0/main_1.c b/0x07-pointers_arrays_strings/tests/task_0/main_1.c new file mode 100644 index 00000000..05881c11 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_0/main_1.c @@ -0,0 +1,50 @@ +#include + +char *_memset(char *, char, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char buffer[] = "Talk is cheap. Show me the code."; + char *p; + unsigned int len; + unsigned int offset; + + len = 33; + simple_print_buffer(buffer, len); + printf("-------------------------------------------------\n"); + offset = 5; + p = _memset(buffer + offset, 0x20, 20); + simple_print_buffer(buffer, len); + printf("-------------------------------------------------\n"); + simple_print_buffer(p, len - offset); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_0/main_2.c b/0x07-pointers_arrays_strings/tests/task_0/main_2.c new file mode 100644 index 00000000..799f4459 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_0/main_2.c @@ -0,0 +1,50 @@ +#include + +char *_memset(char *, char, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char buffer[] = "Talk is cheap. Show me the code."; + char *p; + unsigned int len; + unsigned int offset; + + len = 33; + simple_print_buffer(buffer, len); + printf("-------------------------------------------------\n"); + offset = 0; + p = _memset(buffer + offset, 0x20, len); + simple_print_buffer(buffer, len); + printf("-------------------------------------------------\n"); + simple_print_buffer(p, len - offset); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_1/main_0.c b/0x07-pointers_arrays_strings/tests/task_1/main_0.c new file mode 100644 index 00000000..99afb62c --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_1/main_0.c @@ -0,0 +1,53 @@ +#include + +char *_memcpy(char *, char *, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char buffer[] = "First, solve the problem. Then, write the code."; + char buffer2[] = "Talk is cheap. Show me the code."; + char *p; + unsigned int len; + unsigned int offset; + unsigned int offset2; + + len = 48; + offset = 0; + offset2 = 0; + simple_print_buffer(buffer, len); + p = _memcpy(buffer + offset, buffer2 + offset2, 10); + printf("-------------------------------------------------\n"); + simple_print_buffer(buffer, len); + printf("-------------------------------------------------\n"); + simple_print_buffer(p, len - offset); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_1/main_1.c b/0x07-pointers_arrays_strings/tests/task_1/main_1.c new file mode 100644 index 00000000..ae58a9e9 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_1/main_1.c @@ -0,0 +1,53 @@ +#include + +char *_memcpy(char *, char *, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char buffer[] = "First, solve the problem. Then, write the code."; + char buffer2[] = "Talk is cheap. Show me the code."; + char *p; + unsigned int len; + unsigned int offset; + unsigned int offset2; + + len = 48; + offset = 12; + offset2 = 10; + simple_print_buffer(buffer, len); + p = _memcpy(buffer + offset, buffer2 + offset2, 12); + printf("-------------------------------------------------\n"); + simple_print_buffer(buffer, len); + printf("-------------------------------------------------\n"); + simple_print_buffer(p, len - offset); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_1/main_2.c b/0x07-pointers_arrays_strings/tests/task_1/main_2.c new file mode 100644 index 00000000..d6ca2870 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_1/main_2.c @@ -0,0 +1,53 @@ +#include + +char *_memcpy(char *, char *, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + printf(" "); + if (!(i % 10) && i) + printf("\n"); + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char buffer[] = "First, solve the problem. Then, write the code."; + char buffer2[] = "Talk is cheap. Show me the code."; + char *p; + unsigned int len; + unsigned int offset; + unsigned int offset2; + + len = 48; + offset = 0; + offset2 = 0; + simple_print_buffer(buffer, len); + p = _memcpy(buffer + offset, buffer2 + offset2, 33); + printf("-------------------------------------------------\n"); + simple_print_buffer(buffer, len); + printf("-------------------------------------------------\n"); + simple_print_buffer(p, len - offset); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_2/main_0.c b/0x07-pointers_arrays_strings/tests/task_2/main_0.c new file mode 100644 index 00000000..b5226e9c --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_2/main_0.c @@ -0,0 +1,18 @@ +#include + +char *_strchr(char *, char); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "First, solve the problem. Then, write the code."; + char *f; + + f = _strchr(s, ','); + printf("%s\n", (f == NULL ? "nil" : f)); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_2/main_1.c b/0x07-pointers_arrays_strings/tests/task_2/main_1.c new file mode 100644 index 00000000..811a8057 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_2/main_1.c @@ -0,0 +1,19 @@ +#include +#include + +char *_strchr(char *, char); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "First, solve the problem. Then, write the code."; + char *f; + + f = _strchr(s, 'a'); + printf("%s\n", (f == NULL ? "nil" : f)); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_2/main_2.c b/0x07-pointers_arrays_strings/tests/task_2/main_2.c new file mode 100644 index 00000000..2bc8b552 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_2/main_2.c @@ -0,0 +1,18 @@ +#include + +char *_strchr(char *, char); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "First, solve the problem. Then, write the code."; + char *f; + + f = _strchr(s, '\0'); + printf("%s\n", (f == NULL ? "nil" : f)); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_3/main_0.c b/0x07-pointers_arrays_strings/tests/task_3/main_0.c new file mode 100644 index 00000000..3a147c66 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_3/main_0.c @@ -0,0 +1,19 @@ +#include + +unsigned int _strspn(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "First, solve the problem. Then, write the code."; + char *f = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + unsigned int n; + + n = _strspn(s, f); + printf("%u\n", n); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_3/main_1.c b/0x07-pointers_arrays_strings/tests/task_3/main_1.c new file mode 100644 index 00000000..f1e45cb1 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_3/main_1.c @@ -0,0 +1,19 @@ +#include + +unsigned int _strspn(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "First, solve the problem. Then, write the code."; + char *f = "[]{}()"; + unsigned int n; + + n = _strspn(s, f); + printf("%u\n", n); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_3/main_2.c b/0x07-pointers_arrays_strings/tests/task_3/main_2.c new file mode 100644 index 00000000..d45ddc86 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_3/main_2.c @@ -0,0 +1,21 @@ +#include + +unsigned int _strspn(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "abcdef"; + char *f = ""; + unsigned int n; + + n = _strspn(s, f); + printf("%u\n", n); + n = _strspn(f, s); + printf("%u\n", n); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_4/main_0.c b/0x07-pointers_arrays_strings/tests/task_4/main_0.c new file mode 100644 index 00000000..5c4bd88b --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_4/main_0.c @@ -0,0 +1,19 @@ +#include + +char *_strpbrk(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "First, solve the problem. Then, write the code."; + char *f = "School"; + char *t; + + t = _strpbrk(s, f); + printf("%s\n", (t == NULL ? "nil" : t)); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_4/main_1.c b/0x07-pointers_arrays_strings/tests/task_4/main_1.c new file mode 100644 index 00000000..9b48a2ed --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_4/main_1.c @@ -0,0 +1,20 @@ +#include +#include + +char *_strpbrk(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "First, solve the problem. Then, write the code."; + char *f = "[]{}()"; + char *t; + + t = _strpbrk(s, f); + printf("%s\n", (t == NULL ? "nil" : t)); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_4/main_2.c b/0x07-pointers_arrays_strings/tests/task_4/main_2.c new file mode 100644 index 00000000..0861764d --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_4/main_2.c @@ -0,0 +1,21 @@ +#include + +char *_strpbrk(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "abcdef"; + char *f = ""; + char *t; + + t = _strpbrk(s, f); + printf("%s\n", (t == NULL ? "nil" : t)); + t = _strpbrk(f, s); + printf("%s\n", (t == NULL ? "nil" : t)); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_5/main_0.c b/0x07-pointers_arrays_strings/tests/task_5/main_0.c new file mode 100644 index 00000000..c5d91443 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_5/main_0.c @@ -0,0 +1,19 @@ +#include + +char *_strstr(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "First, solve the problem. Then, write the code."; + char *f = "solve"; + char *t; + + t = _strstr(s, f); + printf("%s\n", (t == NULL ? "nil" : t)); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_5/main_1.c b/0x07-pointers_arrays_strings/tests/task_5/main_1.c new file mode 100644 index 00000000..eb62e99f --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_5/main_1.c @@ -0,0 +1,20 @@ +#include +#include + +char *_strstr(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "First, solve the problem. Then, write the code."; + char *f = "School"; + char *t; + + t = _strstr(s, f); + printf("%s\n", (t == NULL ? "nil" : t)); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_5/main_2.c b/0x07-pointers_arrays_strings/tests/task_5/main_2.c new file mode 100644 index 00000000..6979f0ea --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_5/main_2.c @@ -0,0 +1,19 @@ +#include + +char *_strstr(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s = "First, solve the problem. Then, write the code."; + char *f = ""; + char *t; + + t = _strstr(s, f); + printf("%s\n", (t == NULL ? "nil" : t)); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_6/main_0.c b/0x07-pointers_arrays_strings/tests/task_6/main_0.c new file mode 100644 index 00000000..c979b0ae --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_6/main_0.c @@ -0,0 +1,22 @@ +void print_chessboard(char (*)[8]); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char board[8][8] = { + {'r', ' ', 'b', ' ', 'k', 'b', 'k', 'r'}, + {'p', 'p', 'p', ' ', 'p', 'p', 'p', ' '}, + {' ', ' ', 'k', ' ', 'q', ' ', ' ', ' '}, + {' ', ' ', ' ', 'p', ' ', ' ', ' ', ' '}, + {' ', 'P', ' ', ' ', ' ', ' ', ' ', 'p'}, + {' ', ' ', ' ', ' ', ' ', 'K', 'P', 'B'}, + {'P', ' ', 'P', 'P', 'P', 'P', ' ', 'P'}, + {'R', 'K', 'B', 'Q', ' ', 'R', 'K', ' '}, + }; + print_chessboard(board); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_6/main_1.c b/0x07-pointers_arrays_strings/tests/task_6/main_1.c new file mode 100644 index 00000000..9a99edb6 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_6/main_1.c @@ -0,0 +1,22 @@ +void print_chessboard(char (*)[8]); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char board[8][8] = { + {' ', 'r', 'b', ' ', 'k', ' ', ' ', 'r'}, + {'p', ' ', 'p', ' ', 'p', 'p', ' ', ' '}, + {' ', ' ', 'k', ' ', 'q', 'k', 'p', 'b'}, + {' ', 'p', ' ', 'p', ' ', ' ', ' ', ' '}, + {' ', 'P', ' ', ' ', ' ', ' ', ' ', 'p'}, + {' ', ' ', 'K', ' ', ' ', 'K', 'P', 'B'}, + {'P', 'B', 'P', 'P', 'P', 'P', ' ', 'P'}, + {'R', ' ', ' ', 'Q', ' ', 'R', 'K', ' '}, + }; + print_chessboard(board); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_6/main_2.c b/0x07-pointers_arrays_strings/tests/task_6/main_2.c new file mode 100644 index 00000000..d6186a10 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_6/main_2.c @@ -0,0 +1,22 @@ +void print_chessboard(char (*)[8]); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char board[8][8] = { + {' ', 'r', 'b', ' ', 'k', ' ', ' ', ' '}, + {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, + {' ', ' ', 'k', ' ', 'q', 'r', ' ', 'b'}, + {'R', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, + {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, + {' ', ' ', 'K', ' ', ' ', 'K', ' ', 'B'}, + {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, + {' ', ' ', ' ', 'Q', ' ', 'R', 'K', ' '}, + }; + print_chessboard(board); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_7/main_0.c b/0x07-pointers_arrays_strings/tests/task_7/main_0.c new file mode 100644 index 00000000..c39f0f2d --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_7/main_0.c @@ -0,0 +1,17 @@ +void print_diagsums(int *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int c3[3][3] = { + {72635472, 652476, 23842634}, + {2634534, 2782634, 63458345}, + {3453454, 3453455, 28974827} + }; + print_diagsums((int *)c3, 3); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_7/main_1.c b/0x07-pointers_arrays_strings/tests/task_7/main_1.c new file mode 100644 index 00000000..962842ca --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_7/main_1.c @@ -0,0 +1,20 @@ +void print_diagsums(int *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int c6[6][6] = { + {-72635472, 652476, 23842634, 72635472, 652476, -23842634}, + {2634534, 2782634, 63458345, 2634534, 2782634, 63458345}, + {-3453454, 3453455, -28974827, -3453454, 3453455, -28974827}, + {-72635472, 652476, 23842634, 72635472, 652476, -23842634}, + {2634534, 2782634, 63458345, 2634534, 2782634, 63458345}, + {-3453454, 3453455, -28974827, -3453454, 3453455, -28974827} + }; + print_diagsums((int *)c6, 6); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_7/main_2.c b/0x07-pointers_arrays_strings/tests/task_7/main_2.c new file mode 100644 index 00000000..0dd8a7f5 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_7/main_2.c @@ -0,0 +1,24 @@ +void print_diagsums(int *, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int c10[10][10] = { + {-72635472, 652476, 23842634, 72635472, 652476, -23842634, 652476, 23842634, 72635472, 652476}, + {2634534, 2782634, 63458345, 2634534, 2782634, 63458345, 3453455, -28974827, -3453454, 3453455}, + {-3453454, 3453455, -28974827, -3453454, 3453455, -28974827, 72635472, 652476, 23842634, 72635472}, + {-72635472, 652476, 23842634, 72635472, 652476, -23842634, 63458345, 2634534, 2782634, 63458345}, + {2634534, 2782634, 63458345, 2634534, 2782634, 63458345, 3453454, 3453455, -28974827, 72635472}, + {-3453454, 3453455, -28974827, -3453454, 3453455, -28974827, 3453454, 3453455, -28974827, -3453454}, + {-3453454, 3453455, -28974827, -3453454, 3453455, -28974827, 72635472, 652476, 23842634, 72635472}, + {-72635472, 652476, 23842634, 72635472, 652476, -23842634, 63458345, 2634534, 2782634, 63458345}, + {2634534, 2782634, 63458345, 2634534, 2782634, 63458345, 3453454, 3453455, -28974827, 72635472}, + {-3453454, 3453455, -28974827, -3453454, 3453455, -28974827, 3453454, 3453455, -28974827, -3453454} + }; + print_diagsums((int *)c10, 10); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_8/main_0.c b/0x07-pointers_arrays_strings/tests/task_8/main_0.c new file mode 100644 index 00000000..7f2a69cc --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_8/main_0.c @@ -0,0 +1,18 @@ +#include "main.h" +#include + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s0 = "Anne Cognet"; + char *s1 = "Asaia Palacios"; + + printf("%s, %s\n", s0, s1); + set_string(&s1, s0); + printf("%s, %s\n", s0, s1); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_8/main_1.c b/0x07-pointers_arrays_strings/tests/task_8/main_1.c new file mode 100644 index 00000000..578c3f37 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_8/main_1.c @@ -0,0 +1,18 @@ +#include "main.h" +#include + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s0 = NULL; + char *s1 = "Asaia Palacios"; + + printf("%s, %s\n", s0, s1); + set_string(&s1, s0); + printf("%s, %s\n", s0, s1); + return (0); +} diff --git a/0x07-pointers_arrays_strings/tests/task_8/main_2.c b/0x07-pointers_arrays_strings/tests/task_8/main_2.c new file mode 100644 index 00000000..3b740429 --- /dev/null +++ b/0x07-pointers_arrays_strings/tests/task_8/main_2.c @@ -0,0 +1,24 @@ +#include "main.h" +#include + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + char *s0 = "Anne Cognet"; + char *s1 = "Asaia Palacios"; + + printf("%s, %s\n", s0, s1); + if (s0 != s1) { + printf("Different\n"); + } + set_string(&s1, s0); + printf("%s, %s\n", s0, s1); + if (s0 == s1) { + printf("Equal\n"); + } + return (0); +} diff --git a/0x08-recursion/tests/task_0/count_loops.c b/0x08-recursion/tests/task_0/count_loops.c new file mode 100644 index 00000000..e3e4b804 --- /dev/null +++ b/0x08-recursion/tests/task_0/count_loops.c @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +use strict; + +my $check_while = 1; +my $check_for = 1; +my $check_do = 1; +my $check_goto = 1; + +while ($ARGV[0] =~ m/^-(.*)/) { + my $cmd = shift @ARGV; + + if ($cmd eq "--no-while") + { + $check_while = 0; + } + if ($cmd eq "--no-for") + { + $check_for = 0; + } + if ($cmd eq "--no-do") + { + $check_do = 0; + } + if ($cmd eq "--no-goto") + { + $check_goto = 0; + } +} + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if (($check_while == 1 && $line =~ /^\s*(while\s*\(.*)$/) || + ($check_for == 1 && $line =~ /^\s*(for\s*\(.*)$/) || + ($check_do == 1 && $line =~ /^\s*}\s*(while\s*\(.*)/) || + ($check_goto == 1 && $line =~ /\b(goto\b.*)/)) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_0/count_static_variables.c b/0x08-recursion/tests/task_0/count_static_variables.c new file mode 100644 index 00000000..c89f45e2 --- /dev/null +++ b/0x08-recursion/tests/task_0/count_static_variables.c @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if ($line =~ /^\s*\b(static\b.*)$/) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_0/main_0.c b/0x08-recursion/tests/task_0/main_0.c new file mode 100644 index 00000000..d9ed381d --- /dev/null +++ b/0x08-recursion/tests/task_0/main_0.c @@ -0,0 +1,12 @@ +void _puts_recursion(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + _puts_recursion("First, solve the problem. Then, write the code"); + return (0); +} diff --git a/0x08-recursion/tests/task_0/main_1.c b/0x08-recursion/tests/task_0/main_1.c new file mode 100644 index 00000000..8424acd8 --- /dev/null +++ b/0x08-recursion/tests/task_0/main_1.c @@ -0,0 +1,12 @@ +void _puts_recursion(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + _puts_recursion("Talk is cheap. Show me the code"); + return (0); +} diff --git a/0x08-recursion/tests/task_0/main_2.c b/0x08-recursion/tests/task_0/main_2.c new file mode 100644 index 00000000..87d0e905 --- /dev/null +++ b/0x08-recursion/tests/task_0/main_2.c @@ -0,0 +1,12 @@ +void _puts_recursion(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + _puts_recursion(""); + return (0); +} diff --git a/0x08-recursion/tests/task_1/count_loops.c b/0x08-recursion/tests/task_1/count_loops.c new file mode 100644 index 00000000..e3e4b804 --- /dev/null +++ b/0x08-recursion/tests/task_1/count_loops.c @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +use strict; + +my $check_while = 1; +my $check_for = 1; +my $check_do = 1; +my $check_goto = 1; + +while ($ARGV[0] =~ m/^-(.*)/) { + my $cmd = shift @ARGV; + + if ($cmd eq "--no-while") + { + $check_while = 0; + } + if ($cmd eq "--no-for") + { + $check_for = 0; + } + if ($cmd eq "--no-do") + { + $check_do = 0; + } + if ($cmd eq "--no-goto") + { + $check_goto = 0; + } +} + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if (($check_while == 1 && $line =~ /^\s*(while\s*\(.*)$/) || + ($check_for == 1 && $line =~ /^\s*(for\s*\(.*)$/) || + ($check_do == 1 && $line =~ /^\s*}\s*(while\s*\(.*)/) || + ($check_goto == 1 && $line =~ /\b(goto\b.*)/)) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_1/count_static_variables.c b/0x08-recursion/tests/task_1/count_static_variables.c new file mode 100644 index 00000000..c89f45e2 --- /dev/null +++ b/0x08-recursion/tests/task_1/count_static_variables.c @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if ($line =~ /^\s*\b(static\b.*)$/) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_1/main_0.c b/0x08-recursion/tests/task_1/main_0.c new file mode 100644 index 00000000..84b8b069 --- /dev/null +++ b/0x08-recursion/tests/task_1/main_0.c @@ -0,0 +1,12 @@ +void _print_rev_recursion(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + _print_rev_recursion("\nFirst, solve the problem. Then, write the code"); + return (0); +} diff --git a/0x08-recursion/tests/task_1/main_1.c b/0x08-recursion/tests/task_1/main_1.c new file mode 100644 index 00000000..cbdff7d5 --- /dev/null +++ b/0x08-recursion/tests/task_1/main_1.c @@ -0,0 +1,12 @@ +void _print_rev_recursion(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + _print_rev_recursion("\nTalk is cheap. Show me the code"); + return (0); +} diff --git a/0x08-recursion/tests/task_1/main_2.c b/0x08-recursion/tests/task_1/main_2.c new file mode 100644 index 00000000..d5d12600 --- /dev/null +++ b/0x08-recursion/tests/task_1/main_2.c @@ -0,0 +1,12 @@ +void _print_rev_recursion(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + _print_rev_recursion(""); + return (0); +} diff --git a/0x08-recursion/tests/task_2/count_loops.c b/0x08-recursion/tests/task_2/count_loops.c new file mode 100644 index 00000000..e3e4b804 --- /dev/null +++ b/0x08-recursion/tests/task_2/count_loops.c @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +use strict; + +my $check_while = 1; +my $check_for = 1; +my $check_do = 1; +my $check_goto = 1; + +while ($ARGV[0] =~ m/^-(.*)/) { + my $cmd = shift @ARGV; + + if ($cmd eq "--no-while") + { + $check_while = 0; + } + if ($cmd eq "--no-for") + { + $check_for = 0; + } + if ($cmd eq "--no-do") + { + $check_do = 0; + } + if ($cmd eq "--no-goto") + { + $check_goto = 0; + } +} + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if (($check_while == 1 && $line =~ /^\s*(while\s*\(.*)$/) || + ($check_for == 1 && $line =~ /^\s*(for\s*\(.*)$/) || + ($check_do == 1 && $line =~ /^\s*}\s*(while\s*\(.*)/) || + ($check_goto == 1 && $line =~ /\b(goto\b.*)/)) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_2/count_static_variables.c b/0x08-recursion/tests/task_2/count_static_variables.c new file mode 100644 index 00000000..c89f45e2 --- /dev/null +++ b/0x08-recursion/tests/task_2/count_static_variables.c @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if ($line =~ /^\s*\b(static\b.*)$/) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_2/main_0.c b/0x08-recursion/tests/task_2/main_0.c new file mode 100644 index 00000000..91dd8620 --- /dev/null +++ b/0x08-recursion/tests/task_2/main_0.c @@ -0,0 +1,17 @@ +#include + +int _strlen_recursion(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _strlen_recursion("You mustn't be afraid to dream a little bigger, darling."); + printf("%d\n", n); + return (0); +} diff --git a/0x08-recursion/tests/task_2/main_1.c b/0x08-recursion/tests/task_2/main_1.c new file mode 100644 index 00000000..99d2b198 --- /dev/null +++ b/0x08-recursion/tests/task_2/main_1.c @@ -0,0 +1,17 @@ +#include + +int _strlen_recursion(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _strlen_recursion("Dreams feel real while we're in them. It's only when we wake up that we realize something was actually strange."); + printf("%d\n", n); + return (0); +} diff --git a/0x08-recursion/tests/task_2/main_2.c b/0x08-recursion/tests/task_2/main_2.c new file mode 100644 index 00000000..406e2c20 --- /dev/null +++ b/0x08-recursion/tests/task_2/main_2.c @@ -0,0 +1,17 @@ +#include + +int _strlen_recursion(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = _strlen_recursion(""); + printf("%d\n", n); + return (0); +} diff --git a/0x08-recursion/tests/task_3/count_loops.pl b/0x08-recursion/tests/task_3/count_loops.pl new file mode 100644 index 00000000..e3e4b804 --- /dev/null +++ b/0x08-recursion/tests/task_3/count_loops.pl @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +use strict; + +my $check_while = 1; +my $check_for = 1; +my $check_do = 1; +my $check_goto = 1; + +while ($ARGV[0] =~ m/^-(.*)/) { + my $cmd = shift @ARGV; + + if ($cmd eq "--no-while") + { + $check_while = 0; + } + if ($cmd eq "--no-for") + { + $check_for = 0; + } + if ($cmd eq "--no-do") + { + $check_do = 0; + } + if ($cmd eq "--no-goto") + { + $check_goto = 0; + } +} + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if (($check_while == 1 && $line =~ /^\s*(while\s*\(.*)$/) || + ($check_for == 1 && $line =~ /^\s*(for\s*\(.*)$/) || + ($check_do == 1 && $line =~ /^\s*}\s*(while\s*\(.*)/) || + ($check_goto == 1 && $line =~ /\b(goto\b.*)/)) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_3/count_static_variables.pl b/0x08-recursion/tests/task_3/count_static_variables.pl new file mode 100644 index 00000000..c89f45e2 --- /dev/null +++ b/0x08-recursion/tests/task_3/count_static_variables.pl @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if ($line =~ /^\s*\b(static\b.*)$/) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_3/main_0.c b/0x08-recursion/tests/task_3/main_0.c new file mode 100644 index 00000000..e6227390 --- /dev/null +++ b/0x08-recursion/tests/task_3/main_0.c @@ -0,0 +1,17 @@ +#include + +int factorial(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = factorial(1); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_3/main_1.c b/0x08-recursion/tests/task_3/main_1.c new file mode 100644 index 00000000..fda50716 --- /dev/null +++ b/0x08-recursion/tests/task_3/main_1.c @@ -0,0 +1,17 @@ +#include + +int factorial(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = factorial(7); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_3/main_2.c b/0x08-recursion/tests/task_3/main_2.c new file mode 100644 index 00000000..4b1bafa2 --- /dev/null +++ b/0x08-recursion/tests/task_3/main_2.c @@ -0,0 +1,19 @@ +#include + +int factorial(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = factorial(12); + printf("%d\n", r); + r = factorial(-98); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_4/count_loops.pl b/0x08-recursion/tests/task_4/count_loops.pl new file mode 100644 index 00000000..e3e4b804 --- /dev/null +++ b/0x08-recursion/tests/task_4/count_loops.pl @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +use strict; + +my $check_while = 1; +my $check_for = 1; +my $check_do = 1; +my $check_goto = 1; + +while ($ARGV[0] =~ m/^-(.*)/) { + my $cmd = shift @ARGV; + + if ($cmd eq "--no-while") + { + $check_while = 0; + } + if ($cmd eq "--no-for") + { + $check_for = 0; + } + if ($cmd eq "--no-do") + { + $check_do = 0; + } + if ($cmd eq "--no-goto") + { + $check_goto = 0; + } +} + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if (($check_while == 1 && $line =~ /^\s*(while\s*\(.*)$/) || + ($check_for == 1 && $line =~ /^\s*(for\s*\(.*)$/) || + ($check_do == 1 && $line =~ /^\s*}\s*(while\s*\(.*)/) || + ($check_goto == 1 && $line =~ /\b(goto\b.*)/)) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_4/count_static_variables.pl b/0x08-recursion/tests/task_4/count_static_variables.pl new file mode 100644 index 00000000..c89f45e2 --- /dev/null +++ b/0x08-recursion/tests/task_4/count_static_variables.pl @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if ($line =~ /^\s*\b(static\b.*)$/) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_4/main_0.c b/0x08-recursion/tests/task_4/main_0.c new file mode 100644 index 00000000..a4bd89e4 --- /dev/null +++ b/0x08-recursion/tests/task_4/main_0.c @@ -0,0 +1,17 @@ +#include + +int _pow_recursion(int, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _pow_recursion(9, 8); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_4/main_1.c b/0x08-recursion/tests/task_4/main_1.c new file mode 100644 index 00000000..00efd76c --- /dev/null +++ b/0x08-recursion/tests/task_4/main_1.c @@ -0,0 +1,17 @@ +#include + +int _pow_recursion(int, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _pow_recursion(402, 0); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_4/main_2.c b/0x08-recursion/tests/task_4/main_2.c new file mode 100644 index 00000000..6588ab6a --- /dev/null +++ b/0x08-recursion/tests/task_4/main_2.c @@ -0,0 +1,17 @@ +#include + +int _pow_recursion(int, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _pow_recursion(50, -2); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_4/main_3.c b/0x08-recursion/tests/task_4/main_3.c new file mode 100644 index 00000000..6ef721af --- /dev/null +++ b/0x08-recursion/tests/task_4/main_3.c @@ -0,0 +1,17 @@ +#include + +int _pow_recursion(int, int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _pow_recursion(-8, 5); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_5/count_loops.c b/0x08-recursion/tests/task_5/count_loops.c new file mode 100644 index 00000000..e3e4b804 --- /dev/null +++ b/0x08-recursion/tests/task_5/count_loops.c @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +use strict; + +my $check_while = 1; +my $check_for = 1; +my $check_do = 1; +my $check_goto = 1; + +while ($ARGV[0] =~ m/^-(.*)/) { + my $cmd = shift @ARGV; + + if ($cmd eq "--no-while") + { + $check_while = 0; + } + if ($cmd eq "--no-for") + { + $check_for = 0; + } + if ($cmd eq "--no-do") + { + $check_do = 0; + } + if ($cmd eq "--no-goto") + { + $check_goto = 0; + } +} + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if (($check_while == 1 && $line =~ /^\s*(while\s*\(.*)$/) || + ($check_for == 1 && $line =~ /^\s*(for\s*\(.*)$/) || + ($check_do == 1 && $line =~ /^\s*}\s*(while\s*\(.*)/) || + ($check_goto == 1 && $line =~ /\b(goto\b.*)/)) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_5/count_static_variables.c b/0x08-recursion/tests/task_5/count_static_variables.c new file mode 100644 index 00000000..c89f45e2 --- /dev/null +++ b/0x08-recursion/tests/task_5/count_static_variables.c @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if ($line =~ /^\s*\b(static\b.*)$/) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_5/main_0.c b/0x08-recursion/tests/task_5/main_0.c new file mode 100644 index 00000000..5ccd573c --- /dev/null +++ b/0x08-recursion/tests/task_5/main_0.c @@ -0,0 +1,17 @@ +#include + +int _sqrt_recursion(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _sqrt_recursion(1); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_5/main_1.c b/0x08-recursion/tests/task_5/main_1.c new file mode 100644 index 00000000..e357e033 --- /dev/null +++ b/0x08-recursion/tests/task_5/main_1.c @@ -0,0 +1,17 @@ +#include + +int _sqrt_recursion(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _sqrt_recursion(4096); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_5/main_2.c b/0x08-recursion/tests/task_5/main_2.c new file mode 100644 index 00000000..7ef70b19 --- /dev/null +++ b/0x08-recursion/tests/task_5/main_2.c @@ -0,0 +1,17 @@ +#include + +int _sqrt_recursion(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = _sqrt_recursion(-16); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_5/main_3.c b/0x08-recursion/tests/task_5/main_3.c new file mode 100644 index 00000000..4bbcba3e --- /dev/null +++ b/0x08-recursion/tests/task_5/main_3.c @@ -0,0 +1,18 @@ +#include + +int _sqrt_recursion(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + + r = _sqrt_recursion(16777216); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_6/count_loops.c b/0x08-recursion/tests/task_6/count_loops.c new file mode 100644 index 00000000..e3e4b804 --- /dev/null +++ b/0x08-recursion/tests/task_6/count_loops.c @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +use strict; + +my $check_while = 1; +my $check_for = 1; +my $check_do = 1; +my $check_goto = 1; + +while ($ARGV[0] =~ m/^-(.*)/) { + my $cmd = shift @ARGV; + + if ($cmd eq "--no-while") + { + $check_while = 0; + } + if ($cmd eq "--no-for") + { + $check_for = 0; + } + if ($cmd eq "--no-do") + { + $check_do = 0; + } + if ($cmd eq "--no-goto") + { + $check_goto = 0; + } +} + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if (($check_while == 1 && $line =~ /^\s*(while\s*\(.*)$/) || + ($check_for == 1 && $line =~ /^\s*(for\s*\(.*)$/) || + ($check_do == 1 && $line =~ /^\s*}\s*(while\s*\(.*)/) || + ($check_goto == 1 && $line =~ /\b(goto\b.*)/)) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_6/count_static_variables.c b/0x08-recursion/tests/task_6/count_static_variables.c new file mode 100644 index 00000000..c89f45e2 --- /dev/null +++ b/0x08-recursion/tests/task_6/count_static_variables.c @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if ($line =~ /^\s*\b(static\b.*)$/) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_6/main_0.c b/0x08-recursion/tests/task_6/main_0.c new file mode 100644 index 00000000..db7f9268 --- /dev/null +++ b/0x08-recursion/tests/task_6/main_0.c @@ -0,0 +1,17 @@ +#include + +int is_prime_number(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = is_prime_number(1); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_6/main_1.c b/0x08-recursion/tests/task_6/main_1.c new file mode 100644 index 00000000..3f4fa9e6 --- /dev/null +++ b/0x08-recursion/tests/task_6/main_1.c @@ -0,0 +1,17 @@ +#include + +int is_prime_number(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = is_prime_number(103); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_6/main_2.c b/0x08-recursion/tests/task_6/main_2.c new file mode 100644 index 00000000..6bd0ea0c --- /dev/null +++ b/0x08-recursion/tests/task_6/main_2.c @@ -0,0 +1,17 @@ +#include + +int is_prime_number(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = is_prime_number(-7); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_6/main_3.c b/0x08-recursion/tests/task_6/main_3.c new file mode 100644 index 00000000..70241d4c --- /dev/null +++ b/0x08-recursion/tests/task_6/main_3.c @@ -0,0 +1,17 @@ +#include + +int is_prime_number(int); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = is_prime_number(104729); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_7/count_loops.c b/0x08-recursion/tests/task_7/count_loops.c new file mode 100644 index 00000000..e3e4b804 --- /dev/null +++ b/0x08-recursion/tests/task_7/count_loops.c @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +use strict; + +my $check_while = 1; +my $check_for = 1; +my $check_do = 1; +my $check_goto = 1; + +while ($ARGV[0] =~ m/^-(.*)/) { + my $cmd = shift @ARGV; + + if ($cmd eq "--no-while") + { + $check_while = 0; + } + if ($cmd eq "--no-for") + { + $check_for = 0; + } + if ($cmd eq "--no-do") + { + $check_do = 0; + } + if ($cmd eq "--no-goto") + { + $check_goto = 0; + } +} + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if (($check_while == 1 && $line =~ /^\s*(while\s*\(.*)$/) || + ($check_for == 1 && $line =~ /^\s*(for\s*\(.*)$/) || + ($check_do == 1 && $line =~ /^\s*}\s*(while\s*\(.*)/) || + ($check_goto == 1 && $line =~ /\b(goto\b.*)/)) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_7/count_static_variables.c b/0x08-recursion/tests/task_7/count_static_variables.c new file mode 100644 index 00000000..c89f45e2 --- /dev/null +++ b/0x08-recursion/tests/task_7/count_static_variables.c @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if ($line =~ /^\s*\b(static\b.*)$/) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_7/main_0.c b/0x08-recursion/tests/task_7/main_0.c new file mode 100644 index 00000000..d3a7dca6 --- /dev/null +++ b/0x08-recursion/tests/task_7/main_0.c @@ -0,0 +1,17 @@ +#include + +int is_palindrome(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = is_palindrome("abcddcba"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_7/main_1.c b/0x08-recursion/tests/task_7/main_1.c new file mode 100644 index 00000000..9727be3e --- /dev/null +++ b/0x08-recursion/tests/task_7/main_1.c @@ -0,0 +1,17 @@ +#include + +int is_palindrome(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = is_palindrome("abcdcba"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_7/main_2.c b/0x08-recursion/tests/task_7/main_2.c new file mode 100644 index 00000000..ac689540 --- /dev/null +++ b/0x08-recursion/tests/task_7/main_2.c @@ -0,0 +1,17 @@ +#include + +int is_palindrome(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = is_palindrome("abcdecba"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_7/main_3.c b/0x08-recursion/tests/task_7/main_3.c new file mode 100644 index 00000000..a6c1dd8c --- /dev/null +++ b/0x08-recursion/tests/task_7/main_3.c @@ -0,0 +1,17 @@ +#include + +int is_palindrome(char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = is_palindrome("I guess I thought the dream-space would be all about the visual, but it's more about the feeling. My question is what happens when you start messing with the physics of it.ti fo scisyhp eht htiw gnissem trats uoy nehw sneppah tahw si noitseuq yM .gnileef eht tuoba erom s'ti tub ,lausiv eht tuoba lla eb dluow ecaps-maerd eht thguoht I sseug I"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/count_loops.c b/0x08-recursion/tests/task_8/count_loops.c new file mode 100644 index 00000000..e3e4b804 --- /dev/null +++ b/0x08-recursion/tests/task_8/count_loops.c @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +use strict; + +my $check_while = 1; +my $check_for = 1; +my $check_do = 1; +my $check_goto = 1; + +while ($ARGV[0] =~ m/^-(.*)/) { + my $cmd = shift @ARGV; + + if ($cmd eq "--no-while") + { + $check_while = 0; + } + if ($cmd eq "--no-for") + { + $check_for = 0; + } + if ($cmd eq "--no-do") + { + $check_do = 0; + } + if ($cmd eq "--no-goto") + { + $check_goto = 0; + } +} + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if (($check_while == 1 && $line =~ /^\s*(while\s*\(.*)$/) || + ($check_for == 1 && $line =~ /^\s*(for\s*\(.*)$/) || + ($check_do == 1 && $line =~ /^\s*}\s*(while\s*\(.*)/) || + ($check_goto == 1 && $line =~ /\b(goto\b.*)/)) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_8/count_static_variables.c b/0x08-recursion/tests/task_8/count_static_variables.c new file mode 100644 index 00000000..c89f45e2 --- /dev/null +++ b/0x08-recursion/tests/task_8/count_static_variables.c @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +sub process_file +{ + my ($file) = @_; + + if (!open(IN, '-|', "gcc -fpreprocessed -dD -E $file")) + { + print "Error: Cannot open file $file\n"; + return; + } + + my $i = 1; + while () + { + my $line = $_; + + if ($line =~ /^\s*\b(static\b.*)$/) + { + print "$i: $1\n"; + } + ++$i; + } +} + +foreach (@ARGV) +{ + process_file($_); +} diff --git a/0x08-recursion/tests/task_8/main_0.c b/0x08-recursion/tests/task_8/main_0.c new file mode 100644 index 00000000..2835600d --- /dev/null +++ b/0x08-recursion/tests/task_8/main_0.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school.c", "*.c"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_1.c b/0x08-recursion/tests/task_8/main_1.c new file mode 100644 index 00000000..9424e09b --- /dev/null +++ b/0x08-recursion/tests/task_8/main_1.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school.c", "*s*c*h*o*o*l*.*c*"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_10.c b/0x08-recursion/tests/task_8/main_10.c new file mode 100644 index 00000000..5e17cd23 --- /dev/null +++ b/0x08-recursion/tests/task_8/main_10.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school", "school*d"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_11.c b/0x08-recursion/tests/task_8/main_11.c new file mode 100644 index 00000000..ee561221 --- /dev/null +++ b/0x08-recursion/tests/task_8/main_11.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("def", "*e"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_12.c b/0x08-recursion/tests/task_8/main_12.c new file mode 100644 index 00000000..b7bb5082 --- /dev/null +++ b/0x08-recursion/tests/task_8/main_12.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("", "*"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_13.c b/0x08-recursion/tests/task_8/main_13.c new file mode 100644 index 00000000..91865eb1 --- /dev/null +++ b/0x08-recursion/tests/task_8/main_13.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("main.c", "ma*********************************************************d"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_2.c b/0x08-recursion/tests/task_8/main_2.c new file mode 100644 index 00000000..225b90be --- /dev/null +++ b/0x08-recursion/tests/task_8/main_2.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school.c", "school.c"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_3.c b/0x08-recursion/tests/task_8/main_3.c new file mode 100644 index 00000000..272ab470 --- /dev/null +++ b/0x08-recursion/tests/task_8/main_3.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school.c", "s*c"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_4.c b/0x08-recursion/tests/task_8/main_4.c new file mode 100644 index 00000000..472cc8c1 --- /dev/null +++ b/0x08-recursion/tests/task_8/main_4.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school.c", "sch********************************c"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_5.c b/0x08-recursion/tests/task_8/main_5.c new file mode 100644 index 00000000..ec098f5b --- /dev/null +++ b/0x08-recursion/tests/task_8/main_5.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school.c", "*"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_6.c b/0x08-recursion/tests/task_8/main_6.c new file mode 100644 index 00000000..28e2c743 --- /dev/null +++ b/0x08-recursion/tests/task_8/main_6.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school.c", "***"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_7.c b/0x08-recursion/tests/task_8/main_7.c new file mode 100644 index 00000000..bbbe1ed8 --- /dev/null +++ b/0x08-recursion/tests/task_8/main_7.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school.c", "s.*c"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_8.c b/0x08-recursion/tests/task_8/main_8.c new file mode 100644 index 00000000..2aed607f --- /dev/null +++ b/0x08-recursion/tests/task_8/main_8.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school.c", "**.*c"); + printf("%d\n", r); + return (0); +} diff --git a/0x08-recursion/tests/task_8/main_9.c b/0x08-recursion/tests/task_8/main_9.c new file mode 100644 index 00000000..c700ba34 --- /dev/null +++ b/0x08-recursion/tests/task_8/main_9.c @@ -0,0 +1,17 @@ +#include + +int wildcmp(char *, char *); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + int r; + + r = wildcmp("school-school.c", "sch*ool.c"); + printf("%d\n", r); + return (0); +} diff --git a/0x09-static_libraries/tests/task_0/main.c b/0x09-static_libraries/tests/task_0/main.c new file mode 100644 index 00000000..8bb4ef41 --- /dev/null +++ b/0x09-static_libraries/tests/task_0/main.c @@ -0,0 +1,11 @@ +#include "main.h" + +/** + * main - Entry point + * + * Return: Always 0 + */ +int main(void) +{ + return (0); +} diff --git a/0x09-static_libraries/tests/task_1/source_0.c b/0x09-static_libraries/tests/task_1/source_0.c new file mode 100644 index 00000000..8a739cb9 --- /dev/null +++ b/0x09-static_libraries/tests/task_1/source_0.c @@ -0,0 +1,8 @@ +/** + * source_0 - Source 0 + * Return: Always 0 + */ +int source_0(void) +{ + return (0); +} diff --git a/0x09-static_libraries/tests/task_1/source_1.c b/0x09-static_libraries/tests/task_1/source_1.c new file mode 100644 index 00000000..1578b56a --- /dev/null +++ b/0x09-static_libraries/tests/task_1/source_1.c @@ -0,0 +1,8 @@ +/** + * source_1 - Source 1 + * Return: Always 0 + */ +int source_1(void) +{ + return (0); +} diff --git a/0x09-static_libraries/tests/task_1/source_2.c b/0x09-static_libraries/tests/task_1/source_2.c new file mode 100644 index 00000000..677433ee --- /dev/null +++ b/0x09-static_libraries/tests/task_1/source_2.c @@ -0,0 +1,8 @@ +/** + * source_2 - Source 2 + * Return: Always 0 + */ +int source_2(void) +{ + return (0); +} diff --git a/0x0B-malloc_free/tests/task_0/main_0.c b/0x0B-malloc_free/tests/task_0/main_0.c new file mode 100644 index 00000000..b825f2ef --- /dev/null +++ b/0x0B-malloc_free/tests/task_0/main_0.c @@ -0,0 +1,54 @@ +#include +#include + +char *create_array(unsigned int, char); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *buffer; + unsigned int size; + + size = 72; + buffer = create_array(size, 'S'); + if (buffer == NULL) + { + printf("failed to allocate memory\n"); + return (1); + } + simple_print_buffer(buffer, size); + free(buffer); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_0/main_1.c b/0x0B-malloc_free/tests/task_0/main_1.c new file mode 100644 index 00000000..0591afcf --- /dev/null +++ b/0x0B-malloc_free/tests/task_0/main_1.c @@ -0,0 +1,54 @@ +#include +#include + +char *create_array(unsigned int, char); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *buffer; + unsigned int size; + + size = 102; + buffer = create_array(size, 10); + if (buffer == NULL) + { + printf("failed to allocate memory\n"); + return (1); + } + simple_print_buffer(buffer, size); + free(buffer); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_0/main_2.c b/0x0B-malloc_free/tests/task_0/main_2.c new file mode 100644 index 00000000..fc494750 --- /dev/null +++ b/0x0B-malloc_free/tests/task_0/main_2.c @@ -0,0 +1,54 @@ +#include +#include + +char *create_array(unsigned int, char); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *buffer; + unsigned int size; + + size = 96; + buffer = create_array(size, '\0'); + if (buffer == NULL) + { + printf("failed to allocate memory\n"); + return (1); + } + simple_print_buffer(buffer, size); + free(buffer); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_0/main_3.c b/0x0B-malloc_free/tests/task_0/main_3.c new file mode 100644 index 00000000..84d4de2e --- /dev/null +++ b/0x0B-malloc_free/tests/task_0/main_3.c @@ -0,0 +1,25 @@ +#include +#include + +char *create_array(unsigned int, char); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *buffer; + unsigned int size; + + size = 0; + buffer = create_array(size, 'H'); + if (buffer == NULL) + { + printf("failed to allocate memory\n"); + return (1); + } + free(buffer); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_1/main_0.c b/0x0B-malloc_free/tests/task_1/main_0.c new file mode 100644 index 00000000..67160ccb --- /dev/null +++ b/0x0B-malloc_free/tests/task_1/main_0.c @@ -0,0 +1,24 @@ +#include +#include + +char *_strdup(char *str); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = _strdup("Best School!"); + if (s == NULL) + { + printf("failed to allocate memory\n"); + return (1); + } + printf("%s\n", s); + free(s); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_1/main_1.c b/0x0B-malloc_free/tests/task_1/main_1.c new file mode 100644 index 00000000..7bc13e8e --- /dev/null +++ b/0x0B-malloc_free/tests/task_1/main_1.c @@ -0,0 +1,24 @@ +#include +#include + +char *_strdup(char *str); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = _strdup(""); + if (s == NULL) + { + printf("failed to allocate memory\n"); + return (1); + } + printf("%s\n", s); + free(s); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_1/main_2.c b/0x0B-malloc_free/tests/task_1/main_2.c new file mode 100644 index 00000000..e0b27cd9 --- /dev/null +++ b/0x0B-malloc_free/tests/task_1/main_2.c @@ -0,0 +1,24 @@ +#include +#include + +char *_strdup(char *str); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = _strdup("First, solve the problem. Then, write the code."); + if (s == NULL) + { + printf("failed to allocate memory\n"); + return (1); + } + printf("%s\n", s); + free(s); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_1/main_3.c b/0x0B-malloc_free/tests/task_1/main_3.c new file mode 100644 index 00000000..2a330960 --- /dev/null +++ b/0x0B-malloc_free/tests/task_1/main_3.c @@ -0,0 +1,23 @@ +#include +#include + +char *_strdup(char *str); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = _strdup(NULL); + if (s == NULL) + { + printf("failed to allocate memory\n"); + return (1); + } + free(s); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_2/main_0.c b/0x0B-malloc_free/tests/task_2/main_0.c new file mode 100644 index 00000000..24e72de5 --- /dev/null +++ b/0x0B-malloc_free/tests/task_2/main_0.c @@ -0,0 +1,24 @@ +#include +#include + +char *str_concat(char *, char *); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = str_concat("Best ", "School"); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_2/main_1.c b/0x0B-malloc_free/tests/task_2/main_1.c new file mode 100644 index 00000000..2c831b6b --- /dev/null +++ b/0x0B-malloc_free/tests/task_2/main_1.c @@ -0,0 +1,24 @@ +#include +#include + +char *str_concat(char *, char *); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = str_concat("", "Hello"); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_2/main_2.c b/0x0B-malloc_free/tests/task_2/main_2.c new file mode 100644 index 00000000..d24bf513 --- /dev/null +++ b/0x0B-malloc_free/tests/task_2/main_2.c @@ -0,0 +1,24 @@ +#include +#include + +char *str_concat(char *, char *); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = str_concat("Hello", ""); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_2/main_3.c b/0x0B-malloc_free/tests/task_2/main_3.c new file mode 100644 index 00000000..a51e39c1 --- /dev/null +++ b/0x0B-malloc_free/tests/task_2/main_3.c @@ -0,0 +1,43 @@ +#include +#include + +char *str_concat(char *, char *); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = str_concat("Hello", NULL); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + + s = str_concat(NULL, "Hello"); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + + s = str_concat(NULL, NULL); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + + return (0); +} diff --git a/0x0B-malloc_free/tests/task_3/main_0.c b/0x0B-malloc_free/tests/task_3/main_0.c new file mode 100644 index 00000000..fcea64cb --- /dev/null +++ b/0x0B-malloc_free/tests/task_3/main_0.c @@ -0,0 +1,57 @@ +#include +#include + +int **alloc_grid(int, int); + +/** + * print_grid - prints a grid of integers + * @grid: the address of the two dimensional grid + * @width: width of the grid + * @height: height of the grid + * + * Return: Nothing. + */ +void print_grid(int **grid, int width, int height) +{ + int w; + int h; + + h = 0; + while (h < height) + { + w = 0; + while (w < width) + { + printf("%d ", grid[h][w]); + w++; + } + printf("\n"); + h++; + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int **grid; + int h; + int w; + + h = 32; + w = 48; + grid = alloc_grid(w, h); + if (grid == NULL) + { + return (1); + } + print_grid(grid, w, h); + printf("\n"); + grid[23][14] = 98; + grid[19][43] = 402; + print_grid(grid, w, h); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_3/main_1.c b/0x0B-malloc_free/tests/task_3/main_1.c new file mode 100644 index 00000000..2df8508d --- /dev/null +++ b/0x0B-malloc_free/tests/task_3/main_1.c @@ -0,0 +1,57 @@ +#include +#include + +int **alloc_grid(int, int); + +/** + * print_grid - prints a grid of integers + * @grid: the address of the two dimensional grid + * @width: width of the grid + * @height: height of the grid + * + * Return: Nothing. + */ +void print_grid(int **grid, int width, int height) +{ + int w; + int h; + + h = 0; + while (h < height) + { + w = 0; + while (w < width) + { + printf("%d ", grid[h][w]); + w++; + } + printf("\n"); + h++; + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int **grid; + int h; + int w; + + h = 128; + w = 128; + grid = alloc_grid(h, w); + if (grid == NULL) + { + return (1); + } + print_grid(grid, h, w); + printf("\n"); + grid[23][14] = 98; + grid[19][43] = 402; + print_grid(grid, h, w); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_3/main_2.c b/0x0B-malloc_free/tests/task_3/main_2.c new file mode 100644 index 00000000..089226d2 --- /dev/null +++ b/0x0B-malloc_free/tests/task_3/main_2.c @@ -0,0 +1,54 @@ +#include +#include + +int **alloc_grid(int, int); + +/** + * print_grid - prints a grid of integers + * @grid: the address of the two dimensional grid + * @width: width of the grid + * @height: height of the grid + * + * Return: Nothing. + */ +void print_grid(int **grid, int width, int height) +{ + int w; + int h; + + h = 0; + while (h < height) + { + w = 0; + while (w < width) + { + printf("%d ", grid[h][w]); + w++; + } + printf("\n"); + h++; + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int **grid; + int h; + int w; + + h = 0; + w = 0; + grid = alloc_grid(h, w); + if (grid == NULL) + { + return (1); + } + print_grid(grid, h, w); + printf("\n"); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_3/main_3.c b/0x0B-malloc_free/tests/task_3/main_3.c new file mode 100644 index 00000000..652c8614 --- /dev/null +++ b/0x0B-malloc_free/tests/task_3/main_3.c @@ -0,0 +1,55 @@ +#include +#include + +int **alloc_grid(int, int); + +/** + * print_grid - prints a grid of integers + * @grid: the address of the two dimensional grid + * @width: width of the grid + * @height: height of the grid + * + * Return: Nothing. + */ +void print_grid(int **grid, int width, int height) +{ + int w; + int h; + + h = 0; + while (h < height) + { + w = 0; + while (w < width) + { + printf("%d ", grid[h][w]); + w++; + } + printf("\n"); + h++; + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int **grid; + int h; + int w; + + h = 20; + w = 20; + grid = alloc_grid(h, w); + if (grid == NULL) + { + return (1); + } + print_grid(grid, h, w); + printf("\n"); + free(grid); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_4/main_0.c b/0x0B-malloc_free/tests/task_4/main_0.c new file mode 100644 index 00000000..f395e627 --- /dev/null +++ b/0x0B-malloc_free/tests/task_4/main_0.c @@ -0,0 +1,27 @@ +#include +#include + +int **alloc_grid(int, int); +void free_grid(int **, int); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int **grid; + int h; + int w; + + h = 10; + w = 20; + grid = alloc_grid(w, h); + if (grid == NULL) + { + return (1); + } + free_grid(grid, h); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_4/main_1.c b/0x0B-malloc_free/tests/task_4/main_1.c new file mode 100644 index 00000000..2038489f --- /dev/null +++ b/0x0B-malloc_free/tests/task_4/main_1.c @@ -0,0 +1,27 @@ +#include +#include + +int **alloc_grid(int, int); +void free_grid(int **, int); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int **grid; + int h; + int w; + + h = 100; + w = 200; + grid = alloc_grid(w, h); + if (grid == NULL) + { + return (1); + } + free_grid(grid, h); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_4/main_2.c b/0x0B-malloc_free/tests/task_4/main_2.c new file mode 100644 index 00000000..1c8dcb7b --- /dev/null +++ b/0x0B-malloc_free/tests/task_4/main_2.c @@ -0,0 +1,27 @@ +#include +#include + +int **alloc_grid(int, int); +void free_grid(int **, int); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int **grid; + int h; + int w; + + h = 1; + w = 1; + grid = alloc_grid(w, h); + if (grid == NULL) + { + return (1); + } + free_grid(grid, h); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_4/main_3.c b/0x0B-malloc_free/tests/task_4/main_3.c new file mode 100644 index 00000000..05ad4b80 --- /dev/null +++ b/0x0B-malloc_free/tests/task_4/main_3.c @@ -0,0 +1,16 @@ +#include +#include + +void free_grid(int **, int); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + free_grid(NULL, 0); + printf("OK\n"); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_5/main_0.c b/0x0B-malloc_free/tests/task_5/main_0.c new file mode 100644 index 00000000..32caabb0 --- /dev/null +++ b/0x0B-malloc_free/tests/task_5/main_0.c @@ -0,0 +1,23 @@ +#include +#include + +char *argstostr(int, char **); + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(int ac, char *av[]) +{ + char *s; + + s = argstostr(ac, av); + if (s == NULL) + { + return (1); + } + printf("%s", s); + free(s); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_5/main_3.c b/0x0B-malloc_free/tests/task_5/main_3.c new file mode 100644 index 00000000..598f74ca --- /dev/null +++ b/0x0B-malloc_free/tests/task_5/main_3.c @@ -0,0 +1,24 @@ +#include +#include + +char *argstostr(int, char **); + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = argstostr(0, NULL); + if (s == NULL) + { + printf("Failed\n"); + return (1); + } + printf("%s", s); + free(s); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_6/main_0.c b/0x0B-malloc_free/tests/task_6/main_0.c new file mode 100644 index 00000000..ee482acb --- /dev/null +++ b/0x0B-malloc_free/tests/task_6/main_0.c @@ -0,0 +1,38 @@ +#include +#include + +char **strtow(char *); + +/** + * print_tab - Prints an array of string + * + * @tab: The array to print + */ +void print_tab(char **tab) +{ + int i; + + for (i = 0; tab[i] != NULL; ++i) + { + printf("%s\n", tab[i]); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char **tab; + + tab = strtow("Talk is cheap. Show me the code."); + if (tab == NULL) + { + printf("Failed\n"); + return (1); + } + print_tab(tab); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_6/main_1.c b/0x0B-malloc_free/tests/task_6/main_1.c new file mode 100644 index 00000000..a947027f --- /dev/null +++ b/0x0B-malloc_free/tests/task_6/main_1.c @@ -0,0 +1,38 @@ +#include +#include + +char **strtow(char *); + +/** + * print_tab - Prints an array of string + * + * @tab: The array to print + */ +void print_tab(char **tab) +{ + int i; + + for (i = 0; tab[i] != NULL; ++i) + { + printf("%s\n", tab[i]); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char **tab; + + tab = strtow(" Talk is cheap. Show me the code. "); + if (tab == NULL) + { + printf("Failed\n"); + return (1); + } + print_tab(tab); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_6/main_2.c b/0x0B-malloc_free/tests/task_6/main_2.c new file mode 100644 index 00000000..85afe5f2 --- /dev/null +++ b/0x0B-malloc_free/tests/task_6/main_2.c @@ -0,0 +1,38 @@ +#include +#include + +char **strtow(char *); + +/** + * print_tab - Prints an array of string + * + * @tab: The array to print + */ +void print_tab(char **tab) +{ + int i; + + for (i = 0; tab[i] != NULL; ++i) + { + printf("%s\n", tab[i]); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char **tab; + + tab = strtow(" !@#$^&*(())_Talk ><><.., ][{} 76478 is ~~ cheap :) . Show #$45&*(45 me 873589 the |[]{} -_=+ code.^& "); + if (tab == NULL) + { + printf("Failed\n"); + return (1); + } + print_tab(tab); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_6/main_3.c b/0x0B-malloc_free/tests/task_6/main_3.c new file mode 100644 index 00000000..2770cd4f --- /dev/null +++ b/0x0B-malloc_free/tests/task_6/main_3.c @@ -0,0 +1,38 @@ +#include +#include + +char **strtow(char *); + +/** + * print_tab - Prints an array of string + * + * @tab: The array to print + */ +void print_tab(char **tab) +{ + int i; + + for (i = 0; tab[i] != NULL; ++i) + { + printf("%s\n", tab[i]); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char **tab; + + tab = strtow(" "); + if (tab == NULL) + { + printf("Failed\n"); + return (1); + } + print_tab(tab); + return (0); +} diff --git a/0x0B-malloc_free/tests/task_6/main_4.c b/0x0B-malloc_free/tests/task_6/main_4.c new file mode 100644 index 00000000..60a5d0a5 --- /dev/null +++ b/0x0B-malloc_free/tests/task_6/main_4.c @@ -0,0 +1,38 @@ +#include +#include + +char **strtow(char *); + +/** + * print_tab - Prints an array of string + * + * @tab: The array to print + */ +void print_tab(char **tab) +{ + int i; + + for (i = 0; tab[i] != NULL; ++i) + { + printf("%s\n", tab[i]); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char **tab; + + tab = strtow(""); + if (tab == NULL) + { + printf("Failed\n"); + return (1); + } + print_tab(tab); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_0/main_0.c b/0x0C-more_malloc_free/tests/task_0/main_0.c new file mode 100644 index 00000000..6c3674a9 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_0/main_0.c @@ -0,0 +1,19 @@ +#include +#include +#include + +void *malloc_checked(unsigned int); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + void *p; + + p = malloc_checked(sizeof(char) * 1024); + printf("%p\n", p); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_0/main_1.c b/0x0C-more_malloc_free/tests/task_0/main_1.c new file mode 100644 index 00000000..6c3674a9 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_0/main_1.c @@ -0,0 +1,19 @@ +#include +#include +#include + +void *malloc_checked(unsigned int); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + void *p; + + p = malloc_checked(sizeof(char) * 1024); + printf("%p\n", p); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_0/main_2.c b/0x0C-more_malloc_free/tests/task_0/main_2.c new file mode 100644 index 00000000..b6ed8723 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_0/main_2.c @@ -0,0 +1,18 @@ +#include "main.h" +#include +#include +#include + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *c; + + c = malloc_checked(sizeof(char) * 1024); + free(c); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_1/main_0.c b/0x0C-more_malloc_free/tests/task_1/main_0.c new file mode 100644 index 00000000..e252de53 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_1/main_0.c @@ -0,0 +1,24 @@ +#include +#include + +char *string_nconcat(char *, char *, unsigned int); + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = string_nconcat("Best ", "School", 4); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_1/main_1.c b/0x0C-more_malloc_free/tests/task_1/main_1.c new file mode 100644 index 00000000..36fff45e --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_1/main_1.c @@ -0,0 +1,24 @@ +#include +#include + +char *string_nconcat(char *, char *, unsigned int); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = string_nconcat("", "Hello", 12); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_1/main_2.c b/0x0C-more_malloc_free/tests/task_1/main_2.c new file mode 100644 index 00000000..116265ab --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_1/main_2.c @@ -0,0 +1,24 @@ +#include +#include + +char *string_nconcat(char *, char *, unsigned int); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = string_nconcat("Hello", "", 12); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_1/main_3.c b/0x0C-more_malloc_free/tests/task_1/main_3.c new file mode 100644 index 00000000..ecf2a001 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_1/main_3.c @@ -0,0 +1,42 @@ +#include +#include + +char *string_nconcat(char *, char *, unsigned int); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *s; + + s = string_nconcat("Hello", NULL, 12); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + + s = string_nconcat(NULL, "Hello", 0); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + + s = string_nconcat(NULL, NULL, 10); + if (s == NULL) + { + printf("failed\n"); + return (1); + } + printf("%s\n", s); + free(s); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_2/main_0.c b/0x0C-more_malloc_free/tests/task_2/main_0.c new file mode 100644 index 00000000..75af282e --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_2/main_0.c @@ -0,0 +1,58 @@ +#include +#include +#include + +void *_calloc(unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *a; + unsigned int nmemb; + unsigned int i; + + nmemb = 402; + a = _calloc(nmemb, sizeof(*a)); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + for (i = 0; i < nmemb; ++i) + a[i] = 98; + simple_print_buffer(a, nmemb); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_2/main_1.c b/0x0C-more_malloc_free/tests/task_2/main_1.c new file mode 100644 index 00000000..79f2d205 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_2/main_1.c @@ -0,0 +1,58 @@ +#include +#include +#include + +void *_calloc(unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(int *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int *a; + unsigned int nmemb; + unsigned int i; + + nmemb = 0; + a = _calloc(nmemb, sizeof(*a)); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + for (i = 0; i < nmemb; ++i) + a[i] = 98; + simple_print_buffer(a, nmemb); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_2/main_2.c b/0x0C-more_malloc_free/tests/task_2/main_2.c new file mode 100644 index 00000000..e0413944 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_2/main_2.c @@ -0,0 +1,58 @@ +#include +#include +#include + +void *_calloc(unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *a; + unsigned int nmemb; + unsigned int i; + + nmemb = 100; + a = _calloc(nmemb, 0); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + for (i = 0; i < nmemb; ++i) + a[i] = 98; + simple_print_buffer(a, nmemb); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_2/main_3.c b/0x0C-more_malloc_free/tests/task_2/main_3.c new file mode 100644 index 00000000..86e421e3 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_2/main_3.c @@ -0,0 +1,58 @@ +#include +#include +#include + +void *_calloc(unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(int *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int *a; + unsigned int nmemb; + unsigned int i; + + nmemb = 50; + a = _calloc(nmemb, sizeof(*a)); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + for (i = 0; i < nmemb; ++i) + a[i] = 98; + simple_print_buffer(a, nmemb); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_2/main_4.c b/0x0C-more_malloc_free/tests/task_2/main_4.c new file mode 100644 index 00000000..6c38111f --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_2/main_4.c @@ -0,0 +1,55 @@ +#include +#include +#include + +void *_calloc(unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(int *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int *a; + unsigned int nmemb; + + nmemb = 50; + a = _calloc(nmemb, sizeof(*a)); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + simple_print_buffer(a, nmemb); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_3/main_0.c b/0x0C-more_malloc_free/tests/task_3/main_0.c new file mode 100644 index 00000000..b4c53993 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_3/main_0.c @@ -0,0 +1,53 @@ +#include +#include +#include + +int *array_range(int, int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(int *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int *a; + + a = array_range(0, 98); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + simple_print_buffer(a, 98); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_3/main_1.c b/0x0C-more_malloc_free/tests/task_3/main_1.c new file mode 100644 index 00000000..e90df1a8 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_3/main_1.c @@ -0,0 +1,53 @@ +#include +#include +#include + +int *array_range(int, int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(int *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int *a; + + a = array_range(1024, 2048); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + simple_print_buffer(a, 1024); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_3/main_2.c b/0x0C-more_malloc_free/tests/task_3/main_2.c new file mode 100644 index 00000000..a2665eed --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_3/main_2.c @@ -0,0 +1,53 @@ +#include +#include +#include + +int *array_range(int, int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(int *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int *a; + + a = array_range(4096, 4096); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + simple_print_buffer(a, 1); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_3/main_3.c b/0x0C-more_malloc_free/tests/task_3/main_3.c new file mode 100644 index 00000000..c83e5e17 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_3/main_3.c @@ -0,0 +1,53 @@ +#include +#include +#include + +int *array_range(int, int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(int *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int *a; + + a = array_range(4096, 4000); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + simple_print_buffer(a, 1); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_3/main_4.c b/0x0C-more_malloc_free/tests/task_3/main_4.c new file mode 100644 index 00000000..da5d2de7 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_3/main_4.c @@ -0,0 +1,53 @@ +#include +#include +#include + +int *array_range(int, int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(int *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int *a; + + a = array_range(-512, 512); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + simple_print_buffer(a, 1024); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_3/main_5.c b/0x0C-more_malloc_free/tests/task_3/main_5.c new file mode 100644 index 00000000..43d5798c --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_3/main_5.c @@ -0,0 +1,53 @@ +#include +#include +#include + +int *array_range(int, int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(int *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int *a; + + a = array_range(-2048, -1024); + if (a == NULL) + { + printf("Failed\n"); + return (1); + } + simple_print_buffer(a, 1024); + free(a); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_4/main_0.c b/0x0C-more_malloc_free/tests/task_4/main_0.c new file mode 100644 index 00000000..cdba9826 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_4/main_0.c @@ -0,0 +1,62 @@ +#include +#include +#include + +void *_realloc(void *, unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *p; + unsigned int i; + unsigned int new_size; + + new_size = 120; + p = malloc(sizeof(char) * 30); + p = _realloc(p, sizeof(char) * 30, sizeof(char) * new_size); + if (p == NULL) + { + printf("Failed\n"); + return (1); + } + i = 0; + while (i < new_size) + { + p[i++] = 98; + } + simple_print_buffer(p, new_size); + free(p); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_4/main_1.c b/0x0C-more_malloc_free/tests/task_4/main_1.c new file mode 100644 index 00000000..d9ecc400 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_4/main_1.c @@ -0,0 +1,61 @@ +#include +#include +#include + +void *_realloc(void *, unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *p; + unsigned int i; + unsigned int new_size; + + new_size = 120; + p = _realloc(NULL, sizeof(char) * 30, sizeof(char) * new_size); + if (p == NULL) + { + printf("Failed\n"); + return (1); + } + i = 0; + while (i < new_size) + { + p[i++] = 98; + } + simple_print_buffer(p, new_size); + free(p); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_4/main_2.c b/0x0C-more_malloc_free/tests/task_4/main_2.c new file mode 100644 index 00000000..1d5baf30 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_4/main_2.c @@ -0,0 +1,63 @@ +#include +#include +#include + +void *_realloc(void *, unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *p; + char *new_p; + unsigned int i; + unsigned int new_size; + + new_size = 30; + p = malloc(sizeof(char) * 30); + new_p = _realloc(p, sizeof(char) * 30, sizeof(char) * new_size); + if (p == NULL || new_p != p) + { + printf("Failed\n"); + return (1); + } + i = 0; + while (i < new_size) + { + p[i++] = 98; + } + simple_print_buffer(p, new_size); + free(p); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_4/main_3.c b/0x0C-more_malloc_free/tests/task_4/main_3.c new file mode 100644 index 00000000..cfb28806 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_4/main_3.c @@ -0,0 +1,62 @@ +#include +#include +#include + +void *_realloc(void *, unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *p; + unsigned int i; + unsigned int new_size; + + new_size = 0; + p = malloc(sizeof(char) * 30); + p = _realloc(p, sizeof(char) * 30, sizeof(char) * new_size); + if (p == NULL) + { + printf("Failed\n"); + return (1); + } + i = 0; + while (i < new_size) + { + p[i++] = 98; + } + simple_print_buffer(p, new_size); + free(p); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_4/main_4.c b/0x0C-more_malloc_free/tests/task_4/main_4.c new file mode 100644 index 00000000..af9dafb3 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_4/main_4.c @@ -0,0 +1,61 @@ +#include +#include +#include + +void *_realloc(void *, unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *p; + unsigned int i; + unsigned int new_size; + + new_size = 0; + p = _realloc(NULL, sizeof(char) * 30, sizeof(char) * new_size); + if (p == NULL) + { + printf("Failed\n"); + return (1); + } + i = 0; + while (i < new_size) + { + p[i++] = 98; + } + simple_print_buffer(p, new_size); + free(p); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_4/main_5.c b/0x0C-more_malloc_free/tests/task_4/main_5.c new file mode 100644 index 00000000..41bcbf4d --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_4/main_5.c @@ -0,0 +1,62 @@ +#include +#include +#include + +void *_realloc(void *, unsigned int, unsigned int); + +/** + * simple_print_buffer - prints buffer in hexa + * @buffer: the address of memory to print + * @size: the size of the memory to print + * + * Return: Nothing. + */ +void simple_print_buffer(char *buffer, unsigned int size) +{ + unsigned int i; + + i = 0; + while (i < size) + { + if (i % 10) + { + printf(" "); + } + if (!(i % 10) && i) + { + printf("\n"); + } + printf("0x%02x", buffer[i]); + i++; + } + printf("\n"); +} + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + char *p; + unsigned int i; + unsigned int new_size; + + new_size = 20; + p = malloc(sizeof(char) * 30); + p = _realloc(NULL, sizeof(char) * 30, sizeof(char) * new_size); + if (p == NULL) + { + printf("Failed\n"); + return (1); + } + i = 0; + while (i < new_size) + { + p[i++] = 98; + } + simple_print_buffer(p, new_size); + free(p); + return (0); +} diff --git a/0x0C-more_malloc_free/tests/task_5/launch_101-mul.c b/0x0C-more_malloc_free/tests/task_5/launch_101-mul.c new file mode 100644 index 00000000..93fad972 --- /dev/null +++ b/0x0C-more_malloc_free/tests/task_5/launch_101-mul.c @@ -0,0 +1,44 @@ +#!/bin/bash + +if [ "$#" -ne 1 ]; then + echo -e "Usage: $0 test\n" + exit 1 +fi + +if [ "$1" -eq 0 ]; then + ./101-mul 879562389745629837645928736459827364589723645928376450918253904652961097643178506348765017836457836328745389562378644360875603784568213761509832651047846758123875473865178346517365078647834563204756103784651783465087356372846523784562783946597834657382657823657829346528379465237845629734569234601923741283741283741289347019832457435637845637846507164127041892734129837401298347298471209837401298374019837453456237845692378465378465723846527834567834562378465728365297341720341289374129873491827489207412572738956237856237846523746502346513964096341098247017234120839471928374012983740192837419287476547856738465071834651736457384065376502735783476589101101010160537654783658736578234652783645238765823746501652650265510784651783658736589356238759623786537284562375627398652378465237894563728465239784652378465237456378426527839652379856237485 107365783456378653724535923745627386523876587346507346523074651078638016106101607061650163785637856298375639857637845629837465378456346537846523768523745625032020193377373547982576895342768953426734256785423678453267854326785423678534267854327869253678526756795794795959595198129154985148915498015491534893458918971782934789437894327890312478901246795467576853247695432795789780291278978941237890423178942317894231784231789423178904127952347653247698534276895342678534672769543675437962534679532476765834278693452786543278653427866798534769534279452378947894217897148923789342798412379841237894379803421798014237981243797981423798427524376852347685423678534267852346785342678524367843526782543678542367543267845326785234678954237694797894527894789547895437894127890451278901257890127891524789014078954109567273465387465973426537465982748970127908287904231798042317890423789043278904231789042317890421379804123789041237980412678524378653678534267894523678953426795234967597652347953794879580347980253478905347894 + echo "$?" + exit 0 +fi + +if [ "$1" -eq 1 ]; then + ./101-mul 87956238974562983764592873645982736458972364592837645091825390465296109764317850634876501783645783632874538956237864436087560378456821376150983265104784675812387547386517834651736507864783456320475610378465178346508735637284652378456278394659783465738265782365782934652837946523784562973456923460192374128374128374128934701983245743563784563784650716412704189273412983740129834729847120983740129837401983745345623784569237846537846572384652783456783456237846572836529734172034128937412987349182748920741257273895623785623784652374650234651396409634109824701723412083947192837401298374019283741928747654785673846507183465173645738406537650273578347658910110101016053765478365873657823465278364523876582374650165265026551078465178365873658935623875962378653728456237562739865237846523789456372846523978465237846f237456378426527839652379856237485 1073657834563786537245359237456273865238765873465073465230746510786380161061016070616501637856378562983756398576378456298374653784563465378465237685237456250320201933773735479825768953427689534267342567854236784532678543267854236785342678543278692536785267567957947959595951981291549851489154980154915348934589189717829347894378943278903124789012467954675768532476954327957897802912789789412378904231789423178942317842317894231789041279523476532476985342768953426785346727695436754379625346795324767658342786934527865432786534278667985347695342794523789478942178971489237893427984123798412378943798034217980142379812437979814237984275243768523476854236785342678523467853426785243678435267825436785423675432678453267852346789542376947978945278947895478954378941278904512789f1257890127891524789014078954109567273465387465973426537465982748970127908287904231798042317890423789043278904231789042317890421379804123789041237980412678524378653678534267894523678953426795234967597652347953794879580347980253478905347894 + echo "$?" + exit 0 +fi + +if [ "$1" -eq 2 ]; then + ./101-mul 2176541264 + echo "$?" + ./101-mul + echo "$?" + ./101-mul 7642846 79826349728634 9726437986234 + echo "$?" + exit 0 +fi + +if [ "$1" -eq 3 ]; then + ./101-mul 385687236458723645827364578236587263458726345872364578626345786 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + echo "$?" + ./101-mul 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 385687236458723645827364578236587263458726345872364578626345786 + echo "$?" + ./101-mul 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + echo "$?" + exit 0 +fi + +if [ "$1" -eq 4 ]; then + ./101-mul 107345678389237198302740198754621073456783892371983027401987546297836452376560196472089374108237489274098123749108274189023470192834703256937842562378465247365928034712893741289047120984731894718903274891723409871283941230984712893471283947128394701764517465739845637456374562347086567342675483467124672013891270347819023478902674536745376852678953867943526879534278695234678935247869235467892534687234568795439797801971802497801243978041237980431278904123897024317890124378904132708914279416436546842516867814567894156794516794537965437954379514787897890412578904512978041527890541278905417809345789025379656752679856789567985436979457794279405197054945179801453708954378957389789179651937459127412974687912678915467854316798145769145679145679134578951478904217890412378904123789041237890124378901423789014327890143279641236789143268412367891423679412378905421708253478903257890532478905342679842156789123479697809783645237656019647208937410823748927409812374910827418902347019283470325693784256237846524736592803471289374128904712098473189471890327489172340987128394123098471289347128394712839470176451746573984563745637456234708656734267548346712467201389127034781902347890267453674537685267895386794352687953427869523467893524786923546789253468723456879543979780197180249780124397804123798043127890412389702431789012437890413270891427941643654684251686781456789415679451679453796543795437951478789789041257890451297804152789054127890541780934578902537965675267985678956798543697945779427940519705494517980145370895437895738978917965193745912741297468791267891546785431679814576914567914567913457895147890421789041237890412378904123789012437890142378901432789014327964123678914326841236789142367941237890542170825347890325789053247890534267984215678912347969780107345678389237198302740198754629783645237656019647208937410823748927409812374910827418902347019283470325693784256237846524736592803471289374128904712098473189471890327489172340987128394123098471289347128394712839470176451746573984563745637456234708656734267548346712467201389127034781902347890267453674537685267895386794352687953427869523467893524786923546789253468723456879543979780197180249780124397804123798043127890412389702431789012437890413270891427941643654684251686781456789415679451679453796543795437951478789789041257890451297804152789054127890541780934578902537965675267985678956798543697945779427940519705494517980145370895437895738978917965193745912741297468791267891546785431679814576914567914567913457895147890421789041237890412378904123789012437890142378901432789014327964123678914326841236789142367941237890542170825347890325789053247890534267984215678912347969780 107345678389237198302740198754629783645237656019647208937410823748927409812374910827418902347019283470325693784256237846524736592803471289374128904712098473189471890327489172340987128394123098471289347128394712839470176451746573984563745637456234708656734267548346712467201389127034781902347890267453674537685267895386794352687953427869523467893524786923546789253468723456879543979780197180249780124397804123798043127890412389702431789012437890413270891427941643654684251686781456789415679451679453796543795437951478789789041257890451297804152789054127890541780934578902537965675267985678956798543697945779427940519705494517980145370895437895738978917965193745912741297468791267891546785431679814576914567914567913457895147890421789041237890412378904123789012437890142378901432789014327964123678914326841236789142367941237890542170825347890325789053247890534267984215678912347969780107345678389237198302740198754629783645237656019647208937410823748927409812374910827418902347019283470325693784256237846524736592803471289374128904712098473189471890327489172340987128394123098471289347128394712839470176451746573984563745637456234708656710734567838923719830274019875462978364523765601964720893741082374892740981237491082741890234701928347032569378425623784652473659280347128937412890471209847318947189032748917234098712839412309847128934712839471283947017645174657398456374563745623470865673426754834671246720138912703478190234789026745367453768526789538679435268795342786952346789352478692354678925346872345687954397978019718024978012439780412379804312789041238970243178901243789041327089142794164365468425168678145678941567945167945379654379543795147878978904125789045129780415278905412789054178093457890253796567526798567895679854369794577942794051970549451798014537089543789573897891796519374591274129746879126789154678543167981457691456791456791345789514789042178904123789041237890412378901243789014237890143278901432796412367891432684123678914236794123789054217082534789032578905324789053426798421567891234796978034267548346712467201389127034781902347890267453674537685267895386794352687953427869523467893524786923546789253468723456879543979780197180249780124397804123798043127890412389702431789012437890413270891427941643654684251686781456789415679451679453796543795437951478789789041257890451297804152789054127890541780934578902537965675267985678956798543697945779427940519705494517980145370895437895738978917965193745912741297468791267891546785431679814576914567914567913457895147890421789041237890412378904123789012437890142378901432789014327964123678914326841236789142367941237890542170825347890325789053247890534267984215678912347969780 + echo "$?" + exit 0 +fi diff --git a/0x0D-preprocessor/tests/task_0/main_0.c b/0x0D-preprocessor/tests/task_0/main_0.c new file mode 100644 index 00000000..e00c223e --- /dev/null +++ b/0x0D-preprocessor/tests/task_0/main_0.c @@ -0,0 +1,18 @@ +#include +#include "0-object_like_macro.h" + +/** + * main - Entry point + * + * Return: 1 for error, 0 therwise + */ +int main(void) +{ +#ifndef SIZE + printf("Macro 'SIZE' is not defined\n"); + return (1); +#else + printf("%d\n", SIZE); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_1/main_0.c b/0x0D-preprocessor/tests/task_1/main_0.c new file mode 100644 index 00000000..fe60eaa0 --- /dev/null +++ b/0x0D-preprocessor/tests/task_1/main_0.c @@ -0,0 +1,18 @@ +#include +#include "1-pi.h" + +/** + * main - Entry point + * + * Return: 1 for error, 0 therwise + */ +int main(void) +{ +#ifndef PI + printf("Macro 'PI' is not defined\n"); + return (1); +#else + printf("%.12f\n", PI); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_3/main_0.c b/0x0D-preprocessor/tests/task_3/main_0.c new file mode 100644 index 00000000..db829eba --- /dev/null +++ b/0x0D-preprocessor/tests/task_3/main_0.c @@ -0,0 +1,18 @@ +#include +#include "3-function_like_macro.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef ABS + printf("The macro 'ABS' is not defined\n"); + return (1); +#else + printf("%d\n", ABS(1024)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_3/main_1.c b/0x0D-preprocessor/tests/task_3/main_1.c new file mode 100644 index 00000000..3f69676f --- /dev/null +++ b/0x0D-preprocessor/tests/task_3/main_1.c @@ -0,0 +1,18 @@ +#include +#include "3-function_like_macro.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef ABS + printf("The macro 'ABS' is not defined\n"); + return (1); +#else + printf("%d\n", ABS(-1024)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_3/main_2.c b/0x0D-preprocessor/tests/task_3/main_2.c new file mode 100644 index 00000000..63361e0a --- /dev/null +++ b/0x0D-preprocessor/tests/task_3/main_2.c @@ -0,0 +1,18 @@ +#include +#include "3-function_like_macro.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef ABS + printf("The macro 'ABS' is not defined\n"); + return (1); +#else + printf("%f\n", ABS(1024.827634)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_3/main_3.c b/0x0D-preprocessor/tests/task_3/main_3.c new file mode 100644 index 00000000..2f4c32a3 --- /dev/null +++ b/0x0D-preprocessor/tests/task_3/main_3.c @@ -0,0 +1,18 @@ +#include +#include "3-function_like_macro.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef ABS + printf("The macro 'ABS' is not defined\n"); + return (1); +#else + printf("%f\n", ABS(-1024.827634)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_3/main_4.c b/0x0D-preprocessor/tests/task_3/main_4.c new file mode 100644 index 00000000..f6a5383a --- /dev/null +++ b/0x0D-preprocessor/tests/task_3/main_4.c @@ -0,0 +1,18 @@ +#include +#include "3-function_like_macro.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef ABS + printf("The macro 'ABS' is not defined\n"); + return (1); +#else + printf("%ld\n", ABS(1022344827634)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_3/main_5.c b/0x0D-preprocessor/tests/task_3/main_5.c new file mode 100644 index 00000000..4cd2d97e --- /dev/null +++ b/0x0D-preprocessor/tests/task_3/main_5.c @@ -0,0 +1,18 @@ +#include +#include "3-function_like_macro.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef ABS + printf("The macro 'ABS' is not defined\n"); + return (1); +#else + printf("%ld\n", ABS(-1022344827634)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_3/main_6.c b/0x0D-preprocessor/tests/task_3/main_6.c new file mode 100644 index 00000000..87eaeb00 --- /dev/null +++ b/0x0D-preprocessor/tests/task_3/main_6.c @@ -0,0 +1,18 @@ +#include +#include "3-function_like_macro.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef ABS + printf("The macro 'ABS' is not defined\n"); + return (1); +#else + printf("%d\n", ABS(0)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_3/main_7.c b/0x0D-preprocessor/tests/task_3/main_7.c new file mode 100644 index 00000000..1658a163 --- /dev/null +++ b/0x0D-preprocessor/tests/task_3/main_7.c @@ -0,0 +1,18 @@ +#include +#include "3-function_like_macro.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef ABS + printf("The macro 'ABS' is not defined\n"); + return (1); +#else + printf("%d\n", ABS(1024 - 2048)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_4/main_0.c b/0x0D-preprocessor/tests/task_4/main_0.c new file mode 100644 index 00000000..b97cff19 --- /dev/null +++ b/0x0D-preprocessor/tests/task_4/main_0.c @@ -0,0 +1,18 @@ +#include +#include "4-sum.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef SUM + printf("The macro 'SUM' is not defined\n"); + return (1); +#else + printf("%d\n", SUM(2048, 4096)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_4/main_1.c b/0x0D-preprocessor/tests/task_4/main_1.c new file mode 100644 index 00000000..4bedb274 --- /dev/null +++ b/0x0D-preprocessor/tests/task_4/main_1.c @@ -0,0 +1,18 @@ +#include +#include "4-sum.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef SUM + printf("The macro 'SUM' is not defined\n"); + return (1); +#else + printf("%d\n", SUM(-2048, 4096)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_4/main_2.c b/0x0D-preprocessor/tests/task_4/main_2.c new file mode 100644 index 00000000..9bd8fc37 --- /dev/null +++ b/0x0D-preprocessor/tests/task_4/main_2.c @@ -0,0 +1,18 @@ +#include +#include "4-sum.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef SUM + printf("The macro 'SUM' is not defined\n"); + return (1); +#else + printf("%d\n", SUM(2048, -4096)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_4/main_3.c b/0x0D-preprocessor/tests/task_4/main_3.c new file mode 100644 index 00000000..672c264c --- /dev/null +++ b/0x0D-preprocessor/tests/task_4/main_3.c @@ -0,0 +1,18 @@ +#include +#include "4-sum.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef SUM + printf("The macro 'SUM' is not defined\n"); + return (1); +#else + printf("%d\n", SUM(-2048, -4096)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_4/main_4.c b/0x0D-preprocessor/tests/task_4/main_4.c new file mode 100644 index 00000000..17e4cfd4 --- /dev/null +++ b/0x0D-preprocessor/tests/task_4/main_4.c @@ -0,0 +1,18 @@ +#include +#include "4-sum.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef SUM + printf("The macro 'SUM' is not defined\n"); + return (1); +#else + printf("%ld\n", SUM(20488723647834, 4087236496)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_4/main_5.c b/0x0D-preprocessor/tests/task_4/main_5.c new file mode 100644 index 00000000..9901a006 --- /dev/null +++ b/0x0D-preprocessor/tests/task_4/main_5.c @@ -0,0 +1,18 @@ +#include +#include "4-sum.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef SUM + printf("The macro 'SUM' is not defined\n"); + return (1); +#else + printf("%f\n", SUM(2048.2344, 4096.8976)); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_4/main_6.c b/0x0D-preprocessor/tests/task_4/main_6.c new file mode 100644 index 00000000..0d46ac22 --- /dev/null +++ b/0x0D-preprocessor/tests/task_4/main_6.c @@ -0,0 +1,18 @@ +#include +#include "4-sum.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef SUM + printf("The macro 'SUM' is not defined\n"); + return (1); +#else + printf("%d\n", SUM(2048, 4096) * 5); + return (0); +#endif +} diff --git a/0x0D-preprocessor/tests/task_4/main_7.c b/0x0D-preprocessor/tests/task_4/main_7.c new file mode 100644 index 00000000..d7c98650 --- /dev/null +++ b/0x0D-preprocessor/tests/task_4/main_7.c @@ -0,0 +1,18 @@ +#include +#include "4-sum.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifndef SUM + printf("The macro 'SUM' is not defined\n"); + return (1); +#else + printf("%d\n", 5 * SUM(2048, 4096)); + return (0); +#endif +} diff --git a/0x0E-structures_typedef/tests/task_0/main_0.c b/0x0E-structures_typedef/tests/task_0/main_0.c new file mode 100644 index 00000000..7c903658 --- /dev/null +++ b/0x0E-structures_typedef/tests/task_0/main_0.c @@ -0,0 +1,19 @@ +#include +#include "dog.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + struct dog my_dog; + + my_dog.name = "Ghost"; + my_dog.age = 4.75; + my_dog.owner = "Jon Snow"; + printf("My name is %s, I am %.2f, and my owner is %s\n", + my_dog.name, my_dog.age, my_dog.owner); + return (0); +} diff --git a/0x0E-structures_typedef/tests/task_1/main_0.c b/0x0E-structures_typedef/tests/task_1/main_0.c new file mode 100644 index 00000000..bd66fc99 --- /dev/null +++ b/0x0E-structures_typedef/tests/task_1/main_0.c @@ -0,0 +1,17 @@ +#include +#include "dog.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + struct dog my_dog; + + init_dog(&my_dog, "Ghost", 4.75, "Jon Snow"); + printf("My name is %s, I am %.2f, and my owner is %s\n", + my_dog.name, my_dog.age, my_dog.owner); + return (0); +} diff --git a/0x0E-structures_typedef/tests/task_1/main_1.c b/0x0E-structures_typedef/tests/task_1/main_1.c new file mode 100644 index 00000000..44718dcb --- /dev/null +++ b/0x0E-structures_typedef/tests/task_1/main_1.c @@ -0,0 +1,14 @@ +#include +#include "dog.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + init_dog(NULL, "Ghost", 4.75, "Jon Snow"); + printf("Ok\n"); + return (0); +} diff --git a/0x0E-structures_typedef/tests/task_2/main_0.c b/0x0E-structures_typedef/tests/task_2/main_0.c new file mode 100644 index 00000000..c52da3bf --- /dev/null +++ b/0x0E-structures_typedef/tests/task_2/main_0.c @@ -0,0 +1,18 @@ +#include +#include "dog.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + struct dog my_dog; + + my_dog.name = "Ghost"; + my_dog.age = 4.75; + my_dog.owner = "Jon Snow"; + print_dog(&my_dog); + return (0); +} diff --git a/0x0E-structures_typedef/tests/task_2/main_1.c b/0x0E-structures_typedef/tests/task_2/main_1.c new file mode 100644 index 00000000..ef6de714 --- /dev/null +++ b/0x0E-structures_typedef/tests/task_2/main_1.c @@ -0,0 +1,19 @@ +#include +#include +#include "dog.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + struct dog my_dog; + + my_dog.name = NULL; + my_dog.age = .0f; + my_dog.owner = NULL; + print_dog(&my_dog); + return (0); +} diff --git a/0x0E-structures_typedef/tests/task_2/main_2.c b/0x0E-structures_typedef/tests/task_2/main_2.c new file mode 100644 index 00000000..7716f28f --- /dev/null +++ b/0x0E-structures_typedef/tests/task_2/main_2.c @@ -0,0 +1,14 @@ +#include +#include +#include "dog.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_dog(NULL); + return (0); +} diff --git a/0x0E-structures_typedef/tests/task_3/main_0.c b/0x0E-structures_typedef/tests/task_3/main_0.c new file mode 100644 index 00000000..e0451005 --- /dev/null +++ b/0x0E-structures_typedef/tests/task_3/main_0.c @@ -0,0 +1,24 @@ +#include +#include "dog.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ +#ifdef dog_t + printf("'dog_t' should not be a #define !\n"); + return (0); +#else + dog_t my_dog; + + my_dog.name = "Ghost"; + my_dog.age = 4.75; + my_dog.owner = "Jon Snow"; + printf("My name is %s, I am %.2f, and my owner is %s\n", + my_dog.name, my_dog.age, my_dog.owner); + return (0); +#endif +} diff --git a/0x0E-structures_typedef/tests/task_4/main_0.c b/0x0E-structures_typedef/tests/task_4/main_0.c new file mode 100644 index 00000000..b5e31918 --- /dev/null +++ b/0x0E-structures_typedef/tests/task_4/main_0.c @@ -0,0 +1,23 @@ +#include +#include +#include "dog.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + dog_t *my_dog; + + my_dog = new_dog("Ghost", 4.75, "Jon Snow"); + if (my_dog == NULL) + { + printf("Failed\n"); + return (1); + } + printf("My name is %s, I am %.2f, and my owner is %s\n", + my_dog->name, my_dog->age, my_dog->owner); + return (0); +} diff --git a/0x0E-structures_typedef/tests/task_4/main_1.c b/0x0E-structures_typedef/tests/task_4/main_1.c new file mode 100644 index 00000000..e8ec3b89 --- /dev/null +++ b/0x0E-structures_typedef/tests/task_4/main_1.c @@ -0,0 +1,30 @@ +#include +#include +#include "dog.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + char *name = "Ghost"; + char *owner = "Jon Snow"; + dog_t *my_dog; + + my_dog = new_dog(name, 4.75, owner); + if (my_dog == NULL) + { + printf("Failed\n"); + return (1); + } + if (my_dog->name == name || my_dog->owner == owner) + { + printf("Duplicated strings should be stored in the allocated structure.\n"); + return (1); + } + printf("My name is %s, I am %.2f, and my owner is %s\n", + my_dog->name, my_dog->age, my_dog->owner); + return (0); +} diff --git a/0x0E-structures_typedef/tests/task_5/main_0.c b/0x0E-structures_typedef/tests/task_5/main_0.c new file mode 100644 index 00000000..0c38acc9 --- /dev/null +++ b/0x0E-structures_typedef/tests/task_5/main_0.c @@ -0,0 +1,18 @@ +#include +#include "dog.h" + +dog_t *_new_dog(char *, float, char *); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + dog_t *my_dog; + + my_dog = _new_dog("Ghost", 4.75, "Jon Snow"); + free_dog(my_dog); + return (0); +} diff --git a/0x0E-structures_typedef/tests/task_5/main_1.c b/0x0E-structures_typedef/tests/task_5/main_1.c new file mode 100644 index 00000000..54f765de --- /dev/null +++ b/0x0E-structures_typedef/tests/task_5/main_1.c @@ -0,0 +1,13 @@ +#include +#include "dog.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + free_dog(NULL); + return (0); +} diff --git a/0x0E-structures_typedef/tests/task_5/main_2.c b/0x0E-structures_typedef/tests/task_5/main_2.c new file mode 100644 index 00000000..b6b10e16 --- /dev/null +++ b/0x0E-structures_typedef/tests/task_5/main_2.c @@ -0,0 +1,21 @@ +#include +#include +#include "dog.h" + +dog_t *_new_dog(char *, float, char *); + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + dog_t *my_dog; + + my_dog = _new_dog("Ghost", 4.75, "Jon Snow"); + free(my_dog->name); + my_dog->name = NULL; + free_dog(my_dog); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_0/0-main.c b/0x0F-function_pointers/tests/task_0/0-main.c new file mode 100644 index 00000000..e0b07d76 --- /dev/null +++ b/0x0F-function_pointers/tests/task_0/0-main.c @@ -0,0 +1,52 @@ +#include +#include "function_pointers.h" + +/** + * print_name_as_is - prints a name as is + * @name: name of the person + * + * Return: Nothing. + */ +void print_name_as_is(char *name) +{ + printf("Hello, my name is %s\n", name); +} + +/** + * print_name_uppercase - print a name in uppercase + * @name: name of the person + * + * Return: Nothing. + */ +void print_name_uppercase(char *name) +{ + unsigned int i; + + printf("Hello, my uppercase name is "); + i = 0; + while (name[i]) + { + if (name[i] >= 'a' && name[i] <= 'z') + { + putchar(name[i] + 'A' - 'a'); + } + else + { + putchar(name[i]); + } + i++; + } +} + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_name("Bob", print_name_as_is); + print_name("Bob Dylan", print_name_uppercase); + printf("\n"); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_0/main_0.c b/0x0F-function_pointers/tests/task_0/main_0.c new file mode 100644 index 00000000..52f48c6d --- /dev/null +++ b/0x0F-function_pointers/tests/task_0/main_0.c @@ -0,0 +1,36 @@ +#include +#include "function_pointers.h" + +/** + * print_name_uppercase - print a name in uppercase + * @name: name of the person + * + * Return: Nothing. + */ +void print_name_uppercase(char *name) +{ + unsigned int i; + + printf("Hello, my name is "); + i = 0; + while (name[i]) + { + if (name[i] >= 'a' && name[i] <= 'z') + putchar(name[i] + 'A' - 'a'); + else + putchar(name[i]); + i++; + } + putchar('\n'); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_name("Hodor", &print_name_uppercase); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_0/main_1.c b/0x0F-function_pointers/tests/task_0/main_1.c new file mode 100644 index 00000000..ab75aadb --- /dev/null +++ b/0x0F-function_pointers/tests/task_0/main_1.c @@ -0,0 +1,13 @@ +#include +#include "function_pointers.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_name("Hodor", NULL); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_1/main_0.c b/0x0F-function_pointers/tests/task_1/main_0.c new file mode 100644 index 00000000..56725dc0 --- /dev/null +++ b/0x0F-function_pointers/tests/task_1/main_0.c @@ -0,0 +1,26 @@ +#include +#include "function_pointers.h" + +/** + * print_elem - prints an integer, in hexadecimal + * @elem: the integer to print + * + * Return: Nothing. + */ +void print_elem(int elem) +{ + printf("(%d)\n", elem); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int array[5] = {28734, 236745, 234, 4, 2378}; + + array_iterator(array, 5, &print_elem); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_1/main_1.c b/0x0F-function_pointers/tests/task_1/main_1.c new file mode 100644 index 00000000..d91f9c05 --- /dev/null +++ b/0x0F-function_pointers/tests/task_1/main_1.c @@ -0,0 +1,319 @@ +#include +#include "function_pointers.h" + +/** + * print_elem - prints an integer + * @elem: the integer to print + * + * Return: Nothing. + */ +void print_elem(int elem) +{ + printf("(%d)\n", elem); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int array[2048] = { + 8504361, 4531961, 5994350, 7489994, 7935159, 8543864, 174244, + 7072943, 2787345, 920097, 341546, 3435456, 8598287, 9394103, + 194657, 8473640, 9561843, 1041361, 8763356, 6877956, 3105498, + 811377, 6884042, 3867198, 5522570, 4965363, 8557102, 2751414, + 8306111, 28473, 1304015, 2759309, 1235568, 6263144, 1744862, + 5543032, 4909791, 3426349, 3805471, 106815, 9540306, 2728425, + 7241472, 5400687, 5786165, 7650791, 1048166, 9865318, 3601261, + 3466936, 9932073, 7712570, 7000224, 1214496, 6547888, 276643, + 5983378, 6961938, 792478, 8778759, 9960187, 3942713, 9645372, + 2388049, 561826, 4085056, 8667404, 6044388, 6331399, 6496240, + 9949821, 2000532, 3872192, 2250366, 1976521, 7694809, 6116843, + 8099792, 2443847, 2304901, 2606369, 7236916, 6940433, 3944275, + 8007771, 5771507, 3789882, 8892959, 1419207, 8336906, 9768551, + 1071855, 8562740, 9040524, 1601331, 8108650, 295407, 124438, + 6334232, 5303654, 8045743, 5907009, 8300656, 3108065, 357772, + 2995003, 7570096, 3736008, 8750172, 6296797, 1603653, 6039807, + 6035573, 5637706, 2781770, 4737322, 5474095, 5799177, 668812, + 9034499, 3183594, 9254971, 8980391, 1111653, 56677, 6259394, + 6102717, 7185317, 3018183, 6378741, 8724233, 3968885, 7362195, + 34454, 3935970, 4132683, 1850118, 8561155, 271589, 3389941, + 7438799, 1997402, 8907049, 4126819, 5487477, 3732997, 3920914, + 2762759, 9329160, 3164837, 465815, 1381872, 2129955, 8743840, + 3105111, 7962439, 5269464, 9260438, 1546175, 5643627, 237505, + 7866556, 3035662, 4957454, 6198497, 5876957, 7954230, 8501121, + 201184, 5136500, 5529853, 6065133, 2803565, 7791081, 2936062, + 3656832, 6590145, 4511650, 4749528, 8671649, 3082937, 2678125, + 9966615, 2002553, 3347097, 1507076, 5157960, 152737, 3906179, + 2646061, 9543309, 2116871, 2855972, 6787929, 1723420, 9074791, + 7181004, 1062740, 2151416, 3486790, 7901248, 4495527, 3055260, + 1444952, 7105123, 9294165, 3327596, 4390964, 550568, 2119256, + 4187510, 4932718, 2814540, 2392875, 1265117, 4494284, 6053754, + 2746579, 1255250, 7332282, 4172749, 4046886, 6171254, 6139479, + 7479702, 3414376, 3923475, 3281356, 6980777, 5554155, 559130, + 4856340, 6897140, 3416460, 3079463, 217732, 3524149, 8716594, + 9987539, 4841444, 8414293, 6262231, 3108422, 267432, 6615147, + 6868450, 6803795, 8893283, 6868005, 6369140, 5993459, 6566836, + 8992263, 1099875, 6434295, 6683921, 2745702, 2020635, 2522020, + 5640013, 2375627, 2120308, 6185915, 5214339, 8234745, 7298543, + 6798946, 9820290, 4334642, 9510920, 1428179, 3306257, 7835717, + 465681, 430960, 4608291, 7966853, 4745139, 8923889, 9347743, + 4598063, 4003924, 4028958, 2747185, 907143, 2209525, 9378924, + 3373930, 490932, 8289372, 8281808, 4608919, 5993567, 6730433, + 8276332, 4989169, 9666200, 2727965, 5677210, 2379010, 8765416, + 4219985, 9648393, 2278699, 5166104, 5517771, 8536861, 5106814, + 4646639, 839687, 125431, 7050629, 8675299, 823628, 9688901, + 9601048, 1312540, 6760074, 6490755, 4325679, 8641068, 3507916, + 6335867, 6801461, 7303110, 893479, 1728380, 6189266, 5200534, + 4194346, 4021587, 4796607, 7493255, 22522, 1404835, 2212860, + 7978587, 466369, 9072238, 5141148, 8759638, 3493679, 6210977, + 3542885, 2793442, 3010637, 1845629, 2734387, 3300828, 8397140, + 5081500, 8884469, 6554427, 2999585, 6326559, 6291044, 4179306, + 9819124, 5147486, 1406297, 9955488, 9388067, 9801537, 9573230, + 1191028, 3604611, 4548223, 6621171, 2394760, 2873308, 6882916, + 2740250, 5039555, 1601629, 1086723, 7047164, 192725, 4087441, + 9439946, 4085655, 9308880, 196443, 7682814, 1692548, 1851341, + 4087042, 6400249, 3902887, 7959920, 1559532, 823855, 1270753, + 4803162, 347790, 6534158, 5669931, 7286508, 9182418, 3499619, + 8011500, 2188545, 8361083, 2739885, 261484, 1577524, 7447926, + 4293186, 5187222, 7624101, 6449358, 5485039, 215975, 3405613, + 4794131, 9551376, 5843098, 8628294, 7773226, 6930167, 5947500, + 5123049, 8599327, 3040456, 5714279, 4977202, 727351, 7834655, + 8224467, 1113773, 7213521, 231937, 7645674, 5812850, 5450444, + 1153129, 4449326, 8662858, 2448648, 8310928, 4683644, 4999629, + 4568855, 7544948, 15131, 107512, 518220, 1001260, 792009, 89452, + 5619569, 884487, 5896883, 6110778, 5111151, 4399274, 9833017, + 126653, 6510885, 4118678, 7400578, 3082654, 292383, 2099116, + 2576755, 5450059, 6186105, 982262, 3350008, 2138606, 102528, + 4299439, 3828575, 7404419, 558876, 4855456, 3612945, 9953916, + 2461929, 1682231, 1034978, 3720928, 1824106, 7328574, 9870426, + 6548025, 1560204, 7188016, 8285298, 4861184, 3337356, 3600074, + 8120705, 437309, 7861699, 4730913, 5619889, 1889959, 7845591, + 4941890, 2300185, 9524344, 2373452, 539686, 7275523, 3254241, + 8462142, 7743981, 8681259, 9167549, 1936016, 8809250, 6169479, + 6023233, 123403, 5904796, 8621379, 1822174, 605220, 2884021, + 6657883, 9475736, 3368843, 2661669, 2642427, 2561043, 7766359, + 7511318, 2964426, 3337342, 8705606, 7749702, 1269127, 262300, + 8098111, 2319030, 4455711, 3057968, 2164192, 9287301, 9871516, + 4169257, 3814044, 258071, 711481, 4536400, 4004018, 9249176, + 8517926, 2373647, 2154998, 9661414, 1321007, 7661368, 8100380, + 2862871, 2459399, 2706804, 1688113, 8690202, 847993, 3102405, + 6547716, 8228174, 8759047, 9227252, 9576858, 2369602, 7346039, + 796197, 1215264, 9593993, 6845485, 6417234, 9314737, 1510833, + 88216, 6093892, 9140448, 1861344, 9120014, 985875, 7617224, + 728061, 870035, 8644083, 3526406, 9824163, 5968051, 5560821, + 1006637, 8855177, 4490022, 9815060, 9813449, 492007, 705509, + 3631860, 4538735, 115452, 8226372, 2311775, 9375372, 7841757, + 4418888, 2353394, 2778193, 5789739, 8855999, 2543810, 7030217, + 386077, 1445810, 5255922, 6405682, 9618842, 472942, 7462985, + 1049892, 4303648, 7466977, 7383576, 2477003, 93447, 2727453, + 9270807, 5935825, 5678989, 4345077, 9637904, 9062439, 6607894, + 7994360, 7043592, 5049101, 9186645, 5548014, 7522513, 9366275, + 6372665, 2535458, 9783611, 4844829, 3303208, 8680992, 6726689, + 9105395, 6992385, 4517157, 113162, 7005467, 5065034, 6458639, + 1038457, 3302441, 3153268, 3212730, 8663832, 5658021, 8567452, + 8991871, 5361405, 5039324, 505289, 8570405, 7228888, 5042430, + 4241857, 4085275, 5738914, 7114253, 4446195, 321301, 5844107, + 4349044, 7387067, 8379877, 9871875, 5678306, 522682, 9448650, + 6868468, 7414485, 1015740, 1781920, 8462296, 6671903, 9421371, + 1588955, 2240631, 2438990, 8416563, 9320781, 4501799, 1498563, + 4908400, 7754653, 1389833, 8403570, 3774373, 191881, 1891810, + 3200049, 4685001, 1668713, 4959337, 117016, 5560315, 3764184, + 1391210, 3131011, 5922124, 4291731, 3388510, 5610872, 9702749, + 8839690, 2100715, 9191159, 2654588, 3630507, 4533294, 4850555, + 4878788, 1088951, 7280289, 4375362, 2141173, 2526168, 9297452, + 3347298, 4024766, 9782747, 1078633, 4190717, 4184621, 7760961, + 6787427, 6902811, 6426297, 9186614, 1957188, 6100674, 6148043, + 1342137, 4701926, 1631839, 6631914, 5707858, 1538366, 6816731, + 1212193, 196805, 5003738, 10816, 4563288, 5025691, 6423931, + 9321113, 6066197, 4581694, 9860208, 8228157, 2742506, 3869951, + 1214386, 621070, 3397551, 5365444, 2721876, 7607610, 7298426, + 996808, 816065, 9518608, 9198029, 6969052, 4675035, 661791, + 2745060, 6334164, 7889243, 2516350, 8739183, 4075793, 794439, + 4610851, 3693994, 7335627, 7221050, 7807016, 5720314, 8351174, + 5764613, 4722705, 3264144, 9826019, 5728178, 3783492, 5638851, + 7322968, 5643262, 6707401, 6375956, 6930536, 7381831, 2498756, + 5639944, 8797510, 8646232, 665902, 9074190, 3364880, 9983029, + 5867072, 1401770, 3128474, 4801905, 3975872, 6123890, 2163340, + 2505202, 2074602, 7170542, 6799415, 9159297, 5401315, 6359892, + 1208352, 4462896, 2860346, 8247873, 6065931, 4734484, 7506139, + 9505263, 3794327, 6030359, 5870031, 9397771, 5900507, 7542881, + 5353431, 4375963, 3077501, 1582445, 310705, 9700137, 5569679, + 5024741, 6804831, 6297022, 2306166, 5314, 9443495, 4062583, + 6044243, 2000588, 4488072, 9114943, 1794628, 58773, 4879097, + 3816277, 8086065, 5705471, 4860666, 1605057, 5902382, 8511293, + 5720348, 3675324, 1134574, 9324381, 342430, 1286400, 3021984, + 1840439, 1241715, 8906845, 3650849, 5005018, 4173870, 8248653, + 6324168, 1281795, 4618007, 8900530, 9467942, 2489476, 3385767, + 2901217, 2017117, 4858672, 6269511, 3896634, 1059069, 300287, + 7738581, 5935498, 4031115, 9580712, 7828684, 301107, 7302666, + 373701, 4567144, 4845559, 8719518, 9108023, 8999565, 9861973, + 6878775, 5242642, 4219861, 9702282, 3847441, 2042640, 7647326, + 2376661, 3556970, 2159509, 2642345, 7057316, 4820645, 2752494, + 1227725, 3078303, 6253192, 5376814, 9402702, 1895876, 1845178, + 1435063, 8199277, 1366912, 1432878, 3267358, 7374372, 7894230, + 7272024, 8979681, 6551703, 975738, 4413839, 3735026, 6148769, + 6362377, 294721, 504688, 4518451, 7265022, 9279705, 7513357, + 131032, 4449847, 6374002, 7083742, 9832205, 8587312, 4210010, + 7919777, 9985134, 7479824, 609204, 5708338, 3405107, 1218344, + 445191, 9366270, 1202556, 1453301, 6432310, 1194474, 8514155, + 8554683, 3967410, 9672657, 7651421, 1309868, 1421990, 6482111, + 8513072, 1211424, 5892707, 1793670, 1505309, 5445315, 3247110, + 4024798, 5605521, 4611662, 986749, 9688424, 6459464, 1936710, + 4404050, 1588585, 6932205, 634265, 7253323, 3997143, 2204227, + 1700092, 7605445, 591054, 6643571, 3616449, 2929199, 5998368, + 1582671, 2374158, 4437821, 167455, 4453130, 2725922, 4959998, + 6395161, 5124899, 2195967, 4780571, 8415743, 6874974, 9181571, + 4654372, 869101, 5843084, 7748053, 2716886, 2621425, 5028797, + 2874089, 1679090, 2616960, 6851975, 3475396, 1616219, 1989897, + 3747496, 2777389, 1225490, 4366974, 6876624, 8611621, 8656380, + 7783801, 1353648, 7233597, 7962773, 7758669, 6151161, 4374840, + 3995044, 8028928, 4813157, 4453884, 4756629, 2456138, 2225201, + 9487763, 5321758, 8592071, 2157693, 721261, 2662630, 3603162, + 9034761, 1148895, 7969891, 8416036, 7720668, 4192866, 5135612, + 4110746, 8185874, 7064346, 9843761, 3027175, 1489871, 3254428, + 6154015, 3282353, 3797123, 6979499, 3964061, 2359418, 7494191, + 6338930, 7840368, 8146501, 5414336, 3329356, 9473962, 8362352, + 9654544, 469869, 2343718, 5199136, 9398176, 5961814, 9605817, + 8992518, 2851485, 1095950, 7688408, 7506892, 4595931, 5191073, + 8793732, 4925392, 747912, 9048710, 7817280, 7631964, 972621, + 1798248, 5034273, 1315079, 8232021, 4595509, 9769476, 5193748, + 8198849, 150632, 7763963, 2627748, 7600375, 2988645, 567652, + 6499387, 8495573, 3624605, 8976868, 5477714, 7108232, 7521845, + 5659747, 3997417, 975798, 471439, 6444639, 4821128, 1651443, + 4838021, 431096, 3524344, 4895371, 8314898, 9472489, 9597650, + 8902363, 6040434, 9661595, 6481843, 2977387, 4362387, 8556249, + 239590, 5831270, 5587948, 3518020, 6871815, 1270369, 6523660, + 5467274, 8224662, 3726392, 7396751, 6042368, 4513310, 5872590, + 1817137, 9285084, 2340484, 1320236, 4927963, 2838879, 3313571, + 9246177, 3142111, 8944163, 6612462, 9269027, 254108, 1936120, + 5710454, 2600846, 2527232, 324981, 2336751, 795744, 9676773, + 4861474, 3104844, 1461359, 9733582, 3201734, 4822668, 9109416, + 6655584, 1349008, 4478404, 3654498, 1885978, 1849812, 9471530, + 7407522, 5711896, 6137403, 6384648, 1579, 6796260, 4539468, + 1603260, 8947962, 5489222, 4381642, 9749689, 3926903, 1897539, + 1404757, 6534129, 651863, 8713990, 8677386, 579240, 515746, + 5503901, 9666526, 9391896, 1807126, 3185041, 7994175, 4164031, + 6353687, 2587911, 4219843, 9917901, 7242125, 6264497, 5986761, + 6184743, 7876453, 2800650, 725464, 8917683, 920, 4976711, + 4957684, 2542847, 5970214, 568910, 5591796, 5881848, 8209103, + 4651511, 1967393, 6541432, 3268140, 9699485, 7757085, 6462157, + 8700248, 2548975, 3551503, 1339513, 4225179, 3698981, 2470867, + 8021155, 7428130, 4245409, 2248241, 6599824, 3592456, 2064715, + 8565930, 1041330, 6131826, 7400278, 9492963, 7962036, 4156212, + 1542633, 2815895, 9939758, 5962617, 3173653, 8062573, 1423380, + 7471204, 8067996, 1334092, 6138724, 6016708, 6120371, 8204387, + 7181073, 452498, 9262418, 1333492, 498963, 3014712, 7742192, + 9532607, 3257828, 8070068, 2884296, 6772255, 1260756, 9913627, + 2434465, 6324988, 9806968, 1804781, 5029307, 2158831, 9452395, + 7632413, 2858694, 2330292, 481840, 2700676, 5984155, 2182479, + 3344479, 8430904, 8672581, 3017294, 9142383, 8786152, 3884213, + 9939090, 779136, 7785205, 7507932, 1526559, 8602153, 7697756, + 7546514, 9191104, 5328920, 9629213, 5224451, 1992588, 3488004, + 6697646, 135621, 7327812, 4526532, 4481434, 7681544, 2609448, + 2281777, 2934843, 210846, 3854103, 8673615, 6205232, 6952299, + 8794691, 8252197, 5286818, 9141820, 8870724, 2081883, 1552193, + 3497020, 870502, 9835362, 1200453, 1548252, 6674586, 8959136, + 7208920, 6831764, 659315, 8722058, 5422888, 8495406, 9852687, + 1845614, 4003424, 7022013, 2676963, 37600, 7783132, 8766836, + 5238185, 2671932, 5679272, 8646274, 7839980, 1112382, 5057882, + 5225749, 58150, 4255081, 2062152, 5923991, 6301766, 1657877, + 361982, 8981055, 6579825, 7586489, 2301251, 7149946, 1311287, + 9185305, 6208733, 5014882, 3685741, 1599150, 2654520, 1319300, + 6698618, 5828951, 4638253, 5630687, 1097388, 7209745, 2766998, + 811319, 6338138, 3511708, 8694848, 4270199, 3005030, 7088444, + 6182330, 7484953, 9532335, 8744315, 2811162, 6865974, 1625418, + 8392280, 1366699, 304423, 7673181, 7693568, 1111462, 7976249, + 9828658, 6979443, 3332329, 2891201, 5710353, 9720179, 7592729, + 2703928, 5954557, 4487549, 1683725, 3596002, 8807843, 8735631, + 7031410, 781738, 6586933, 64954, 9963237, 8654370, 7058504, + 4726156, 5217741, 8208442, 9126720, 3717157, 8894499, 2709668, + 5876243, 6577878, 7060151, 6715268, 3632156, 350875, 7838812, + 2312456, 9995351, 5079393, 845810, 5830631, 348806, 724612, + 5255653, 4167525, 5546973, 2941093, 9207334, 271048, 2174681, + 2393666, 6391564, 4408393, 6150031, 1872705, 8349099, 7517575, + 5039220, 790890, 6080614, 8866045, 1508549, 3159153, 1795879, + 6026180, 5122748, 9231320, 5294902, 5675831, 9058495, 8341096, + 4110750, 7190772, 3895963, 1676088, 3984891, 8320935, 5895376, + 7100796, 3042600, 2154760, 7677040, 1748728, 4702040, 6512381, + 6944982, 4745442, 3074860, 8633554, 4782400, 9402642, 3889737, + 6814877, 6017824, 6543541, 8587951, 8106449, 2861364, 1798779, + 8572527, 9046277, 7156429, 1913749, 5515543, 4845050, 6728689, + 6851845, 4843546, 2191242, 5304064, 236951, 6438072, 424161, + 9844784, 4585605, 7935798, 8645116, 5580627, 8193085, 8178070, + 8771912, 2650666, 908291, 3005229, 6966005, 5246116, 5862400, + 4884516, 5310867, 6501048, 6988148, 4409030, 2498639, 4243396, + 4636980, 4922525, 7692914, 7355924, 9629015, 5645214, 4994450, + 4426327, 4237170, 534139, 453030, 7290778, 2148889, 145682, + 2183221, 9435966, 1094114, 1458546, 5975476, 1872321, 2499024, + 4066140, 1086083, 3155363, 7601455, 5418306, 3019058, 8360797, + 8448468, 2463764, 2850280, 8406757, 6830295, 6521471, 9119604, + 8884355, 9341623, 6876129, 5212951, 1907381, 9915101, 8723648, + 9898227, 4947762, 6300287, 7665659, 2658143, 3475462, 9542463, + 187154, 3333258, 5613870, 9335838, 5786055, 9356009, 5768409, + 1529106, 8596550, 4265187, 2752473, 1273929, 8671112, 5444584, + 7589346, 1977735, 5457928, 7595984, 8207929, 8592940, 669038, + 7449771, 4400178, 9120635, 1525024, 5414742, 6163247, 2469117, + 4746264, 7416033, 8875927, 9502307, 5991917, 9102114, 9206456, + 4807457, 8844736, 5734303, 3674462, 5382198, 2952354, 5482206, + 901036, 738434, 3059132, 419657, 2072116, 7864178, 5436950, + 4767442, 7711143, 2922831, 5757767, 6602786, 1608930, 7890125, + 7322082, 51346, 3104221, 178516, 4146940, 7753669, 5462023, + 3775443, 7814725, 7520847, 9804179, 2657247, 420637, 1775220, + 6445979, 7522379, 18120, 1496339, 7999155, 723746, 3109629, + 2729798, 3431154, 6201085, 9107275, 3048845, 8204522, 8897360, + 1055146, 510808, 9373913, 4022413, 9101345, 9041803, 1157198, + 6623438, 3881991, 7159860, 6245565, 2708635, 6841589, 4190282, + 8841693, 2593070, 9430843, 2491287, 8733216, 8962853, 6977362, + 7480761, 9458262, 173539, 373789, 3422798, 9302950, 7583024, + 5557405, 1303304, 3906833, 9258844, 7137025, 6805804, 4742757, + 9941408, 7766182, 366523, 2663306, 2809982, 7152930, 9715944, + 5428917, 6952499, 4744591, 2759008, 7723732, 3089221, 6557948, + 3979610, 5378167, 4033565, 6313171, 3426747, 1348611, 1497601, + 5391987, 4434472, 1254249, 5111875, 4120444, 1995081, 3647427, + 3673831, 2807054, 433206, 9351249, 3696415, 6928965, 8896918, + 8577430, 6217566, 9969208, 2790307, 4392444, 5909642, 4411652, + 3950293, 4631353, 282105, 793874, 4921129, 1459195, 5896647, + 584137, 1752359, 2294894, 8847032, 4494169, 3151127, 747067, + 9232314, 1055741, 9601042, 9494751, 851320, 2101344, 3672946, + 8691343, 6944404, 2437534, 785489, 9664759, 39848, 2010224, + 3068446, 8294383, 8119723, 9550721, 5333084, 4702167, 2772593, + 6483475, 7313833, 1677965, 3490468, 9451085, 7485450, 4871335, + 9747505, 634064, 2108101, 8537210, 7193100, 1844041, 1273009, + 9823609, 7085606, 5333037, 5637008, 920879, 6338385, 1443016, + 9765022, 9534120, 2594410, 5012386, 5369620, 1971479, 7278249, + 929400, 820367, 3069121, 8264364, 6163996, 46651, 2824358, + 3377175, 31656, 1379255, 2669023, 7304778, 1851452, 3394624, + 6148598, 859126, 1674990, 1327114, 7887604, 1196828, 3733140, + 5685857, 9662082, 8483252, 3720701, 4666197, 8857453, 4798310, + 320187, 1534118, 7287872, 6208993, 7239276, 2600089, 5844007, + 4355258, 4209100, 2598910, 6464785, 1381024, 1794855, 2333830, + 4242930, 7112273, 4632643, 9948530, 3909767, 3052282, 763864, + 164167, 2483460, 8575279, 8085452, 6313913, 5017717, 3625511, + 9506507, 1406553, 7219814, 4837896, 3424485, 2434320, 9304253, + 9627801, 3849911, 7021755, 4213335, 6110908, 2017503, 5649835, + 3442448, 8905189, 3319493, 2239227, 74205, 5467224, 1364863, + 32857, 4460651, 5359601, 9621232, 4678895, 6146258, 4065905, + 9798431, 1447276, 6692000, 1997527, 7926781, 6593197, 9587226, + 6977035, 4132668, 7833661, 4429848, 3221412, 6656286, 6557120, + 5879017, 4528152, 35943, 9637641, 1944184, 798600, 5187286, + 5161467, 5099874, 9593912, 9136437, 9085201, 1373779, 5703109, + 6632826, 4311905, 2119098, 6582848, 2837607, 4478211, 7350557, + 1906439, 4868248, 4447322, 7464487, 5477293, 5404669, 7857342, + 2107024, 3139858, 9563180, 5928282, 9782528, 7352025, 5465798, + 6586403, 7774499, 127761, 4835191, 7186469, 2182769, 6437262, + 7427094, 3750817, 6312470, 9312372, 7702043, 5237361, 1528710, + 28579, 2162123, 8869485, 8641455, 3053023, 8859699, 9157039, + 2522418, 4611208, 6535356, 3415154, 2399501, 291138, 5193779, + 5109693, 7833469, 7155087, 4333852, 3019223, 1836574, 5228877, + 8589458, 362377, 9724110, 2582429, 3151598, 9427125, 9024085, + 5486175, 440207, 7816731, 1493722, 9968385, 1698657, 4925030, + 8142781, 6882228, 7891659, 7285581, 4834022, 2674890, 5287761, + 7528085, 1873922, 1242390, 6252367, 8642174, 339398, 8527759, + 2664794, 6236792, 9387397}; + + array_iterator(array, 2048, &print_elem); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_1/main_2.c b/0x0F-function_pointers/tests/task_1/main_2.c new file mode 100644 index 00000000..d8ca65a4 --- /dev/null +++ b/0x0F-function_pointers/tests/task_1/main_2.c @@ -0,0 +1,24 @@ +#include +#include "function_pointers.h" + +/** + * print_elem - prints an integer, in hexadecimal + * @elem: the integer to print + * + * Return: Nothing. + */ +void print_elem(int elem) +{ + printf("(%d)\n", elem); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + array_iterator(NULL, 5, &print_elem); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_1/main_3.c b/0x0F-function_pointers/tests/task_1/main_3.c new file mode 100644 index 00000000..6624da12 --- /dev/null +++ b/0x0F-function_pointers/tests/task_1/main_3.c @@ -0,0 +1,26 @@ +#include +#include "function_pointers.h" + +/** + * print_elem - prints an integer, in hexadecimal + * @elem: the integer to print + * + * Return: Nothing. + */ +void print_elem(int elem) +{ + printf("(%d)\n", elem); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int array[5] = {28734, 236745, 234, 4, 2378}; + + array_iterator(array, 0, &print_elem); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_1/main_4.c b/0x0F-function_pointers/tests/task_1/main_4.c new file mode 100644 index 00000000..98ab5856 --- /dev/null +++ b/0x0F-function_pointers/tests/task_1/main_4.c @@ -0,0 +1,26 @@ +#include +#include "function_pointers.h" + +/** + * print_elem - prints an integer, in hexadecimal + * @elem: the integer to print + * + * Return: Nothing. + */ +void print_elem(int elem) +{ + printf("(%d)\n", elem); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int array[5] = {28734, 236745, 234, 4, 2378}; + + array_iterator(array, 5, NULL); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_2/2-main.c b/0x0F-function_pointers/tests/task_2/2-main.c new file mode 100644 index 00000000..b45d0751 --- /dev/null +++ b/0x0F-function_pointers/tests/task_2/2-main.c @@ -0,0 +1,55 @@ +#include +#include "function_pointers.h" + +/** + * is_98 - check if a number is equal to 98 + * @elem: the integer to check + * + * Return: 0 if false, something else otherwise. + */ +int is_98(int elem) +{ + return (98 == elem); +} + +/** + * is_strictly_positive - check if a number is greater than 0 + * @elem: the integer to check + * + * Return: 0 if false, something else otherwise. + */ +int is_strictly_positive(int elem) +{ + return (elem > 0); +} + + +/** + * abs_is_98 - check if the absolute value of a number is 98 + * @elem: the integer to check + * + * Return: 0 if false, something else otherwise. + */ +int abs_is_98(int elem) +{ + return (elem == 98 || -elem == 98); +} + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + int array[20] = {0, -98, 98, 402, 1024, 4096, -1024, -98, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 98}; + int index; + + index = int_index(array, 20, is_98); + printf("%d\n", index); + index = int_index(array, 20, abs_is_98); + printf("%d\n", index); + index = int_index(array, 20, is_strictly_positive); + printf("%d\n", index); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_2/main_0.c b/0x0F-function_pointers/tests/task_2/main_0.c new file mode 100644 index 00000000..532ad352 --- /dev/null +++ b/0x0F-function_pointers/tests/task_2/main_0.c @@ -0,0 +1,31 @@ +#include +#include "function_pointers.h" + +/** + * is_98 - check if a number is equal to 98 + * @elem: the integer to check + * + * Return: 0 if false, something else otherwise. + */ +int is_98(int elem) +{ + return (elem == 98); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int array[20] = { + 0, -986, 97, 402, 1024, 4096, -1024, 98, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 98 + }; + int index; + + index = int_index(array, 20, &is_98); + printf("%d\n", index); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_2/main_1.c b/0x0F-function_pointers/tests/task_2/main_1.c new file mode 100644 index 00000000..944b5c28 --- /dev/null +++ b/0x0F-function_pointers/tests/task_2/main_1.c @@ -0,0 +1,322 @@ +#include +#include "function_pointers.h" + +/** + * is_98 - check if a number is equal to 98 + * @elem: the integer to check + * + * Return: 0 if false, something else otherwise. + */ +int is_98(int elem) +{ + return (elem == 98); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int array[2048] = { + 8504361, 4531961, 5994350, 7489994, 7935159, 8543864, 174244, + 7072943, 2787345, 920097, 341546, 3435456, 8598287, 9394103, + 194657, 8473640, 9561843, 1041361, 8763356, 6877956, 3105498, + 811377, 6884042, 3867198, 5522570, 4965363, 8557102, 2751414, + 8306111, 28473, 1304015, 2759309, 1235568, 6263144, 1744862, + 5543032, 4909791, 3426349, 3805471, 106815, 9540306, 2728425, + 7241472, 5400687, 5786165, 7650791, 1048166, 9865318, 3601261, + 3466936, 9932073, 7712570, 7000224, 1214496, 6547888, 276643, + 5983378, 6961938, 792478, 8778759, 9960187, 3942713, 9645372, + 2388049, 561826, 4085056, 8667404, 6044388, 6331399, 6496240, + 9949821, 2000532, 3872192, 2250366, 1976521, 7694809, 6116843, + 8099792, 2443847, 2304901, 2606369, 7236916, 6940433, 3944275, + 8007771, 5771507, 3789882, 8892959, 1419207, 8336906, 9768551, + 1071855, 8562740, 9040524, 1601331, 8108650, 295407, 124438, + 6334232, 5303654, 8045743, 5907009, 8300656, 3108065, 357772, + 2995003, 7570096, 3736008, 8750172, 6296797, 1603653, 6039807, + 6035573, 5637706, 2781770, 4737322, 5474095, 5799177, 668812, + 9034499, 3183594, 9254971, 8980391, 1111653, 56677, 6259394, + 6102717, 7185317, 3018183, 6378741, 8724233, 3968885, 7362195, + 34454, 3935970, 4132683, 1850118, 8561155, 271589, 3389941, + 7438799, 1997402, 8907049, 4126819, 5487477, 3732997, 3920914, + 2762759, 9329160, 3164837, 465815, 1381872, 2129955, 8743840, + 3105111, 7962439, 5269464, 9260438, 1546175, 5643627, 237505, + 7866556, 3035662, 4957454, 6198497, 5876957, 7954230, 8501121, + 201184, 5136500, 5529853, 6065133, 2803565, 7791081, 2936062, + 3656832, 6590145, 4511650, 4749528, 8671649, 3082937, 2678125, + 9966615, 2002553, 3347097, 1507076, 5157960, 152737, 3906179, + 2646061, 9543309, 2116871, 2855972, 6787929, 1723420, 9074791, + 7181004, 1062740, 2151416, 3486790, 7901248, 4495527, 3055260, + 1444952, 7105123, 9294165, 3327596, 4390964, 550568, 2119256, + 4187510, 4932718, 2814540, 2392875, 1265117, 4494284, 6053754, + 2746579, 1255250, 7332282, 4172749, 4046886, 6171254, 6139479, + 7479702, 3414376, 3923475, 3281356, 6980777, 5554155, 559130, + 4856340, 6897140, 3416460, 3079463, 217732, 3524149, 8716594, + 9987539, 4841444, 8414293, 6262231, 3108422, 267432, 6615147, + 6868450, 6803795, 8893283, 6868005, 6369140, 5993459, 6566836, + 8992263, 1099875, 6434295, 6683921, 2745702, 2020635, 2522020, + 5640013, 2375627, 2120308, 6185915, 5214339, 8234745, 7298543, + 6798946, 9820290, 4334642, 9510920, 1428179, 3306257, 7835717, + 465681, 430960, 4608291, 7966853, 4745139, 8923889, 9347743, + 4598063, 4003924, 4028958, 2747185, 907143, 2209525, 9378924, + 3373930, 490932, 8289372, 8281808, 4608919, 5993567, 6730433, + 8276332, 4989169, 9666200, 2727965, 5677210, 2379010, 8765416, + 4219985, 9648393, 2278699, 5166104, 5517771, 8536861, 5106814, + 4646639, 839687, 125431, 7050629, 8675299, 823628, 9688901, + 9601048, 1312540, 6760074, 6490755, 4325679, 8641068, 3507916, + 6335867, 6801461, 7303110, 893479, 1728380, 6189266, 5200534, + 4194346, 4021587, 4796607, 7493255, 22522, 1404835, 2212860, + 7978587, 466369, 9072238, 5141148, 8759638, 3493679, 6210977, + 3542885, 2793442, 3010637, 1845629, 2734387, 3300828, 8397140, + 5081500, 8884469, 6554427, 2999585, 6326559, 6291044, 4179306, + 9819124, 5147486, 1406297, 9955488, 9388067, 9801537, 9573230, + 1191028, 3604611, 4548223, 6621171, 2394760, 2873308, 6882916, + 2740250, 5039555, 1601629, 1086723, 7047164, 192725, 4087441, + 9439946, 4085655, 9308880, 196443, 7682814, 1692548, 1851341, + 4087042, 6400249, 3902887, 7959920, 1559532, 823855, 1270753, + 4803162, 347790, 6534158, 5669931, 7286508, 9182418, 3499619, + 8011500, 2188545, 8361083, 2739885, 261484, 1577524, 7447926, + 4293186, 5187222, 7624101, 6449358, 5485039, 215975, 3405613, + 4794131, 9551376, 5843098, 8628294, 7773226, 6930167, 5947500, + 5123049, 8599327, 3040456, 5714279, 4977202, 727351, 7834655, + 8224467, 1113773, 7213521, 231937, 7645674, 5812850, 5450444, + 1153129, 4449326, 8662858, 2448648, 8310928, 4683644, 4999629, + 4568855, 7544948, 15131, 107512, 518220, 1001260, 792009, 89452, + 5619569, 884487, 5896883, 6110778, 5111151, 4399274, 9833017, + 126653, 6510885, 4118678, 7400578, 3082654, 292383, 2099116, + 2576755, 5450059, 6186105, 982262, 3350008, 2138606, 102528, + 4299439, 3828575, 7404419, 558876, 4855456, 3612945, 9953916, + 2461929, 1682231, 1034978, 3720928, 1824106, 7328574, 9870426, + 6548025, 1560204, 7188016, 8285298, 4861184, 3337356, 3600074, + 8120705, 437309, 7861699, 4730913, 5619889, 1889959, 7845591, + 4941890, 2300185, 9524344, 2373452, 539686, 7275523, 3254241, + 8462142, 7743981, 8681259, 9167549, 1936016, 8809250, 6169479, + 6023233, 123403, 5904796, 8621379, 1822174, 605220, 2884021, + 6657883, 9475736, 3368843, 2661669, 2642427, 2561043, 7766359, + 7511318, 2964426, 3337342, 8705606, 7749702, 1269127, 262300, + 8098111, 2319030, 4455711, 3057968, 2164192, 9287301, 9871516, + 4169257, 3814044, 258071, 711481, 4536400, 4004018, 9249176, + 8517926, 2373647, 2154998, 9661414, 1321007, 7661368, 8100380, + 2862871, 2459399, 2706804, 1688113, 8690202, 847993, 3102405, + 6547716, 8228174, 8759047, 9227252, 9576858, 2369602, 7346039, + 796197, 1215264, 9593993, 6845485, 6417234, 9314737, 1510833, + 88216, 6093892, 9140448, 1861344, 9120014, 985875, 7617224, + 728061, 870035, 8644083, 3526406, 9824163, 5968051, 5560821, + 1006637, 8855177, 4490022, 9815060, 9813449, 492007, 705509, + 3631860, 4538735, 115452, 8226372, 2311775, 9375372, 7841757, + 4418888, 2353394, 2778193, 5789739, 8855999, 2543810, 7030217, + 386077, 1445810, 5255922, 6405682, 9618842, 472942, 7462985, + 1049892, 4303648, 7466977, 7383576, 2477003, 93447, 2727453, + 9270807, 5935825, 5678989, 4345077, 9637904, 9062439, 6607894, + 7994360, 7043592, 5049101, 9186645, 5548014, 7522513, 9366275, + 6372665, 2535458, 9783611, 4844829, 3303208, 8680992, 6726689, + 9105395, 6992385, 4517157, 113162, 7005467, 5065034, 6458639, + 1038457, 3302441, 3153268, 3212730, 8663832, 5658021, 8567452, + 8991871, 5361405, 5039324, 505289, 8570405, 7228888, 5042430, + 4241857, 4085275, 5738914, 7114253, 4446195, 321301, 5844107, + 4349044, 7387067, 8379877, 9871875, 5678306, 522682, 9448650, + 6868468, 7414485, 1015740, 1781920, 8462296, 6671903, 9421371, + 1588955, 2240631, 2438990, 8416563, 9320781, 4501799, 1498563, + 4908400, 7754653, 1389833, 8403570, 3774373, 191881, 1891810, + 3200049, 4685001, 1668713, 4959337, 117016, 5560315, 3764184, + 1391210, 3131011, 5922124, 4291731, 3388510, 5610872, 9702749, + 8839690, 2100715, 9191159, 2654588, 3630507, 4533294, 4850555, + 4878788, 1088951, 7280289, 4375362, 2141173, 2526168, 9297452, + 3347298, 4024766, 9782747, 1078633, 4190717, 4184621, 7760961, + 6787427, 6902811, 6426297, 9186614, 1957188, 6100674, 6148043, + 1342137, 4701926, 1631839, 6631914, 5707858, 1538366, 6816731, + 1212193, 196805, 5003738, 10816, 4563288, 5025691, 6423931, + 9321113, 6066197, 4581694, 9860208, 8228157, 2742506, 3869951, + 1214386, 621070, 3397551, 5365444, 2721876, 7607610, 7298426, + 996808, 816065, 9518608, 9198029, 6969052, 4675035, 661791, + 2745060, 6334164, 7889243, 2516350, 8739183, 4075793, 794439, + 4610851, 3693994, 7335627, 7221050, 7807016, 5720314, 8351174, + 5764613, 4722705, 3264144, 9826019, 5728178, 3783492, 5638851, + 7322968, 5643262, 6707401, 6375956, 6930536, 7381831, 2498756, + 5639944, 8797510, 8646232, 665902, 9074190, 3364880, 9983029, + 5867072, 1401770, 3128474, 4801905, 3975872, 6123890, 2163340, + 2505202, 2074602, 7170542, 6799415, 9159297, 5401315, 6359892, + 1208352, 4462896, 2860346, 8247873, 6065931, 4734484, 7506139, + 9505263, 3794327, 6030359, 5870031, 9397771, 5900507, 7542881, + 5353431, 4375963, 3077501, 1582445, 310705, 9700137, 5569679, + 5024741, 6804831, 6297022, 2306166, 5314, 9443495, 4062583, + 6044243, 2000588, 4488072, 9114943, 1794628, 58773, 4879097, + 3816277, 8086065, 5705471, 4860666, 1605057, 5902382, 8511293, + 5720348, 3675324, 1134574, 9324381, 342430, 1286400, 3021984, + 1840439, 1241715, 8906845, 3650849, 5005018, 4173870, 8248653, + 6324168, 1281795, 4618007, 8900530, 9467942, 2489476, 3385767, + 2901217, 2017117, 4858672, 6269511, 3896634, 1059069, 300287, + 7738581, 5935498, 4031115, 9580712, 7828684, 301107, 7302666, + 373701, 4567144, 4845559, 8719518, 9108023, 8999565, 9861973, + 6878775, 5242642, 4219861, 9702282, 3847441, 2042640, 7647326, + 2376661, 3556970, 2159509, 2642345, 7057316, 4820645, 2752494, + 1227725, 3078303, 6253192, 5376814, 9402702, 1895876, 1845178, + 1435063, 8199277, 1366912, 1432878, 3267358, 7374372, 7894230, + 7272024, 8979681, 6551703, 975738, 4413839, 3735026, 6148769, + 6362377, 294721, 504688, 4518451, 7265022, 9279705, 7513357, + 131032, 4449847, 6374002, 7083742, 9832205, 8587312, 4210010, + 7919777, 9985134, 7479824, 609204, 5708338, 3405107, 1218344, + 445191, 9366270, 1202556, 1453301, 6432310, 1194474, 8514155, + 8554683, 3967410, 9672657, 7651421, 1309868, 1421990, 6482111, + 8513072, 1211424, 5892707, 1793670, 1505309, 5445315, 3247110, + 4024798, 5605521, 4611662, 986749, 9688424, 6459464, 1936710, + 4404050, 1588585, 6932205, 634265, 7253323, 3997143, 2204227, + 1700092, 7605445, 591054, 6643571, 3616449, 2929199, 5998368, + 1582671, 2374158, 4437821, 167455, 4453130, 2725922, 4959998, + 6395161, 5124899, 2195967, 4780571, 8415743, 6874974, 9181571, + 4654372, 869101, 5843084, 7748053, 2716886, 2621425, 5028797, + 2874089, 1679090, 2616960, 6851975, 3475396, 1616219, 1989897, + 3747496, 2777389, 1225490, 4366974, 6876624, 8611621, 8656380, + 7783801, 1353648, 7233597, 7962773, 7758669, 6151161, 4374840, + 3995044, 8028928, 4813157, 4453884, 4756629, 2456138, 2225201, + 9487763, 5321758, 8592071, 2157693, 721261, 2662630, 3603162, + 9034761, 1148895, 7969891, 8416036, 7720668, 4192866, 5135612, + 4110746, 8185874, 7064346, 9843761, 3027175, 1489871, 3254428, + 6154015, 3282353, 3797123, 6979499, 3964061, 2359418, 7494191, + 6338930, 7840368, 8146501, 5414336, 3329356, 9473962, 8362352, + 9654544, 469869, 2343718, 5199136, 9398176, 5961814, 9605817, + 8992518, 2851485, 1095950, 7688408, 7506892, 4595931, 5191073, + 8793732, 4925392, 747912, 9048710, 7817280, 7631964, 972621, + 1798248, 5034273, 1315079, 8232021, 4595509, 9769476, 5193748, + 8198849, 150632, 7763963, 2627748, 7600375, 2988645, 567652, + 6499387, 8495573, 3624605, 8976868, 5477714, 7108232, 7521845, + 5659747, 3997417, 975798, 471439, 6444639, 4821128, 1651443, + 4838021, 431096, 3524344, 4895371, 8314898, 9472489, 9597650, + 8902363, 6040434, 9661595, 6481843, 2977387, 4362387, 8556249, + 239590, 5831270, 5587948, 3518020, 6871815, 1270369, 6523660, + 5467274, 8224662, 3726392, 7396751, 6042368, 4513310, 5872590, + 1817137, 9285084, 2340484, 1320236, 4927963, 2838879, 3313571, + 9246177, 3142111, 8944163, 6612462, 9269027, 254108, 1936120, + 5710454, 2600846, 2527232, 324981, 2336751, 795744, 9676773, + 4861474, 3104844, 1461359, 9733582, 3201734, 4822668, 9109416, + 6655584, 1349008, 4478404, 3654498, 1885978, 1849812, 9471530, + 7407522, 5711896, 6137403, 6384648, 1579, 6796260, 4539468, + 1603260, 8947962, 5489222, 4381642, 9749689, 3926903, 1897539, + 1404757, 6534129, 651863, 8713990, 8677386, 579240, 515746, + 5503901, 9666526, 9391896, 1807126, 3185041, 7994175, 4164031, + 6353687, 2587911, 4219843, 9917901, 7242125, 6264497, 5986761, + 6184743, 7876453, 2800650, 725464, 8917683, 920, 4976711, + 4957684, 2542847, 5970214, 568910, 5591796, 5881848, 8209103, + 4651511, 1967393, 6541432, 3268140, 9699485, 7757085, 6462157, + 8700248, 2548975, 3551503, 1339513, 4225179, 3698981, 2470867, + 8021155, 7428130, 4245409, 2248241, 6599824, 3592456, 2064715, + 8565930, 1041330, 6131826, 7400278, 9492963, 7962036, 4156212, + 1542633, 2815895, 9939758, 5962617, 3173653, 8062573, 1423380, + 7471204, 8067996, 1334092, 6138724, 6016708, 6120371, 8204387, + 7181073, 452498, 9262418, 1333492, 498963, 3014712, 7742192, + 9532607, 3257828, 8070068, 2884296, 6772255, 1260756, 9913627, + 2434465, 6324988, 9806968, 1804781, 5029307, 2158831, 9452395, + 7632413, 2858694, 2330292, 481840, 2700676, 5984155, 2182479, + 3344479, 8430904, 8672581, 3017294, 9142383, 8786152, 3884213, + 9939090, 779136, 7785205, 7507932, 1526559, 8602153, 7697756, + 7546514, 9191104, 5328920, 9629213, 5224451, 1992588, 3488004, + 6697646, 135621, 7327812, 4526532, 4481434, 7681544, 2609448, + 2281777, 2934843, 210846, 3854103, 8673615, 6205232, 6952299, + 8794691, 8252197, 5286818, 9141820, 8870724, 2081883, 1552193, + 3497020, 870502, 9835362, 1200453, 1548252, 6674586, 8959136, + 7208920, 6831764, 659315, 8722058, 5422888, 8495406, 9852687, + 1845614, 4003424, 7022013, 2676963, 37600, 7783132, 8766836, + 5238185, 2671932, 5679272, 8646274, 7839980, 1112382, 5057882, + 5225749, 58150, 4255081, 2062152, 5923991, 6301766, 1657877, + 361982, 8981055, 6579825, 7586489, 2301251, 7149946, 1311287, + 9185305, 6208733, 5014882, 3685741, 1599150, 2654520, 1319300, + 6698618, 5828951, 4638253, 5630687, 1097388, 7209745, 2766998, + 811319, 6338138, 3511708, 8694848, 4270199, 3005030, 7088444, + 6182330, 7484953, 9532335, 8744315, 2811162, 6865974, 1625418, + 8392280, 1366699, 304423, 7673181, 7693568, 1111462, 7976249, + 9828658, 6979443, 3332329, 2891201, 5710353, 9720179, 7592729, + 2703928, 5954557, 4487549, 1683725, 3596002, 8807843, 8735631, + 7031410, 781738, 6586933, 64954, 9963237, 8654370, 7058504, + 4726156, 5217741, 8208442, 9126720, 3717157, 8894499, 2709668, + 5876243, 6577878, 7060151, 6715268, 3632156, 350875, 7838812, + 2312456, 9995351, 5079393, 845810, 5830631, 348806, 724612, + 5255653, 4167525, 5546973, 2941093, 9207334, 271048, 2174681, + 2393666, 6391564, 4408393, 6150031, 1872705, 8349099, 7517575, + 5039220, 790890, 6080614, 8866045, 1508549, 3159153, 1795879, + 6026180, 5122748, 9231320, 5294902, 5675831, 9058495, 8341096, + 4110750, 7190772, 3895963, 1676088, 3984891, 8320935, 5895376, + 7100796, 3042600, 2154760, 7677040, 1748728, 4702040, 6512381, + 6944982, 4745442, 3074860, 8633554, 4782400, 9402642, 3889737, + 6814877, 6017824, 6543541, 8587951, 8106449, 2861364, 1798779, + 8572527, 9046277, 7156429, 1913749, 5515543, 4845050, 6728689, + 6851845, 4843546, 2191242, 5304064, 236951, 6438072, 424161, + 9844784, 4585605, 7935798, 8645116, 5580627, 8193085, 8178070, + 8771912, 2650666, 908291, 3005229, 6966005, 5246116, 5862400, + 4884516, 5310867, 6501048, 6988148, 4409030, 2498639, 4243396, + 4636980, 4922525, 7692914, 7355924, 9629015, 5645214, 4994450, + 4426327, 4237170, 534139, 453030, 7290778, 2148889, 145682, + 2183221, 9435966, 1094114, 1458546, 5975476, 1872321, 2499024, + 4066140, 1086083, 3155363, 7601455, 5418306, 3019058, 8360797, + 8448468, 2463764, 2850280, 8406757, 6830295, 6521471, 9119604, + 8884355, 9341623, 6876129, 5212951, 1907381, 9915101, 8723648, + 9898227, 4947762, 6300287, 7665659, 2658143, 3475462, 9542463, + 187154, 3333258, 5613870, 9335838, 5786055, 9356009, 5768409, + 1529106, 8596550, 4265187, 2752473, 1273929, 8671112, 5444584, + 7589346, 1977735, 5457928, 7595984, 8207929, 8592940, 669038, + 7449771, 4400178, 9120635, 1525024, 5414742, 6163247, 2469117, + 4746264, 7416033, 8875927, 9502307, 5991917, 9102114, 9206456, + 4807457, 8844736, 5734303, 3674462, 5382198, 2952354, 5482206, + 901036, 738434, 3059132, 419657, 2072116, 7864178, 5436950, + 4767442, 7711143, 2922831, 5757767, 6602786, 1608930, 7890125, + 7322082, 51346, 3104221, 178516, 4146940, 7753669, 5462023, + 3775443, 7814725, 7520847, 9804179, 2657247, 420637, 1775220, + 6445979, 7522379, 18120, 1496339, 7999155, 723746, 3109629, + 2729798, 3431154, 6201085, 9107275, 3048845, 8204522, 8897360, + 1055146, 510808, 9373913, 4022413, 9101345, 9041803, 1157198, + 6623438, 3881991, 7159860, 6245565, 2708635, 6841589, 4190282, + 8841693, 2593070, 9430843, 2491287, 8733216, 8962853, 6977362, + 7480761, 9458262, 173539, 373789, 3422798, 9302950, 7583024, + 5557405, 1303304, 3906833, 9258844, 7137025, 6805804, 4742757, + 9941408, 7766182, 366523, 2663306, 2809982, 7152930, 9715944, + 5428917, 6952499, 4744591, 2759008, 7723732, 3089221, 6557948, + 3979610, 5378167, 4033565, 6313171, 3426747, 1348611, 1497601, + 5391987, 4434472, 1254249, 5111875, 4120444, 1995081, 3647427, + 3673831, 2807054, 433206, 9351249, 3696415, 6928965, 8896918, + 8577430, 6217566, 9969208, 2790307, 4392444, 5909642, 4411652, + 3950293, 4631353, 282105, 793874, 4921129, 1459195, 5896647, + 584137, 1752359, 2294894, 8847032, 4494169, 3151127, 747067, + 9232314, 1055741, 9601042, 9494751, 851320, 2101344, 3672946, + 8691343, 6944404, 2437534, 785489, 9664759, 39848, 2010224, + 3068446, 8294383, 8119723, 9550721, 5333084, 4702167, 2772593, + 6483475, 7313833, 1677965, 3490468, 9451085, 7485450, 4871335, + 9747505, 634064, 2108101, 8537210, 7193100, 1844041, 1273009, + 9823609, 7085606, 5333037, 5637008, 920879, 6338385, 1443016, + 9765022, 9534120, 2594410, 5012386, 5369620, 1971479, 7278249, + 929400, 820367, 3069121, 8264364, 6163996, 46651, 2824358, + 3377175, 31656, 1379255, 2669023, 7304778, 1851452, 3394624, + 6148598, 859126, 1674990, 1327114, 7887604, 1196828, 3733140, + 5685857, 9662082, 8483252, 3720701, 4666197, 8857453, 4798310, + 320187, 1534118, 7287872, 6208993, 7239276, 2600089, 5844007, + 4355258, 4209100, 2598910, 6464785, 1381024, 1794855, 2333830, + 4242930, 7112273, 4632643, 9948530, 3909767, 3052282, 763864, + 164167, 2483460, 8575279, 8085452, 6313913, 5017717, 3625511, + 9506507, 1406553, 7219814, 4837896, 3424485, 2434320, 9304253, + 9627801, 3849911, 7021755, 4213335, 6110908, 2017503, 5649835, + 3442448, 8905189, 3319493, 2239227, 74205, 5467224, 1364863, + 32857, 4460651, 5359601, 9621232, 4678895, 6146258, 4065905, + 9798431, 1447276, 6692000, 1997527, 7926781, 6593197, 9587226, + 6977035, 4132668, 7833661, 4429848, 3221412, 6656286, 6557120, + 5879017, 4528152, 35943, 9637641, 1944184, 798600, 5187286, + 5161467, 5099874, 9593912, 9136437, 9085201, 1373779, 5703109, + 6632826, 4311905, 2119098, 6582848, 2837607, 4478211, 7350557, + 1906439, 4868248, 4447322, 7464487, 5477293, 5404669, 7857342, + 2107024, 3139858, 9563180, 5928282, 9782528, 7352025, 5465798, + 6586403, 7774499, 127761, 4835191, 7186469, 2182769, 6437262, + 7427094, 3750817, 6312470, 9312372, 7702043, 5237361, 1528710, + 28579, 2162123, 8869485, 8641455, 3053023, 8859699, 9157039, + 2522418, 4611208, 6535356, 3415154, 2399501, 291138, 5193779, + 5109693, 7833469, 7155087, 4333852, 3019223, 1836574, 5228877, + 8589458, 362377, 9724110, 2582429, 3151598, 9427125, 9024085, + 5486175, 440207, 7816731, 1493722, 9968385, 1698657, 4925030, + 8142781, 6882228, 7891659, 7285581, 4834022, 2674890, 5287761, + 7528085, 1873922, 1242390, 6252367, 8642174, 339398, 8527759, + 2664794, 6236792, 98 + }; + int index; + + index = int_index(array, 2048, &is_98); + printf("%d\n", index); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_2/main_2.c b/0x0F-function_pointers/tests/task_2/main_2.c new file mode 100644 index 00000000..ec450695 --- /dev/null +++ b/0x0F-function_pointers/tests/task_2/main_2.c @@ -0,0 +1,31 @@ +#include +#include "function_pointers.h" + +/** + * is_98 - check if a number is equal to 98 + * @elem: the integer to check + * + * Return: 0 if false, something else otherwise. + */ +int is_98(int elem) +{ + return (elem == 98); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int array[20] = { + 0, -986, 97, 402, 1024, 4096, -1024, -98, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12 + }; + int index; + + index = int_index(array, 20, &is_98); + printf("%d\n", index); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_2/main_3.c b/0x0F-function_pointers/tests/task_2/main_3.c new file mode 100644 index 00000000..e36b148c --- /dev/null +++ b/0x0F-function_pointers/tests/task_2/main_3.c @@ -0,0 +1,31 @@ +#include +#include "function_pointers.h" + +/** + * is_98 - check if a number is equal to 98 + * @elem: the integer to check + * + * Return: 0 if false, something else otherwise. + */ +int is_98(int elem) +{ + return (elem == 98); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int array[20] = { + 0, -986, 97, 402, 1024, 4096, -1024, -98, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12 + }; + int index; + + index = int_index(array, 0, &is_98); + printf("%d\n", index); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_2/main_4.c b/0x0F-function_pointers/tests/task_2/main_4.c new file mode 100644 index 00000000..d4436de9 --- /dev/null +++ b/0x0F-function_pointers/tests/task_2/main_4.c @@ -0,0 +1,27 @@ +#include +#include "function_pointers.h" + +/** + * is_98 - check if a number is equal to 98 + * @elem: the integer to check + * + * Return: 0 if false, something else otherwise. + */ +int is_98(int elem) +{ + return (elem == 98); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int index; + + index = int_index(NULL, 20, &is_98); + printf("%d\n", index); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_2/main_5.c b/0x0F-function_pointers/tests/task_2/main_5.c new file mode 100644 index 00000000..7ec7307e --- /dev/null +++ b/0x0F-function_pointers/tests/task_2/main_5.c @@ -0,0 +1,20 @@ +#include +#include "function_pointers.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int array[20] = { + 0, -986, 97, 402, 1024, 4096, -1024, 98, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 98 + }; + int index; + + index = int_index(array, 20, NULL); + printf("%d\n", index); + return (0); +} diff --git a/0x0F-function_pointers/tests/task_4/helper_0.c b/0x0F-function_pointers/tests/task_4/helper_0.c new file mode 100644 index 00000000..8a7669d5 --- /dev/null +++ b/0x0F-function_pointers/tests/task_4/helper_0.c @@ -0,0 +1,27 @@ +#include +#include + +#define NB_BYTES 40 + +int main(int, char **); + +void __attribute__((constructor)) helper_review(void) +{ + unsigned char *m, c; + int n, i; + + m = (char *)main; + n = NB_BYTES; + i = 0; + while (i < n) + { + if (i != 0) + { + printf(" "); + } + c = m[i]; + printf("%02x", c); + i++; + } + printf("\n"); +} diff --git a/0x0F-function_pointers/tests/task_4/helper_1.c b/0x0F-function_pointers/tests/task_4/helper_1.c new file mode 100644 index 00000000..14a03e79 --- /dev/null +++ b/0x0F-function_pointers/tests/task_4/helper_1.c @@ -0,0 +1,27 @@ +#include +#include + +#define NB_BYTES 100 + +int main(int, char **); + +void __attribute__((constructor)) helper_review(void) +{ + unsigned char *m, c; + int n, i; + + m = (char *)main; + n = NB_BYTES; + i = 0; + while (i < n) + { + if (i != 0) + { + printf(" "); + } + c = m[i]; + printf("%02x", c); + i++; + } + printf("\n"); +} diff --git a/0x10-variadic_functions/tests/task_0/0-main.c b/0x10-variadic_functions/tests/task_0/0-main.c new file mode 100644 index 00000000..b8a85e8a --- /dev/null +++ b/0x10-variadic_functions/tests/task_0/0-main.c @@ -0,0 +1,17 @@ +#include "variadic_functions.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + int sum; + + sum = sum_them_all(2, 98, 1024); + printf("%d\n", sum); + sum = sum_them_all(4, 98, 1024, 402, -1024); + printf("%d\n", sum); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_0/main_0.c b/0x10-variadic_functions/tests/task_0/main_0.c new file mode 100644 index 00000000..e5f14c76 --- /dev/null +++ b/0x10-variadic_functions/tests/task_0/main_0.c @@ -0,0 +1,16 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int sum; + + sum = sum_them_all(2, 278634, 87365); + printf("%d\n", sum); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_0/main_1.c b/0x10-variadic_functions/tests/task_0/main_1.c new file mode 100644 index 00000000..d822c964 --- /dev/null +++ b/0x10-variadic_functions/tests/task_0/main_1.c @@ -0,0 +1,16 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int sum; + + sum = sum_them_all(4, 9348, 134524, -345402, 1394024); + printf("%d\n", sum); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_0/main_2.c b/0x10-variadic_functions/tests/task_0/main_2.c new file mode 100644 index 00000000..bbe109c0 --- /dev/null +++ b/0x10-variadic_functions/tests/task_0/main_2.c @@ -0,0 +1,16 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int sum; + + sum = sum_them_all(1, 9348); + printf("%d\n", sum); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_0/main_3.c b/0x10-variadic_functions/tests/task_0/main_3.c new file mode 100644 index 00000000..95fc7d49 --- /dev/null +++ b/0x10-variadic_functions/tests/task_0/main_3.c @@ -0,0 +1,16 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int sum; + + sum = sum_them_all(0); + printf("%d\n", sum); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_1/1-main.c b/0x10-variadic_functions/tests/task_1/1-main.c new file mode 100644 index 00000000..54ce1e67 --- /dev/null +++ b/0x10-variadic_functions/tests/task_1/1-main.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_numbers(", ", 4, 0, 98, -1024, 402); + return (0); +} \ No newline at end of file diff --git a/0x10-variadic_functions/tests/task_1/main_0.c b/0x10-variadic_functions/tests/task_1/main_0.c new file mode 100644 index 00000000..24840fdd --- /dev/null +++ b/0x10-variadic_functions/tests/task_1/main_0.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_numbers("; ", 5, 30, 938, -123024, 43402, 0); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_1/main_1.c b/0x10-variadic_functions/tests/task_1/main_1.c new file mode 100644 index 00000000..49c9f80b --- /dev/null +++ b/0x10-variadic_functions/tests/task_1/main_1.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_numbers("; ", 1, 30); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_1/main_2.c b/0x10-variadic_functions/tests/task_1/main_2.c new file mode 100644 index 00000000..2a1a8b12 --- /dev/null +++ b/0x10-variadic_functions/tests/task_1/main_2.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_numbers("", 4, 304, 76, 87236, 28376); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_1/main_3.c b/0x10-variadic_functions/tests/task_1/main_3.c new file mode 100644 index 00000000..8d593cac --- /dev/null +++ b/0x10-variadic_functions/tests/task_1/main_3.c @@ -0,0 +1,13 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_numbers(NULL, 4, 304, 76, 87236, 28376); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_1/main_4.c b/0x10-variadic_functions/tests/task_1/main_4.c new file mode 100644 index 00000000..b0acb46e --- /dev/null +++ b/0x10-variadic_functions/tests/task_1/main_4.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_numbers("; ", 0); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_2/2-main.c b/0x10-variadic_functions/tests/task_2/2-main.c new file mode 100644 index 00000000..69df9dad --- /dev/null +++ b/0x10-variadic_functions/tests/task_2/2-main.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_strings(", ", 2, "Jay", "Django"); + return (0); +} \ No newline at end of file diff --git a/0x10-variadic_functions/tests/task_2/main_0.c b/0x10-variadic_functions/tests/task_2/main_0.c new file mode 100644 index 00000000..4431ceea --- /dev/null +++ b/0x10-variadic_functions/tests/task_2/main_0.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_strings("; ", 4, "You", "know", "nothing", "Jon Snow"); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_2/main_1.c b/0x10-variadic_functions/tests/task_2/main_1.c new file mode 100644 index 00000000..ed92ba6c --- /dev/null +++ b/0x10-variadic_functions/tests/task_2/main_1.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_strings("; ", 1, "You know nothing, Jon Snow"); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_2/main_2.c b/0x10-variadic_functions/tests/task_2/main_2.c new file mode 100644 index 00000000..4212fb9b --- /dev/null +++ b/0x10-variadic_functions/tests/task_2/main_2.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_strings("", 4, "You ", "know ", "nothing, ", "Jon Snow"); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_2/main_3.c b/0x10-variadic_functions/tests/task_2/main_3.c new file mode 100644 index 00000000..034bd0c6 --- /dev/null +++ b/0x10-variadic_functions/tests/task_2/main_3.c @@ -0,0 +1,13 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_strings(NULL, 4, "You ", "know ", "nothing, ", "Jon Snow"); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_2/main_4.c b/0x10-variadic_functions/tests/task_2/main_4.c new file mode 100644 index 00000000..fa12aed8 --- /dev/null +++ b/0x10-variadic_functions/tests/task_2/main_4.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_strings("; ", 0); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_2/main_5.c b/0x10-variadic_functions/tests/task_2/main_5.c new file mode 100644 index 00000000..0b1da1df --- /dev/null +++ b/0x10-variadic_functions/tests/task_2/main_5.c @@ -0,0 +1,13 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_strings("; ", 4, "You know", "", "nothing", NULL); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_3/3-main.c b/0x10-variadic_functions/tests/task_3/3-main.c new file mode 100644 index 00000000..ceaafce4 --- /dev/null +++ b/0x10-variadic_functions/tests/task_3/3-main.c @@ -0,0 +1,12 @@ +#include "variadic_functions.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_all("ceis", 'B', 3, "stSchool"); + return (0); +} \ No newline at end of file diff --git a/0x10-variadic_functions/tests/task_3/main_0.c b/0x10-variadic_functions/tests/task_3/main_0.c new file mode 100644 index 00000000..13e5205a --- /dev/null +++ b/0x10-variadic_functions/tests/task_3/main_0.c @@ -0,0 +1,13 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_all("fcsi", 3.14435, 'H', "#Cisfun", 0); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_3/main_1.c b/0x10-variadic_functions/tests/task_3/main_1.c new file mode 100644 index 00000000..926ee57d --- /dev/null +++ b/0x10-variadic_functions/tests/task_3/main_1.c @@ -0,0 +1,13 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_all("mnbvfqcepolsbxzi", 3.14435, 'H', "#Cisfun", 0); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_3/main_2.c b/0x10-variadic_functions/tests/task_3/main_2.c new file mode 100644 index 00000000..0e9a2706 --- /dev/null +++ b/0x10-variadic_functions/tests/task_3/main_2.c @@ -0,0 +1,13 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_all("qwertyuopadghjklzxvbnm"); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_3/main_3.c b/0x10-variadic_functions/tests/task_3/main_3.c new file mode 100644 index 00000000..8e9efb11 --- /dev/null +++ b/0x10-variadic_functions/tests/task_3/main_3.c @@ -0,0 +1,13 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_all(""); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_3/main_4.c b/0x10-variadic_functions/tests/task_3/main_4.c new file mode 100644 index 00000000..b8eec613 --- /dev/null +++ b/0x10-variadic_functions/tests/task_3/main_4.c @@ -0,0 +1,13 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_all(NULL); + return (0); +} diff --git a/0x10-variadic_functions/tests/task_3/main_5.c b/0x10-variadic_functions/tests/task_3/main_5.c new file mode 100644 index 00000000..4f89ded4 --- /dev/null +++ b/0x10-variadic_functions/tests/task_3/main_5.c @@ -0,0 +1,13 @@ +#include +#include "variadic_functions.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_all("fcsi", 3.14435, 'H', NULL, 402); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_0/0-main.c b/0x12-singly_linked_lists/tests/task_0/0-main.c new file mode 100644 index 00000000..048e62cb --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_0/0-main.c @@ -0,0 +1,40 @@ +#include +#include +#include +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + list_t *new; + list_t hello = {"World", 5, NULL}; + size_t n; + + head = &hello; + new = malloc(sizeof(list_t)); + if (new == NULL) + { + printf("Error\n"); + return (1); + } + new->str = strdup("Hello"); + new->len = 5; + new->next = head; + head = new; + n = print_list(head); + printf("-> %lu elements\n", n); + + printf("\n"); + free(new->str); + new->str = NULL; + n = print_list(head); + printf("-> %lu elements\n", n); + + free(new); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_0/main_0.c b/0x12-singly_linked_lists/tests/task_0/main_0.c new file mode 100644 index 00000000..0a0a4771 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_0/main_0.c @@ -0,0 +1,19 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t head = {"Best", 4, 0}; + list_t tail = {"School", 6, 0}; + size_t n; + + head.next = &tail; + n = print_list(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_0/main_1.c b/0x12-singly_linked_lists/tests/task_0/main_1.c new file mode 100644 index 00000000..6c452453 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_0/main_1.c @@ -0,0 +1,17 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t head = {"Best", 4, 0}; + size_t n; + + n = print_list(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_0/main_2.c b/0x12-singly_linked_lists/tests/task_0/main_2.c new file mode 100644 index 00000000..888e9356 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_0/main_2.c @@ -0,0 +1,116 @@ +#include +#include +#include +#include "lists.h" + +/** + * _strlen_ - String length + * + * @s: The string to be measured + * + * Return: The length of @s + */ +unsigned int _strlen_(const char *s) +{ + unsigned int l; + + l = 0; + while (s && s[l]) + ++l; + return (l); +} + +/** + * _strdup_ - Duplicates a string + * + * @str: The string to be duplicated + * + * Return: The ducplicated string + */ +char *_strdup_(const char *str) +{ + char *s; + int len; + + len = _strlen_(str); + s = malloc(sizeof(*s) * (len + 1)); + if (!s) + return (NULL); + while (len >= 0) + { + s[len] = str[len]; + --len; + } + return (s); +} + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +list_t *_create_list(unsigned int n, ...) +{ + va_list args; + list_t *list; + list_t *tmp; + list_t *prev; + unsigned int i; + char *str; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + str = va_arg(args, char *); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->str = _strdup_(str); + tmp->len = _strlen_(str); + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_list - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_list(list_t *list) +{ + if (list) + { + _free_list(list->next); + free(list->str); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *list; + size_t n; + + list = _create_list(130, "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Technologic", "Technologic", "Technologic", "Technologic", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic"); + n = print_list(list); + printf("-> %lu elements\n", n); + _free_list(list); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_0/main_3.c b/0x12-singly_linked_lists/tests/task_0/main_3.c new file mode 100644 index 00000000..ef449524 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_0/main_3.c @@ -0,0 +1,19 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t head = {"", 0, 0}; + list_t tail = {"School", 6, 0}; + size_t n; + + head.next = &tail; + n = print_list(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_0/main_4.c b/0x12-singly_linked_lists/tests/task_0/main_4.c new file mode 100644 index 00000000..40080c0c --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_0/main_4.c @@ -0,0 +1,16 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + size_t n; + + n = print_list(NULL); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_0/main_5.c b/0x12-singly_linked_lists/tests/task_0/main_5.c new file mode 100644 index 00000000..eac6efba --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_0/main_5.c @@ -0,0 +1,19 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t head = {NULL, 0, 0}; + list_t tail = {"School", 6, 0}; + size_t n; + + head.next = &tail; + n = print_list(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_1/1-main.c b/0x12-singly_linked_lists/tests/task_1/1-main.c new file mode 100644 index 00000000..be201426 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_1/1-main.c @@ -0,0 +1,34 @@ +#include +#include +#include +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + list_t *new; + list_t hello = {"World", 5, NULL}; + size_t n; + + head = &hello; + new = malloc(sizeof(list_t)); + if (new == NULL) + { + printf("Error\n"); + return (1); + } + new->str = strdup("Hello"); + new->len = 5; + new->next = head; + head = new; + n = list_len(head); + printf("-> %lu elements\n", n); + free(new->str); + free(new); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_1/main_0.c b/0x12-singly_linked_lists/tests/task_1/main_0.c new file mode 100644 index 00000000..e1303b56 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_1/main_0.c @@ -0,0 +1,19 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t head = {"Best", 4, 0}; + list_t tail = {"School", 6, 0}; + size_t n; + + head.next = &tail; + n = list_len(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_1/main_1.c b/0x12-singly_linked_lists/tests/task_1/main_1.c new file mode 100644 index 00000000..f2d186c1 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_1/main_1.c @@ -0,0 +1,17 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t head = {"Best", 4, 0}; + size_t n; + + n = list_len(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_1/main_2.c b/0x12-singly_linked_lists/tests/task_1/main_2.c new file mode 100644 index 00000000..0eea1927 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_1/main_2.c @@ -0,0 +1,116 @@ +#include +#include +#include +#include "lists.h" + +/** + * _strlen_ - String length + * + * @s: The string to be measured + * + * Return: The length of @s + */ +unsigned int _strlen_(const char *s) +{ + unsigned int l; + + l = 0; + while (s && s[l]) + ++l; + return (l); +} + +/** + * _strdup_ - Duplicates a string + * + * @str: The string to be duplicated + * + * Return: The ducplicated string + */ +char *_strdup_(const char *str) +{ + char *s; + int len; + + len = _strlen_(str); + s = malloc(sizeof(*s) * (len + 1)); + if (!s) + return (NULL); + while (len >= 0) + { + s[len] = str[len]; + --len; + } + return (s); +} + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +list_t *_create_list(unsigned int n, ...) +{ + va_list args; + list_t *list; + list_t *tmp; + list_t *prev; + unsigned int i; + char *str; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + str = va_arg(args, char *); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->str = _strdup_(str); + tmp->len = _strlen_(str); + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_list - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_list(list_t *list) +{ + if (list) + { + _free_list(list->next); + free(list->str); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *list; + size_t n; + + list = _create_list(130, "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Technologic", "Technologic", "Technologic", "Technologic", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic"); + n = list_len(list); + printf("-> %lu elements\n", n); + _free_list(list); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_1/main_3.c b/0x12-singly_linked_lists/tests/task_1/main_3.c new file mode 100644 index 00000000..6a5251d0 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_1/main_3.c @@ -0,0 +1,19 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t head = {"", 0, 0}; + list_t tail = {"School", 6, 0}; + size_t n; + + head.next = &tail; + n = list_len(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_1/main_4.c b/0x12-singly_linked_lists/tests/task_1/main_4.c new file mode 100644 index 00000000..0627fe62 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_1/main_4.c @@ -0,0 +1,16 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + size_t n; + + n = list_len(NULL); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_2/2-main.c b/0x12-singly_linked_lists/tests/task_2/2-main.c new file mode 100644 index 00000000..b266677e --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_2/2-main.c @@ -0,0 +1,45 @@ +#include +#include +#include +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + head = NULL; + add_node(&head, "Alexandro"); + add_node(&head, "Asaia"); + add_node(&head, "Augustin"); + add_node(&head, "Bennett"); + add_node(&head, "Bilal"); + add_node(&head, "Chandler"); + add_node(&head, "Damian"); + add_node(&head, "Daniel"); + add_node(&head, "Dora"); + add_node(&head, "Electra"); + add_node(&head, "Gloria"); + add_node(&head, "Joe"); + add_node(&head, "John"); + add_node(&head, "John"); + add_node(&head, "Josquin"); + add_node(&head, "Kris"); + add_node(&head, "Marine"); + add_node(&head, "Mason"); + add_node(&head, "Praylin"); + add_node(&head, "Rick"); + add_node(&head, "Rick"); + add_node(&head, "Rona"); + add_node(&head, "Siphan"); + add_node(&head, "Sravanthi"); + add_node(&head, "Steven"); + add_node(&head, "Tasneem"); + add_node(&head, "William"); + add_node(&head, "Zee"); + print_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_2/main_0.c b/0x12-singly_linked_lists/tests/task_2/main_0.c new file mode 100644 index 00000000..be3436a0 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_2/main_0.c @@ -0,0 +1,58 @@ +#include +#include +#include "lists.h" + +/** + * _free_list - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_list(list_t *head) +{ + if (head) + { + _free_list(head->next); + if (head->str) + free(head->str); + free(head); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + char *strings[3] = { + "Best", + "School", + NULL + }; + list_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; strings[i]; ++i) + { + ptr = add_node(&head, strings[i]); + if (!ptr || !ptr->str) + { + printf("Failed\n"); + _free_list(head); + return (1); + } + if (ptr->str == strings[i]) + { + printf("A copy of the string should be stored\n"); + return (1); + } + } + n = print_list(head); + printf("-> %lu elements\n", n); + _free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_2/main_1.c b/0x12-singly_linked_lists/tests/task_2/main_1.c new file mode 100644 index 00000000..4555b801 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_2/main_1.c @@ -0,0 +1,57 @@ +#include +#include +#include "lists.h" + +/** + * _free_list - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_list(list_t *head) +{ + if (head) + { + _free_list(head->next); + if (head->str) + free(head->str); + free(head); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + char *strings[2] = { + "Best", + NULL + }; + list_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; strings[i]; ++i) + { + ptr = add_node(&head, strings[i]); + if (!ptr || !ptr->str) + { + printf("Failed\n"); + _free_list(head); + return (1); + } + if (ptr->str == strings[i]) + { + printf("A copy of the string should be stored\n"); + return (1); + } + } + n = print_list(head); + printf("-> %lu elements\n", n); + _free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_2/main_2.c b/0x12-singly_linked_lists/tests/task_2/main_2.c new file mode 100644 index 00000000..8db3e709 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_2/main_2.c @@ -0,0 +1,57 @@ +#include +#include +#include "lists.h" + +/** + * _free_list - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_list(list_t *head) +{ + if (head) + { + _free_list(head->next); + if (head->str) + free(head->str); + free(head); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + char *strings[131] = { + "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Technologic", "Technologic", "Technologic", "Technologic", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", + NULL + }; + list_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; strings[i]; ++i) + { + ptr = add_node(&head, strings[i]); + if (!ptr || !ptr->str) + { + printf("Failed\n"); + _free_list(head); + return (1); + } + if (ptr->str == strings[i]) + { + printf("A copy of the string should be stored\n"); + return (1); + } + } + n = print_list(head); + printf("-> %lu elements\n", n); + _free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_2/main_3.c b/0x12-singly_linked_lists/tests/task_2/main_3.c new file mode 100644 index 00000000..62164a91 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_2/main_3.c @@ -0,0 +1,58 @@ +#include +#include +#include "lists.h" + +/** + * _free_list - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_list(list_t *head) +{ + if (head) + { + _free_list(head->next); + if (head->str) + free(head->str); + free(head); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + char *strings[3] = { + "", + "School", + NULL + }; + list_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; strings[i]; ++i) + { + ptr = add_node(&head, strings[i]); + if (!ptr || !ptr->str) + { + printf("Failed\n"); + _free_list(head); + return (1); + } + if (ptr->str == strings[i]) + { + printf("A copy of the string should be stored\n"); + return (1); + } + } + n = print_list(head); + printf("-> %lu elements\n", n); + _free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_3/3-main.c b/0x12-singly_linked_lists/tests/task_3/3-main.c new file mode 100644 index 00000000..9b0a00b4 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_3/3-main.c @@ -0,0 +1,46 @@ +#include +#include +#include +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + + head = NULL; + add_node_end(&head, "Anne"); + add_node_end(&head, "Colton"); + add_node_end(&head, "Corbin"); + add_node_end(&head, "Daniel"); + add_node_end(&head, "Danton"); + add_node_end(&head, "David"); + add_node_end(&head, "Gary"); + add_node_end(&head, "Holden"); + add_node_end(&head, "Ian"); + add_node_end(&head, "Ian"); + add_node_end(&head, "Jay"); + add_node_end(&head, "Jennie"); + add_node_end(&head, "Jimmy"); + add_node_end(&head, "Justin"); + add_node_end(&head, "Kalson"); + add_node_end(&head, "Kina"); + add_node_end(&head, "Matthew"); + add_node_end(&head, "Max"); + add_node_end(&head, "Michael"); + add_node_end(&head, "Ntuj"); + add_node_end(&head, "Philip"); + add_node_end(&head, "Richard"); + add_node_end(&head, "Samantha"); + add_node_end(&head, "Stuart"); + add_node_end(&head, "Swati"); + add_node_end(&head, "Timothy"); + add_node_end(&head, "Victor"); + add_node_end(&head, "Walton"); + print_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_3/main_0.c b/0x12-singly_linked_lists/tests/task_3/main_0.c new file mode 100644 index 00000000..ee6a232e --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_3/main_0.c @@ -0,0 +1,58 @@ +#include +#include +#include "lists.h" + +/** + * _free_list - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_list(list_t *head) +{ + if (head) + { + _free_list(head->next); + if (head->str) + free(head->str); + free(head); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + char *strings[3] = { + "Best", + "School", + NULL + }; + list_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; strings[i]; ++i) + { + ptr = add_node_end(&head, strings[i]); + if (!ptr || !ptr->str) + { + printf("Failed\n"); + _free_list(head); + return (1); + } + if (ptr->str == strings[i]) + { + printf("A copy of the string should be stored\n"); + return (1); + } + } + n = print_list(head); + printf("-> %lu elements\n", n); + _free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_3/main_1.c b/0x12-singly_linked_lists/tests/task_3/main_1.c new file mode 100644 index 00000000..2332c62c --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_3/main_1.c @@ -0,0 +1,57 @@ +#include +#include +#include "lists.h" + +/** + * _free_list - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_list(list_t *head) +{ + if (head) + { + _free_list(head->next); + if (head->str) + free(head->str); + free(head); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + char *strings[2] = { + "Best", + NULL + }; + list_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; strings[i]; ++i) + { + ptr = add_node_end(&head, strings[i]); + if (!ptr || !ptr->str) + { + printf("Failed\n"); + _free_list(head); + return (1); + } + if (ptr->str == strings[i]) + { + printf("A copy of the string should be stored\n"); + return (1); + } + } + n = print_list(head); + printf("-> %lu elements\n", n); + _free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_3/main_2.c b/0x12-singly_linked_lists/tests/task_3/main_2.c new file mode 100644 index 00000000..a0650a79 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_3/main_2.c @@ -0,0 +1,57 @@ +#include +#include +#include "lists.h" + +/** + * _free_list - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_list(list_t *head) +{ + if (head) + { + _free_list(head->next); + if (head->str) + free(head->str); + free(head); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + char *strings[131] = { + "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Technologic", "Technologic", "Technologic", "Technologic", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", + NULL + }; + list_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; strings[i]; ++i) + { + ptr = add_node_end(&head, strings[i]); + if (!ptr || !ptr->str) + { + printf("Failed\n"); + _free_list(head); + return (1); + } + if (ptr->str == strings[i]) + { + printf("A copy of the string should be stored\n"); + return (1); + } + } + n = print_list(head); + printf("-> %lu elements\n", n); + _free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_3/main_3.c b/0x12-singly_linked_lists/tests/task_3/main_3.c new file mode 100644 index 00000000..b0515dbd --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_3/main_3.c @@ -0,0 +1,58 @@ +#include +#include +#include "lists.h" + +/** + * _free_list - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_list(list_t *head) +{ + if (head) + { + _free_list(head->next); + if (head->str) + free(head->str); + free(head); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + char *strings[3] = { + "", + "School", + NULL + }; + list_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; strings[i]; ++i) + { + ptr = add_node_end(&head, strings[i]); + if (!ptr || !ptr->str) + { + printf("Failed\n"); + _free_list(head); + return (1); + } + if (ptr->str == strings[i]) + { + printf("A copy of the string should be stored\n"); + return (1); + } + } + n = print_list(head); + printf("-> %lu elements\n", n); + _free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_4/4-main.c b/0x12-singly_linked_lists/tests/task_4/4-main.c new file mode 100644 index 00000000..deac0222 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_4/4-main.c @@ -0,0 +1,25 @@ +#include +#include +#include +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + + head = NULL; + add_node_end(&head, "Bob"); + add_node_end(&head, "&"); + add_node_end(&head, "Kris"); + add_node_end(&head, "love"); + add_node_end(&head, "asm"); + print_list(head); + free_list(head); + head = NULL; + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_4/main_0.c b/0x12-singly_linked_lists/tests/task_4/main_0.c new file mode 100644 index 00000000..afa3444e --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_4/main_0.c @@ -0,0 +1,101 @@ +#include +#include +#include +#include "lists.h" + +/** + * _strlen_ - String length + * + * @s: The string to be measured + * + * Return: The length of @s + */ +unsigned int _strlen_(const char *s) +{ + unsigned int l; + + l = 0; + while (s && s[l]) + ++l; + return (l); +} + +/** + * _strdup_ - Duplicates a string + * + * @str: The string to be duplicated + * + * Return: The ducplicated string + */ +char *_strdup_(const char *str) +{ + char *s; + int len; + + len = _strlen_(str); + s = malloc(sizeof(*s) * (len + 1)); + if (!s) + return (NULL); + while (len >= 0) + { + s[len] = str[len]; + --len; + } + return (s); +} + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +list_t *_create_list(unsigned int n, ...) +{ + va_list args; + list_t *list; + list_t *tmp; + list_t *prev; + unsigned int i; + char *str; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + str = va_arg(args, char *); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->str = _strdup_(str); + tmp->len = _strlen_(str); + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + size_t n; + + head = _create_list(2, "Best", "School"); + n = print_list(head); + printf("-> %lu elements\n", n); + free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_4/main_1.c b/0x12-singly_linked_lists/tests/task_4/main_1.c new file mode 100644 index 00000000..75173b52 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_4/main_1.c @@ -0,0 +1,101 @@ +#include +#include +#include +#include "lists.h" + +/** + * _strlen_ - String length + * + * @s: The string to be measured + * + * Return: The length of @s + */ +unsigned int _strlen_(const char *s) +{ + unsigned int l; + + l = 0; + while (s && s[l]) + ++l; + return (l); +} + +/** + * _strdup_ - Duplicates a string + * + * @str: The string to be duplicated + * + * Return: The ducplicated string + */ +char *_strdup_(const char *str) +{ + char *s; + int len; + + len = _strlen_(str); + s = malloc(sizeof(*s) * (len + 1)); + if (!s) + return (NULL); + while (len >= 0) + { + s[len] = str[len]; + --len; + } + return (s); +} + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +list_t *_create_list(unsigned int n, ...) +{ + va_list args; + list_t *list; + list_t *tmp; + list_t *prev; + unsigned int i; + char *str; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + str = va_arg(args, char *); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->str = _strdup_(str); + tmp->len = _strlen_(str); + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + size_t n; + + head = _create_list(1, "Best"); + n = print_list(head); + printf("-> %lu elements\n", n); + free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_4/main_2.c b/0x12-singly_linked_lists/tests/task_4/main_2.c new file mode 100644 index 00000000..7492c5c9 --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_4/main_2.c @@ -0,0 +1,101 @@ +#include +#include +#include +#include "lists.h" + +/** + * _strlen_ - String length + * + * @s: The string to be measured + * + * Return: The length of @s + */ +unsigned int _strlen_(const char *s) +{ + unsigned int l; + + l = 0; + while (s && s[l]) + ++l; + return (l); +} + +/** + * _strdup_ - Duplicates a string + * + * @str: The string to be duplicated + * + * Return: The ducplicated string + */ +char *_strdup_(const char *str) +{ + char *s; + int len; + + len = _strlen_(str); + s = malloc(sizeof(*s) * (len + 1)); + if (!s) + return (NULL); + while (len >= 0) + { + s[len] = str[len]; + --len; + } + return (s); +} + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +list_t *_create_list(unsigned int n, ...) +{ + va_list args; + list_t *list; + list_t *tmp; + list_t *prev; + unsigned int i; + char *str; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + str = va_arg(args, char *); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->str = _strdup_(str); + tmp->len = _strlen_(str); + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + size_t n; + + head = _create_list(130, "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Technologic", "Technologic", "Technologic", "Technologic", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it,", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it", "Buy it, use it, break it, fix it,", "Trash it, change it, mail - upgrade it,", "Charge it, point it, zoom it, press it,", "Snap it, work it, quick - erase it,", "Write it, cut it, paste it, save it,", "Load it, check it, quick - rewrite it,", "Plug it, play it, burn it, rip it,", "Drag and drop it, zip - unzip it", "Lock it, fill it, call it, find it,", "View it, code it, jam - unlock it,", "Surf it, scroll it, pause it, click it,", "Cross it, crack it, switch - update it,", "Name it, rate it, tune it, print it,", "Scan it, send it, fax - rename it,", "Touch it, bring it, pay it, watch it,", "Turn it, leave it, start - format it.", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic", "Technologic"); + n = print_list(head); + printf("-> %lu elements\n", n); + free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_4/main_3.c b/0x12-singly_linked_lists/tests/task_4/main_3.c new file mode 100644 index 00000000..fbaeee6a --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_4/main_3.c @@ -0,0 +1,104 @@ +#include +#include +#include +#include "lists.h" + +/** + * _strlen_ - String length + * + * @s: The string to be measured + * + * Return: The length of @s + */ +unsigned int _strlen_(const char *s) +{ + unsigned int l; + + l = 0; + while (s && s[l]) + ++l; + return (l); +} + +/** + * _strdup_ - Duplicates a string + * + * @str: The string to be duplicated + * + * Return: The ducplicated string + */ +char *_strdup_(const char *str) +{ + char *s; + int len; + + len = _strlen_(str); + s = malloc(sizeof(*s) * (len + 1)); + if (!s) + return (NULL); + while (len >= 0) + { + s[len] = str[len]; + --len; + } + return (s); +} + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +list_t *_create_list(unsigned int n, ...) +{ + va_list args; + list_t *list; + list_t *tmp; + list_t *prev; + unsigned int i; + char *str; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + str = va_arg(args, char *); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->str = _strdup_(str); + tmp->len = _strlen_(str); + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + list_t *head; + size_t n; + + head = _create_list(2, "Best", "School"); + free(head->str); + head->str = NULL; + head->len = 0; + n = print_list(head); + printf("-> %lu elements\n", n); + free_list(head); + return (0); +} diff --git a/0x12-singly_linked_lists/tests/task_4/main_4.c b/0x12-singly_linked_lists/tests/task_4/main_4.c new file mode 100644 index 00000000..b2c0f07c --- /dev/null +++ b/0x12-singly_linked_lists/tests/task_4/main_4.c @@ -0,0 +1,15 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + free_list(NULL); + printf("Freed !\n"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_0/0-main.c b/0x13-more_singly_linked_lists/tests/task_0/0-main.c new file mode 100644 index 00000000..2bc95b81 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_0/0-main.c @@ -0,0 +1,29 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *new; + listint_t hello = {8, NULL}; + size_t n; + + head = &hello; + new = malloc(sizeof(listint_t)); + if (new == NULL) + { + printf("Error\n"); + return (1); + } + new->n = 9; + new->next = head; + head = new; + n = print_listint(head); + printf("-> %lu elements\n", n); + free(new); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_0/main_0.c b/0x13-more_singly_linked_lists/tests/task_0/main_0.c new file mode 100644 index 00000000..1b9ca60f --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_0/main_0.c @@ -0,0 +1,19 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t head = {9, 0}; + listint_t tail = {6, 0}; + size_t n; + + head.next = &tail; + n = print_listint(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_0/main_1.c b/0x13-more_singly_linked_lists/tests/task_0/main_1.c new file mode 100644 index 00000000..52c1aec5 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_0/main_1.c @@ -0,0 +1,17 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t head = {9, 0}; + size_t n; + + n = print_listint(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_0/main_2.c b/0x13-more_singly_linked_lists/tests/task_0/main_2.c new file mode 100644 index 00000000..c8b56751 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_0/main_2.c @@ -0,0 +1,73 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *list; + size_t n; + + list = _create_list(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + n = print_listint(list); + printf("-> %lu elements\n", n); + _free_listint(list); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_0/main_3.c b/0x13-more_singly_linked_lists/tests/task_0/main_3.c new file mode 100644 index 00000000..833db7f9 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_0/main_3.c @@ -0,0 +1,19 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t head = {-12, 0}; + listint_t tail = {6, 0}; + size_t n; + + head.next = &tail; + n = print_listint(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_0/main_4.c b/0x13-more_singly_linked_lists/tests/task_0/main_4.c new file mode 100644 index 00000000..61e8f886 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_0/main_4.c @@ -0,0 +1,16 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + size_t n; + + n = print_listint(NULL); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_1/1-main.c b/0x13-more_singly_linked_lists/tests/task_1/1-main.c new file mode 100644 index 00000000..b6c361db --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_1/1-main.c @@ -0,0 +1,29 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *new; + listint_t hello = {8, NULL}; + size_t n; + + head = &hello; + new = malloc(sizeof(listint_t)); + if (new == NULL) + { + printf("Error\n"); + return (1); + } + new->n = 9; + new->next = head; + head = new; + n = listint_len(head); + printf("-> %lu elements\n", n); + free(new); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_1/main_0.c b/0x13-more_singly_linked_lists/tests/task_1/main_0.c new file mode 100644 index 00000000..36a3fd7c --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_1/main_0.c @@ -0,0 +1,19 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t head = {9, 0}; + listint_t tail = {6, 0}; + size_t n; + + head.next = &tail; + n = listint_len(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_1/main_1.c b/0x13-more_singly_linked_lists/tests/task_1/main_1.c new file mode 100644 index 00000000..a69960d1 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_1/main_1.c @@ -0,0 +1,17 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t head = {9, 0}; + size_t n; + + n = listint_len(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_1/main_2.c b/0x13-more_singly_linked_lists/tests/task_1/main_2.c new file mode 100644 index 00000000..17afe0f5 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_1/main_2.c @@ -0,0 +1,73 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *list; + size_t n; + + list = _create_list(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + n = listint_len(list); + printf("-> %lu elements\n", n); + _free_listint(list); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_1/main_3.c b/0x13-more_singly_linked_lists/tests/task_1/main_3.c new file mode 100644 index 00000000..bb4407ec --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_1/main_3.c @@ -0,0 +1,19 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t head = {12, 0}; + listint_t tail = {6, 0}; + size_t n; + + head.next = &tail; + n = listint_len(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_1/main_4.c b/0x13-more_singly_linked_lists/tests/task_1/main_4.c new file mode 100644 index 00000000..5596e559 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_1/main_4.c @@ -0,0 +1,16 @@ +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + size_t n; + + n = listint_len(NULL); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_10/10-main.c b/0x13-more_singly_linked_lists/tests/task_10/10-main.c new file mode 100644 index 00000000..5731d0aa --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_10/10-main.c @@ -0,0 +1,65 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = NULL; + add_nodeint_end(&head, 0); + add_nodeint_end(&head, 1); + add_nodeint_end(&head, 2); + add_nodeint_end(&head, 3); + add_nodeint_end(&head, 4); + add_nodeint_end(&head, 98); + add_nodeint_end(&head, 402); + add_nodeint_end(&head, 1024); + print_listint(head); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 5); + print_listint(head); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + print_listint(head); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + print_listint(head); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + print_listint(head); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + print_listint(head); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + print_listint(head); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + print_listint(head); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_nodeint_at_index(&head, 0); + print_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_10/main_0.c b/0x13-more_singly_linked_lists/tests/task_10/main_0.c new file mode 100644 index 00000000..28f77340 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_10/main_0.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = _create_list(2, 9, 6); + n = delete_nodeint_at_index(&head, 0); + printf("-> %d\n", n); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_10/main_1.c b/0x13-more_singly_linked_lists/tests/task_10/main_1.c new file mode 100644 index 00000000..301478a2 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_10/main_1.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = _create_list(1, 9); + n = delete_nodeint_at_index(&head, 10); + printf("-> %d\n", n); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_10/main_2.c b/0x13-more_singly_linked_lists/tests/task_10/main_2.c new file mode 100644 index 00000000..4662669f --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_10/main_2.c @@ -0,0 +1,78 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + int i; + + head = _create_list(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + for (i = 0; i < 10; ++i) + { + n = delete_nodeint_at_index(&head, i * 10); + printf("-> %d\n", n); + } + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_10/main_3.c b/0x13-more_singly_linked_lists/tests/task_10/main_3.c new file mode 100644 index 00000000..0d56cd2b --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_10/main_3.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = _create_list(2, -12, 6); + n = delete_nodeint_at_index(&head, 1); + printf("-> %d\n", n); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_10/main_4.c b/0x13-more_singly_linked_lists/tests/task_10/main_4.c new file mode 100644 index 00000000..e6ea11a7 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_10/main_4.c @@ -0,0 +1,19 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = NULL; + n = delete_nodeint_at_index(&head, 0); + printf("-> %d\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_11/main_0.c b/0x13-more_singly_linked_lists/tests/task_11/main_0.c new file mode 100644 index 00000000..6f18bf5a --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_11/main_0.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = _create_list(2, 9, 6); + head = reverse_listint(&head); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_11/main_1.c b/0x13-more_singly_linked_lists/tests/task_11/main_1.c new file mode 100644 index 00000000..29aba63d --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_11/main_1.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = _create_list(1, 9); + head = reverse_listint(&head); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_11/main_2.c b/0x13-more_singly_linked_lists/tests/task_11/main_2.c new file mode 100644 index 00000000..a8f3dca2 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_11/main_2.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = _create_list(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + head = reverse_listint(&head); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_11/main_3.c b/0x13-more_singly_linked_lists/tests/task_11/main_3.c new file mode 100644 index 00000000..49d0afb1 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_11/main_3.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = _create_list(2, -12, 6); + head = reverse_listint(&head); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_11/main_4.c b/0x13-more_singly_linked_lists/tests/task_11/main_4.c new file mode 100644 index 00000000..c2f60d5c --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_11/main_4.c @@ -0,0 +1,18 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = NULL; + head = reverse_listint(&head); + printf("%s\n", head == NULL ? "Ok !" : "Failed !"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_12/main_0.c b/0x13-more_singly_linked_lists/tests/task_12/main_0.c new file mode 100644 index 00000000..fe980f01 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_12/main_0.c @@ -0,0 +1,47 @@ +#include +#include +#include +#include "lists.h" + +size_t _free_listint_safe(listint_t **); + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node; + size_t n; + + head = NULL; + node = _add_node(&head, 9); + node->next = _add_node(&head, 6); + n = print_listint_safe(head); + printf("%lu\n", n); + _free_listint_safe(&head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_12/main_1.c b/0x13-more_singly_linked_lists/tests/task_12/main_1.c new file mode 100644 index 00000000..09488f7e --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_12/main_1.c @@ -0,0 +1,47 @@ +#include +#include +#include +#include "lists.h" + +size_t _free_listint_safe(listint_t **); + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node; + size_t n; + + head = NULL; + node = _add_node(&head, 9); + node->next = node; + n = print_listint_safe(head); + printf("%lu\n", n); + _free_listint_safe(&head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_12/main_2.c b/0x13-more_singly_linked_lists/tests/task_12/main_2.c new file mode 100644 index 00000000..6592f43d --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_12/main_2.c @@ -0,0 +1,59 @@ +#include +#include +#include +#include "lists.h" + +size_t _free_listint_safe(listint_t **); + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node; + size_t n; + int values[150] = { + 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861 + }; + int i; + + head = NULL; + node = _add_node(&head, values[0]); + for (i = 1; i < 120; ++i) + { + _add_node(&head, values[i]); + } + node->next = _add_node(&head, values[i]); + for (i = i + 1; i < 150; ++i) + { + _add_node(&head, values[i]); + } + n = print_listint_safe(head); + printf("%lu\n", n); + _free_listint_safe(&head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_12/main_3.c b/0x13-more_singly_linked_lists/tests/task_12/main_3.c new file mode 100644 index 00000000..01b30a17 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_12/main_3.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include "lists.h" + +size_t _free_listint_safe(listint_t **); + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + size_t n; + int values[150] = { + 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861 + }; + int i; + + head = NULL; + for (i = 0; i < 150; ++i) + { + _add_node(&head, values[i]); + } + n = print_listint_safe(head); + printf("%lu\n", n); + _free_listint_safe(&head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_12/main_4.c b/0x13-more_singly_linked_lists/tests/task_12/main_4.c new file mode 100644 index 00000000..c8ceb0da --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_12/main_4.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + size_t n; + + n = print_listint_safe(NULL); + printf("%lu\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_12/main_5.c b/0x13-more_singly_linked_lists/tests/task_12/main_5.c new file mode 100644 index 00000000..4db75864 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_12/main_5.c @@ -0,0 +1,62 @@ +#include +#include +#include +#include "lists.h" + +size_t _free_listint_safe(listint_t **); + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node1; + listint_t *node2; + listint_t *node3; + listint_t *node4; + listint_t *node5; + size_t n; + + head = NULL; + /* 1 -> 4 -> 3 -> 2 -> 5 -> (3) */ + node5 = _add_node(&head, 5); + node4 = _add_node(&head, 4); + node3 = _add_node(&head, 3); + node2 = _add_node(&head, 2); + node1 = _add_node(&head, 1); + + node1->next = node4; + node4->next = node3; + node3->next = node2; + node2->next = node5; + node5->next = node3; + + n = print_listint_safe(head); + printf("%lu\n", n); + _free_listint_safe(&head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_13/main_0.c b/0x13-more_singly_linked_lists/tests/task_13/main_0.c new file mode 100644 index 00000000..db662f01 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_13/main_0.c @@ -0,0 +1,45 @@ +#include +#include +#include +#include "lists.h" + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node; + size_t n; + + head = NULL; + node = _add_node(&head, 9); + node->next = _add_node(&head, 6); + print_listint_safe(head); + n = free_listint_safe(&head); + printf("%lu\n%p\n", n, (void *)head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_13/main_1.c b/0x13-more_singly_linked_lists/tests/task_13/main_1.c new file mode 100644 index 00000000..115097ad --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_13/main_1.c @@ -0,0 +1,45 @@ +#include +#include +#include +#include "lists.h" + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node; + size_t n; + + head = NULL; + node = _add_node(&head, 9); + node->next = node; + print_listint_safe(head); + n = free_listint_safe(&head); + printf("%lu\n%p\n", n, (void *)head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_13/main_2.c b/0x13-more_singly_linked_lists/tests/task_13/main_2.c new file mode 100644 index 00000000..df0c8649 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_13/main_2.c @@ -0,0 +1,57 @@ +#include +#include +#include +#include "lists.h" + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node; + size_t n; + int values[150] = { + 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861 + }; + int i; + + head = NULL; + node = _add_node(&head, values[0]); + for (i = 1; i < 120; ++i) + { + _add_node(&head, values[i]); + } + node->next = _add_node(&head, values[i]); + for (i = i + 1; i < 150; ++i) + { + _add_node(&head, values[i]); + } + print_listint_safe(head); + n = free_listint_safe(&head); + printf("%lu\n%p\n", n, (void *)head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_13/main_3.c b/0x13-more_singly_linked_lists/tests/task_13/main_3.c new file mode 100644 index 00000000..5fd57808 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_13/main_3.c @@ -0,0 +1,50 @@ +#include +#include +#include +#include "lists.h" + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + size_t n; + int values[150] = { + 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861 + }; + int i; + + head = NULL; + for (i = 0; i < 150; ++i) + { + _add_node(&head, values[i]); + } + print_listint_safe(head); + n = free_listint_safe(&head); + printf("%lu\n%p\n", n, (void *)head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_13/main_4.c b/0x13-more_singly_linked_lists/tests/task_13/main_4.c new file mode 100644 index 00000000..7bd19225 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_13/main_4.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + size_t n; + + head = NULL; + n = free_listint_safe(&head); + printf("%lu\n%p\n", n, (void *)head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_14/main_0.c b/0x13-more_singly_linked_lists/tests/task_14/main_0.c new file mode 100644 index 00000000..23b96701 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_14/main_0.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include "lists.h" + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node; + listint_t *loop; + + head = NULL; + node = _add_node(&head, 9); + node->next = _add_node(&head, 6); + loop = find_listint_loop(head); + if (loop != node->next) + { + printf("The address returned is not the good one.\n"); + return (1); + } + if (loop) + printf("%d\n", loop->n); + else + printf("(nil)\n"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_14/main_1.c b/0x13-more_singly_linked_lists/tests/task_14/main_1.c new file mode 100644 index 00000000..ee5ca821 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_14/main_1.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include "lists.h" + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node; + listint_t *loop; + + head = NULL; + node = _add_node(&head, 9); + node->next = node; + loop = find_listint_loop(head); + if (loop != node->next) + { + printf("The address returned is not the good one.\n"); + return (1); + } + if (loop) + printf("%d\n", loop->n); + else + printf("(nil)\n"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_14/main_2.c b/0x13-more_singly_linked_lists/tests/task_14/main_2.c new file mode 100644 index 00000000..b1ee9dc7 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_14/main_2.c @@ -0,0 +1,64 @@ +#include +#include +#include +#include "lists.h" + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node; + listint_t *loop; + int values[150] = { + 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861 + }; + int i; + + head = NULL; + node = _add_node(&head, values[0]); + for (i = 1; i < 120; ++i) + { + _add_node(&head, values[i]); + } + node->next = _add_node(&head, values[i]); + for (i = i + 1; i < 150; ++i) + { + _add_node(&head, values[i]); + } + loop = find_listint_loop(head); + if (loop != node->next) + { + printf("The address returned is not the good one.\n"); + return (1); + } + if (loop) + printf("%d\n", loop->n); + else + printf("(nil)\n"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_14/main_3.c b/0x13-more_singly_linked_lists/tests/task_14/main_3.c new file mode 100644 index 00000000..529658f1 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_14/main_3.c @@ -0,0 +1,57 @@ +#include +#include +#include +#include "lists.h" + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *loop; + int values[150] = { + 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861 + }; + int i; + + head = NULL; + for (i = 0; i < 150; ++i) + { + _add_node(&head, values[i]); + } + loop = find_listint_loop(head); + if (loop != NULL) + { + printf("The address returned is not the good one.\n"); + return (1); + } + if (loop) + printf("%d\n", loop->n); + else + printf("(nil)\n"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_14/main_4.c b/0x13-more_singly_linked_lists/tests/task_14/main_4.c new file mode 100644 index 00000000..1fe02deb --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_14/main_4.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *loop; + + loop = find_listint_loop(NULL); + if (loop != NULL) + { + printf("The address returned is not the good one.\n"); + return (1); + } + if (loop) + printf("%d\n", loop->n); + else + printf("(nil)\n"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_14/main_5.c b/0x13-more_singly_linked_lists/tests/task_14/main_5.c new file mode 100644 index 00000000..8fe3c86b --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_14/main_5.c @@ -0,0 +1,92 @@ +#include +#include +#include +#include "lists.h" + +/** + * _add_node - Add a node at the beginning of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node(listint_t **head, int n) +{ + listint_t *tmp; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = *head; + *head = tmp; + return (tmp); +} + +/** + * _add_node_end - Add a node at the end of a list + * + * @head: A pointer to the first element of a list + * @n: The number to store in the new node + * + * Return: The address of the new node + */ +listint_t *_add_node_end(listint_t **head, int n) +{ + listint_t *tmp; + listint_t *hold; + + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = n; + tmp->next = NULL; + if (!*head) + { + *head = tmp; + return (tmp); + } + hold = *head; + while (hold->next) + { + hold = hold->next; + } + hold->next = tmp; + return (tmp); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *loop; + int values[150] = { + 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861 + }; + int i; + + head = NULL; + for (i = 0; i < 150; ++i) + { + if (i % 2) + _add_node(&head, values[i]); + else + _add_node_end(&head, values[i]); + } + loop = find_listint_loop(head); + if (loop != NULL) + { + printf("The address returned is not the good one.\n"); + return (1); + } + if (loop) + printf("%d\n", loop->n); + else + printf("(nil)\n"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_2/2-main.c b/0x13-more_singly_linked_lists/tests/task_2/2-main.c new file mode 100644 index 00000000..ba233219 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_2/2-main.c @@ -0,0 +1,23 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = NULL; + add_nodeint(&head, 0); + add_nodeint(&head, 1); + add_nodeint(&head, 2); + add_nodeint(&head, 3); + add_nodeint(&head, 4); + add_nodeint(&head, 98); + add_nodeint(&head, 402); + add_nodeint(&head, 1024); + print_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_2/main_0.c b/0x13-more_singly_linked_lists/tests/task_2/main_0.c new file mode 100644 index 00000000..8842c697 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_2/main_0.c @@ -0,0 +1,52 @@ +#include +#include +#include "lists.h" + +/** + * _free_listint - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_listint(listint_t *head) +{ + if (head) + { + _free_listint(head->next); + free(head); + } +} + +#define NB_VALUES 2 + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int values[NB_VALUES] = { + 9, + 6 + }; + listint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < NB_VALUES; ++i) + { + ptr = add_nodeint(&head, values[i]); + if (!ptr) + { + printf("Failed\n"); + _free_listint(head); + return (1); + } + } + n = print_listint(head); + printf("-> %lu elements\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_2/main_1.c b/0x13-more_singly_linked_lists/tests/task_2/main_1.c new file mode 100644 index 00000000..c285c89b --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_2/main_1.c @@ -0,0 +1,51 @@ +#include +#include +#include "lists.h" + +/** + * _free_listint - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_listint(listint_t *head) +{ + if (head) + { + _free_listint(head->next); + free(head); + } +} + +#define NB_VALUES 1 + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int values[NB_VALUES] = { + 9 + }; + listint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < NB_VALUES; ++i) + { + ptr = add_nodeint(&head, values[i]); + if (!ptr) + { + printf("Failed\n"); + _free_listint(head); + return (1); + } + } + n = print_listint(head); + printf("-> %lu elements\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_2/main_2.c b/0x13-more_singly_linked_lists/tests/task_2/main_2.c new file mode 100644 index 00000000..557550dd --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_2/main_2.c @@ -0,0 +1,51 @@ +#include +#include +#include "lists.h" + +/** + * _free_listint - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_listint(listint_t *head) +{ + if (head) + { + _free_listint(head->next); + free(head); + } +} + +#define NB_VALUES 150 + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int values[NB_VALUES] = { + 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861 + }; + listint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < NB_VALUES; ++i) + { + ptr = add_nodeint(&head, values[i]); + if (!ptr) + { + printf("Failed\n"); + _free_listint(head); + return (1); + } + } + n = print_listint(head); + printf("-> %lu elements\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_2/main_3.c b/0x13-more_singly_linked_lists/tests/task_2/main_3.c new file mode 100644 index 00000000..0ee5dc8a --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_2/main_3.c @@ -0,0 +1,52 @@ +#include +#include +#include "lists.h" + +/** + * _free_listint - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_listint(listint_t *head) +{ + if (head) + { + _free_listint(head->next); + free(head); + } +} + +#define NB_VALUES 2 + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int values[NB_VALUES] = { + -12, + 6, + }; + listint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < NB_VALUES; ++i) + { + ptr = add_nodeint(&head, values[i]); + if (!ptr) + { + printf("Failed\n"); + _free_listint(head); + return (1); + } + } + n = print_listint(head); + printf("-> %lu elements\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_3/3-main.c b/0x13-more_singly_linked_lists/tests/task_3/3-main.c new file mode 100644 index 00000000..0842c59a --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_3/3-main.c @@ -0,0 +1,23 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = NULL; + add_nodeint_end(&head, 0); + add_nodeint_end(&head, 1); + add_nodeint_end(&head, 2); + add_nodeint_end(&head, 3); + add_nodeint_end(&head, 4); + add_nodeint_end(&head, 98); + add_nodeint_end(&head, 402); + add_nodeint_end(&head, 1024); + print_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_3/main_0.c b/0x13-more_singly_linked_lists/tests/task_3/main_0.c new file mode 100644 index 00000000..dbf29870 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_3/main_0.c @@ -0,0 +1,52 @@ +#include +#include +#include "lists.h" + +/** + * _free_listint - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_listint(listint_t *head) +{ + if (head) + { + _free_listint(head->next); + free(head); + } +} + +#define NB_VALUES 2 + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int values[NB_VALUES] = { + 9, + 6 + }; + listint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < NB_VALUES; ++i) + { + ptr = add_nodeint_end(&head, values[i]); + if (!ptr) + { + printf("Failed\n"); + _free_listint(head); + return (1); + } + } + n = print_listint(head); + printf("-> %lu elements\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_3/main_1.c b/0x13-more_singly_linked_lists/tests/task_3/main_1.c new file mode 100644 index 00000000..833808dd --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_3/main_1.c @@ -0,0 +1,51 @@ +#include +#include +#include "lists.h" + +/** + * _free_listint - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_listint(listint_t *head) +{ + if (head) + { + _free_listint(head->next); + free(head); + } +} + +#define NB_VALUES 1 + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int values[NB_VALUES] = { + 9 + }; + listint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < NB_VALUES; ++i) + { + ptr = add_nodeint_end(&head, values[i]); + if (!ptr) + { + printf("Failed\n"); + _free_listint(head); + return (1); + } + } + n = print_listint(head); + printf("-> %lu elements\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_3/main_2.c b/0x13-more_singly_linked_lists/tests/task_3/main_2.c new file mode 100644 index 00000000..7d69823a --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_3/main_2.c @@ -0,0 +1,51 @@ +#include +#include +#include "lists.h" + +/** + * _free_listint - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_listint(listint_t *head) +{ + if (head) + { + _free_listint(head->next); + free(head); + } +} + +#define NB_VALUES 150 + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int values[NB_VALUES] = { + 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861 + }; + listint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < NB_VALUES; ++i) + { + ptr = add_nodeint_end(&head, values[i]); + if (!ptr) + { + printf("Failed\n"); + _free_listint(head); + return (1); + } + } + n = print_listint(head); + printf("-> %lu elements\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_3/main_3.c b/0x13-more_singly_linked_lists/tests/task_3/main_3.c new file mode 100644 index 00000000..8c3b3d22 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_3/main_3.c @@ -0,0 +1,52 @@ +#include +#include +#include "lists.h" + +/** + * _free_listint - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_listint(listint_t *head) +{ + if (head) + { + _free_listint(head->next); + free(head); + } +} + +#define NB_VALUES 2 + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int values[NB_VALUES] = { + -12, + 6, + }; + listint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < NB_VALUES; ++i) + { + ptr = add_nodeint_end(&head, values[i]); + if (!ptr) + { + printf("Failed\n"); + _free_listint(head); + return (1); + } + } + n = print_listint(head); + printf("-> %lu elements\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_4/4-main.c b/0x13-more_singly_linked_lists/tests/task_4/4-main.c new file mode 100644 index 00000000..47a1e733 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_4/4-main.c @@ -0,0 +1,25 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = NULL; + add_nodeint_end(&head, 0); + add_nodeint_end(&head, 1); + add_nodeint_end(&head, 2); + add_nodeint_end(&head, 3); + add_nodeint_end(&head, 4); + add_nodeint_end(&head, 98); + add_nodeint_end(&head, 402); + add_nodeint_end(&head, 1024); + print_listint(head); + free_listint(head); + head = NULL; + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_4/main_0.c b/0x13-more_singly_linked_lists/tests/task_4/main_0.c new file mode 100644 index 00000000..5c97ee44 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_4/main_0.c @@ -0,0 +1,59 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + size_t n; + + head = _create_list(2, 9, 6); + n = print_listint(head); + printf("-> %lu elements\n", n); + free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_4/main_1.c b/0x13-more_singly_linked_lists/tests/task_4/main_1.c new file mode 100644 index 00000000..7257c060 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_4/main_1.c @@ -0,0 +1,59 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + size_t n; + + head = _create_list(1, 9); + n = print_listint(head); + printf("-> %lu elements\n", n); + free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_4/main_2.c b/0x13-more_singly_linked_lists/tests/task_4/main_2.c new file mode 100644 index 00000000..b7b7a23e --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_4/main_2.c @@ -0,0 +1,59 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *list; + size_t n; + + list = _create_list(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + n = print_listint(list); + printf("-> %lu elements\n", n); + free_listint(list); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_4/main_3.c b/0x13-more_singly_linked_lists/tests/task_4/main_3.c new file mode 100644 index 00000000..9adf65b0 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_4/main_3.c @@ -0,0 +1,59 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + size_t n; + + head = _create_list(2, -12, 6); + n = print_listint(head); + printf("-> %lu elements\n", n); + free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_4/main_4.c b/0x13-more_singly_linked_lists/tests/task_4/main_4.c new file mode 100644 index 00000000..893482e4 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_4/main_4.c @@ -0,0 +1,15 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + free_listint(NULL); + printf("Freed !\n"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_5/5-main.c b/0x13-more_singly_linked_lists/tests/task_5/5-main.c new file mode 100644 index 00000000..fc3ecef3 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_5/5-main.c @@ -0,0 +1,25 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = NULL; + add_nodeint_end(&head, 0); + add_nodeint_end(&head, 1); + add_nodeint_end(&head, 2); + add_nodeint_end(&head, 3); + add_nodeint_end(&head, 4); + add_nodeint_end(&head, 98); + add_nodeint_end(&head, 402); + add_nodeint_end(&head, 1024); + print_listint(head); + free_listint2(&head); + printf("%p\n", (void *)head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_5/main_0.c b/0x13-more_singly_linked_lists/tests/task_5/main_0.c new file mode 100644 index 00000000..0a7e6c77 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_5/main_0.c @@ -0,0 +1,60 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + size_t n; + + head = _create_list(2, 9, 6); + n = print_listint(head); + printf("-> %lu elements\n", n); + free_listint2(&head); + printf("%p\n", (void *)head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_5/main_1.c b/0x13-more_singly_linked_lists/tests/task_5/main_1.c new file mode 100644 index 00000000..4934dc7c --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_5/main_1.c @@ -0,0 +1,60 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + size_t n; + + head = _create_list(1, 9); + n = print_listint(head); + printf("-> %lu elements\n", n); + free_listint2(&head); + printf("%p\n", (void *)head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_5/main_2.c b/0x13-more_singly_linked_lists/tests/task_5/main_2.c new file mode 100644 index 00000000..0bb5fc66 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_5/main_2.c @@ -0,0 +1,60 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *list; + size_t n; + + list = _create_list(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + n = print_listint(list); + printf("-> %lu elements\n", n); + free_listint2(&list); + printf("%p\n", (void *)list); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_5/main_3.c b/0x13-more_singly_linked_lists/tests/task_5/main_3.c new file mode 100644 index 00000000..e4c2f698 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_5/main_3.c @@ -0,0 +1,60 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + size_t n; + + head = _create_list(2, -12, 6); + n = print_listint(head); + printf("-> %lu elements\n", n); + free_listint2(&head); + printf("%p\n", (void *)head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_5/main_4.c b/0x13-more_singly_linked_lists/tests/task_5/main_4.c new file mode 100644 index 00000000..95db49fa --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_5/main_4.c @@ -0,0 +1,15 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + free_listint2(NULL); + printf("Freed !\n"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_6/6-main.c b/0x13-more_singly_linked_lists/tests/task_6/6-main.c new file mode 100644 index 00000000..26b90637 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_6/6-main.c @@ -0,0 +1,32 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = NULL; + add_nodeint_end(&head, 0); + add_nodeint_end(&head, 1); + add_nodeint_end(&head, 2); + add_nodeint_end(&head, 3); + add_nodeint_end(&head, 4); + add_nodeint_end(&head, 98); + add_nodeint_end(&head, 402); + add_nodeint_end(&head, 1024); + print_listint(head); + n = pop_listint(&head); + printf("- %d\n", n); + print_listint(head); + n = pop_listint(&head); + printf("- %d\n", n); + print_listint(head); + free_listint2(&head); + printf("%p\n", (void *)head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_6/main_0.c b/0x13-more_singly_linked_lists/tests/task_6/main_0.c new file mode 100644 index 00000000..af026b68 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_6/main_0.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = _create_list(2, 9, 6); + n = pop_listint(&head); + printf("-> %d\n", n); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_6/main_1.c b/0x13-more_singly_linked_lists/tests/task_6/main_1.c new file mode 100644 index 00000000..97800632 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_6/main_1.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = _create_list(1, 9); + n = pop_listint(&head); + printf("-> %d\n", n); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_6/main_2.c b/0x13-more_singly_linked_lists/tests/task_6/main_2.c new file mode 100644 index 00000000..ebe398d2 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_6/main_2.c @@ -0,0 +1,78 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + int i; + + head = _create_list(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + for (i = 0; i < 10; ++i) + { + n = pop_listint(&head); + printf("-> %d\n", n); + } + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_6/main_3.c b/0x13-more_singly_linked_lists/tests/task_6/main_3.c new file mode 100644 index 00000000..a75738f9 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_6/main_3.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = _create_list(2, -12, 6); + n = pop_listint(&head); + printf("-> %d\n", n); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_6/main_4.c b/0x13-more_singly_linked_lists/tests/task_6/main_4.c new file mode 100644 index 00000000..52803781 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_6/main_4.c @@ -0,0 +1,19 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = NULL; + n = pop_listint(&head); + printf("-> %d\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_7/7-main.c b/0x13-more_singly_linked_lists/tests/task_7/7-main.c new file mode 100644 index 00000000..0e0fc20c --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_7/7-main.c @@ -0,0 +1,28 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *node; + + head = NULL; + add_nodeint_end(&head, 0); + add_nodeint_end(&head, 1); + add_nodeint_end(&head, 2); + add_nodeint_end(&head, 3); + add_nodeint_end(&head, 4); + add_nodeint_end(&head, 98); + add_nodeint_end(&head, 402); + add_nodeint_end(&head, 1024); + print_listint(head); + node = get_nodeint_at_index(head, 5); + printf("%d\n", node->n); + print_listint(head); + free_listint2(&head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_7/main_0.c b/0x13-more_singly_linked_lists/tests/task_7/main_0.c new file mode 100644 index 00000000..bc29826c --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_7/main_0.c @@ -0,0 +1,76 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *n; + + head = _create_list(2, 9, 6); + n = get_nodeint_at_index(head, 0); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_7/main_1.c b/0x13-more_singly_linked_lists/tests/task_7/main_1.c new file mode 100644 index 00000000..c597841f --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_7/main_1.c @@ -0,0 +1,76 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *n; + + head = _create_list(1, 9); + n = get_nodeint_at_index(head, 10); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_7/main_2.c b/0x13-more_singly_linked_lists/tests/task_7/main_2.c new file mode 100644 index 00000000..d61ab857 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_7/main_2.c @@ -0,0 +1,80 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *n; + int i; + + head = _create_list(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + for (i = 0; i < 10; ++i) + { + n = get_nodeint_at_index(head, i * 10); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + } + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_7/main_3.c b/0x13-more_singly_linked_lists/tests/task_7/main_3.c new file mode 100644 index 00000000..0eeb2c5c --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_7/main_3.c @@ -0,0 +1,76 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *n; + + head = _create_list(2, -12, 6); + n = get_nodeint_at_index(head, 1); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_7/main_4.c b/0x13-more_singly_linked_lists/tests/task_7/main_4.c new file mode 100644 index 00000000..ace9be6e --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_7/main_4.c @@ -0,0 +1,22 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *n; + + head = NULL; + n = get_nodeint_at_index(head, 0); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_8/8-main.c b/0x13-more_singly_linked_lists/tests/task_8/8-main.c new file mode 100644 index 00000000..ecd936ad --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_8/8-main.c @@ -0,0 +1,26 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int sum; + + head = NULL; + add_nodeint_end(&head, 0); + add_nodeint_end(&head, 1); + add_nodeint_end(&head, 2); + add_nodeint_end(&head, 3); + add_nodeint_end(&head, 4); + add_nodeint_end(&head, 98); + add_nodeint_end(&head, 402); + add_nodeint_end(&head, 1024); + sum = sum_listint(head); + printf("sum = %d\n", sum); + free_listint2(&head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_8/main_0.c b/0x13-more_singly_linked_lists/tests/task_8/main_0.c new file mode 100644 index 00000000..bf8efc81 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_8/main_0.c @@ -0,0 +1,73 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = _create_list(2, 9, 6); + n = sum_listint(head); + printf("-> %d\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_8/main_1.c b/0x13-more_singly_linked_lists/tests/task_8/main_1.c new file mode 100644 index 00000000..735df84b --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_8/main_1.c @@ -0,0 +1,73 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = _create_list(1, 9); + n = sum_listint(head); + printf("-> %d\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_8/main_2.c b/0x13-more_singly_linked_lists/tests/task_8/main_2.c new file mode 100644 index 00000000..60315493 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_8/main_2.c @@ -0,0 +1,73 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = _create_list(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + n = sum_listint(head); + printf("-> %d\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_8/main_3.c b/0x13-more_singly_linked_lists/tests/task_8/main_3.c new file mode 100644 index 00000000..29d8f2e7 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_8/main_3.c @@ -0,0 +1,73 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = _create_list(2, -12, 6); + n = sum_listint(head); + printf("-> %d\n", n); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_8/main_4.c b/0x13-more_singly_linked_lists/tests/task_8/main_4.c new file mode 100644 index 00000000..18882e0f --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_8/main_4.c @@ -0,0 +1,19 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + int n; + + head = NULL; + n = sum_listint(head); + printf("-> %d\n", n); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_9/9-main.c b/0x13-more_singly_linked_lists/tests/task_9/9-main.c new file mode 100644 index 00000000..a255e82a --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_9/9-main.c @@ -0,0 +1,27 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + + head = NULL; + add_nodeint_end(&head, 0); + add_nodeint_end(&head, 1); + add_nodeint_end(&head, 2); + add_nodeint_end(&head, 3); + add_nodeint_end(&head, 4); + add_nodeint_end(&head, 98); + add_nodeint_end(&head, 402); + add_nodeint_end(&head, 1024); + print_listint(head); + printf("-----------------\n"); + insert_nodeint_at_index(&head, 5, 4096); + print_listint(head); + free_listint2(&head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_9/main_0.c b/0x13-more_singly_linked_lists/tests/task_9/main_0.c new file mode 100644 index 00000000..7b2604cc --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_9/main_0.c @@ -0,0 +1,77 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *n; + + head = _create_list(2, 9, 6); + n = insert_nodeint_at_index(&head, 0, 98); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_9/main_1.c b/0x13-more_singly_linked_lists/tests/task_9/main_1.c new file mode 100644 index 00000000..53c15c36 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_9/main_1.c @@ -0,0 +1,77 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *n; + + head = _create_list(1, 9); + n = insert_nodeint_at_index(&head, 10, 98); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_9/main_2.c b/0x13-more_singly_linked_lists/tests/task_9/main_2.c new file mode 100644 index 00000000..3a2c70be --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_9/main_2.c @@ -0,0 +1,86 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *n; + int i; + + head = _create_list(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + n = insert_nodeint_at_index(&head, 150, 150); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + for (i = 0; i < 10; ++i) + { + n = insert_nodeint_at_index(&head, i * 10, 98); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + } + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_9/main_3.c b/0x13-more_singly_linked_lists/tests/task_9/main_3.c new file mode 100644 index 00000000..fd30dd11 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_9/main_3.c @@ -0,0 +1,77 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_list - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +listint_t *_create_list(unsigned int n, ...) +{ + va_list args; + listint_t *list; + listint_t *tmp; + listint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_listint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_listint(listint_t *list) +{ + if (list) + { + _free_listint(list->next); + free(list); + } +} + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *n; + + head = _create_list(2, -12, 6); + n = insert_nodeint_at_index(&head, 1, 98); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + print_listint(head); + _free_listint(head); + return (0); +} diff --git a/0x13-more_singly_linked_lists/tests/task_9/main_4.c b/0x13-more_singly_linked_lists/tests/task_9/main_4.c new file mode 100644 index 00000000..faf93858 --- /dev/null +++ b/0x13-more_singly_linked_lists/tests/task_9/main_4.c @@ -0,0 +1,23 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + listint_t *head; + listint_t *n; + + head = NULL; + n = insert_nodeint_at_index(&head, 0, 98); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + print_listint(head); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/0-main.c b/0x14-bit_manipulation/tests/task_0/0-main.c new file mode 100644 index 00000000..3718c515 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/0-main.c @@ -0,0 +1,24 @@ +#include +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = binary_to_uint("1"); + printf("%u\n", n); + n = binary_to_uint("101"); + printf("%u\n", n); + n = binary_to_uint("1e01"); + printf("%u\n", n); + n = binary_to_uint("1100010"); + printf("%u\n", n); + n = binary_to_uint("0000000000000000000110010010"); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/main_0.c b/0x14-bit_manipulation/tests/task_0/main_0.c new file mode 100644 index 00000000..d9c4ff34 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/main_0.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = binary_to_uint("1"); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/main_1.c b/0x14-bit_manipulation/tests/task_0/main_1.c new file mode 100644 index 00000000..962e7921 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/main_1.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = binary_to_uint("01"); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/main_2.c b/0x14-bit_manipulation/tests/task_0/main_2.c new file mode 100644 index 00000000..8f49fb49 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/main_2.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = binary_to_uint("0000000000000000000000000000000000000000000000001"); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/main_3.c b/0x14-bit_manipulation/tests/task_0/main_3.c new file mode 100644 index 00000000..525436e2 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/main_3.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + /* UINT_MAX */ + n = binary_to_uint("11111111111111111111111111111111"); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/main_4.c b/0x14-bit_manipulation/tests/task_0/main_4.c new file mode 100644 index 00000000..07a578b2 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/main_4.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = binary_to_uint(""); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/main_5.c b/0x14-bit_manipulation/tests/task_0/main_5.c new file mode 100644 index 00000000..e0336c23 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/main_5.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = binary_to_uint(NULL); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/main_6.c b/0x14-bit_manipulation/tests/task_0/main_6.c new file mode 100644 index 00000000..a07b7ca0 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/main_6.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = binary_to_uint("Best School !"); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/main_7.c b/0x14-bit_manipulation/tests/task_0/main_7.c new file mode 100644 index 00000000..952f99fc --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/main_7.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = binary_to_uint("0111010011H0011"); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/main_8.c b/0x14-bit_manipulation/tests/task_0/main_8.c new file mode 100644 index 00000000..e936015a --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/main_8.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = binary_to_uint("10111010011001101"); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_0/main_9.c b/0x14-bit_manipulation/tests/task_0/main_9.c new file mode 100644 index 00000000..ba6f3c77 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_0/main_9.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = binary_to_uint("000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_1/1-main.c b/0x14-bit_manipulation/tests/task_1/1-main.c new file mode 100644 index 00000000..5dafb674 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_1/1-main.c @@ -0,0 +1,21 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + print_binary(0); + printf("\n"); + print_binary(1); + printf("\n"); + print_binary(98); + printf("\n"); + print_binary(1024); + printf("\n"); + print_binary((1 << 10) + 1); + printf("\n"); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_1/main_0.c b/0x14-bit_manipulation/tests/task_1/main_0.c new file mode 100644 index 00000000..acdc61b0 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_1/main_0.c @@ -0,0 +1,14 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_binary(0); + printf("\n"); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_1/main_1.c b/0x14-bit_manipulation/tests/task_1/main_1.c new file mode 100644 index 00000000..3fd10029 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_1/main_1.c @@ -0,0 +1,14 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_binary(1); + printf("\n"); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_1/main_2.c b/0x14-bit_manipulation/tests/task_1/main_2.c new file mode 100644 index 00000000..94780e76 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_1/main_2.c @@ -0,0 +1,14 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_binary(2); + printf("\n"); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_1/main_3.c b/0x14-bit_manipulation/tests/task_1/main_3.c new file mode 100644 index 00000000..06571a29 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_1/main_3.c @@ -0,0 +1,14 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_binary(10); + printf("\n"); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_1/main_4.c b/0x14-bit_manipulation/tests/task_1/main_4.c new file mode 100644 index 00000000..48de9074 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_1/main_4.c @@ -0,0 +1,15 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_binary(ULONG_MAX); + printf("\n"); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_1/main_5.c b/0x14-bit_manipulation/tests/task_1/main_5.c new file mode 100644 index 00000000..ac58122b --- /dev/null +++ b/0x14-bit_manipulation/tests/task_1/main_5.c @@ -0,0 +1,15 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + print_binary(954372342312); + printf("\n"); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_2/2-main.c b/0x14-bit_manipulation/tests/task_2/2-main.c new file mode 100644 index 00000000..34e0bd90 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_2/2-main.c @@ -0,0 +1,19 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = get_bit(1024, 10); + printf("%d\n", n); + n = get_bit(98, 1); + printf("%d\n", n); + n = get_bit(1024, 0); + printf("%d\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_2/main_0.c b/0x14-bit_manipulation/tests/task_2/main_0.c new file mode 100644 index 00000000..a046c3a1 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_2/main_0.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = get_bit(2048, 11); + printf("%d\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_2/main_1.c b/0x14-bit_manipulation/tests/task_2/main_1.c new file mode 100644 index 00000000..fa564b78 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_2/main_1.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = get_bit(2048, 1); + printf("%d\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_2/main_2.c b/0x14-bit_manipulation/tests/task_2/main_2.c new file mode 100644 index 00000000..0d99a9bf --- /dev/null +++ b/0x14-bit_manipulation/tests/task_2/main_2.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = get_bit(2048, 20); + printf("%d\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_2/main_3.c b/0x14-bit_manipulation/tests/task_2/main_3.c new file mode 100644 index 00000000..ebdcf4b9 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_2/main_3.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = get_bit(ULONG_MAX, 19); + printf("%d\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_2/main_4.c b/0x14-bit_manipulation/tests/task_2/main_4.c new file mode 100644 index 00000000..ebed97cf --- /dev/null +++ b/0x14-bit_manipulation/tests/task_2/main_4.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = get_bit(ULONG_MAX, 20000); + printf("%d\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_2/main_5.c b/0x14-bit_manipulation/tests/task_2/main_5.c new file mode 100644 index 00000000..92f3154c --- /dev/null +++ b/0x14-bit_manipulation/tests/task_2/main_5.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + + n = get_bit(ULONG_MAX, 0); + printf("%d\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_3/3-main.c b/0x14-bit_manipulation/tests/task_3/3-main.c new file mode 100644 index 00000000..a1a10694 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_3/3-main.c @@ -0,0 +1,22 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + unsigned long int n; + + n = 1024; + set_bit(&n, 5); + printf("%lu\n", n); + n = 0; + set_bit(&n, 10); + printf("%lu\n", n); + n = 98; + set_bit(&n, 0); + printf("%lu\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_3/main_0.c b/0x14-bit_manipulation/tests/task_3/main_0.c new file mode 100644 index 00000000..67b5ed1d --- /dev/null +++ b/0x14-bit_manipulation/tests/task_3/main_0.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + unsigned long int nb = 2048; + + n = set_bit(&nb, 10); + printf("nb:%lu\nret:%d\n", nb, n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_3/main_1.c b/0x14-bit_manipulation/tests/task_3/main_1.c new file mode 100644 index 00000000..07b6e91c --- /dev/null +++ b/0x14-bit_manipulation/tests/task_3/main_1.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + unsigned long int nb = 2048; + + n = set_bit(&nb, 1); + printf("nb:%lu\nret:%d\n", nb, n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_3/main_2.c b/0x14-bit_manipulation/tests/task_3/main_2.c new file mode 100644 index 00000000..ce128f7b --- /dev/null +++ b/0x14-bit_manipulation/tests/task_3/main_2.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + unsigned long int nb = 2048; + + n = set_bit(&nb, 20); + printf("nb:%lu\nret:%d\n", nb, n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_3/main_3.c b/0x14-bit_manipulation/tests/task_3/main_3.c new file mode 100644 index 00000000..defa1003 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_3/main_3.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + unsigned long int nb = 2048; + + n = set_bit(&nb, 0); + printf("nb:%lu\nret:%d\n", nb, n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_3/main_4.c b/0x14-bit_manipulation/tests/task_3/main_4.c new file mode 100644 index 00000000..85b28096 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_3/main_4.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + unsigned long int nb = 2048; + + n = set_bit(&nb, 2000); + printf("nb:%lu\nret:%d\n", nb, n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_4/4-main.c b/0x14-bit_manipulation/tests/task_4/4-main.c new file mode 100644 index 00000000..8384cad3 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_4/4-main.c @@ -0,0 +1,22 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + unsigned long int n; + + n = 1024; + clear_bit(&n, 10); + printf("%lu\n", n); + n = 0; + clear_bit(&n, 10); + printf("%lu\n", n); + n = 98; + clear_bit(&n, 1); + printf("%lu\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_4/main_0.c b/0x14-bit_manipulation/tests/task_4/main_0.c new file mode 100644 index 00000000..7445fce6 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_4/main_0.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + unsigned long int nb = 2048; + + n = clear_bit(&nb, 11); + printf("nb:%lu\nret:%d\n", nb, n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_4/main_1.c b/0x14-bit_manipulation/tests/task_4/main_1.c new file mode 100644 index 00000000..c7bd1e6d --- /dev/null +++ b/0x14-bit_manipulation/tests/task_4/main_1.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + unsigned long int nb = 2049; + + n = clear_bit(&nb, 1); + printf("nb:%lu\nret:%d\n", nb, n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_4/main_2.c b/0x14-bit_manipulation/tests/task_4/main_2.c new file mode 100644 index 00000000..f71d4c67 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_4/main_2.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + unsigned long int nb = 2048; + + n = clear_bit(&nb, 20); + printf("nb:%lu\nret:%d\n", nb, n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_4/main_3.c b/0x14-bit_manipulation/tests/task_4/main_3.c new file mode 100644 index 00000000..62023dfb --- /dev/null +++ b/0x14-bit_manipulation/tests/task_4/main_3.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + unsigned long int nb = 2049; + + n = clear_bit(&nb, 0); + printf("nb:%lu\nret:%d\n", nb, n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_4/main_4.c b/0x14-bit_manipulation/tests/task_4/main_4.c new file mode 100644 index 00000000..ad0c2e03 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_4/main_4.c @@ -0,0 +1,17 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int n; + unsigned long int nb = 2048; + + n = clear_bit(&nb, 2000); + printf("nb:%lu\nret:%d\n", nb, n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_5/5-main.c b/0x14-bit_manipulation/tests/task_5/5-main.c new file mode 100644 index 00000000..369bceaa --- /dev/null +++ b/0x14-bit_manipulation/tests/task_5/5-main.c @@ -0,0 +1,21 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = flip_bits(1024, 1); + printf("%u\n", n); + n = flip_bits(402, 98); + printf("%u\n", n); + n = flip_bits(1024, 3); + printf("%u\n", n); + n = flip_bits(1024, 1025); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_5/main_0.c b/0x14-bit_manipulation/tests/task_5/main_0.c new file mode 100644 index 00000000..962e395e --- /dev/null +++ b/0x14-bit_manipulation/tests/task_5/main_0.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = flip_bits(234234423, 1987609); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_5/main_1.c b/0x14-bit_manipulation/tests/task_5/main_1.c new file mode 100644 index 00000000..19233e5b --- /dev/null +++ b/0x14-bit_manipulation/tests/task_5/main_1.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = flip_bits(2048 + 1024, 3); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_5/main_2.c b/0x14-bit_manipulation/tests/task_5/main_2.c new file mode 100644 index 00000000..5f695380 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_5/main_2.c @@ -0,0 +1,16 @@ +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = flip_bits(0, 0); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_5/main_3.c b/0x14-bit_manipulation/tests/task_5/main_3.c new file mode 100644 index 00000000..f9c175a0 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_5/main_3.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = flip_bits(ULONG_MAX, 0); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_5/main_4.c b/0x14-bit_manipulation/tests/task_5/main_4.c new file mode 100644 index 00000000..bfe2221e --- /dev/null +++ b/0x14-bit_manipulation/tests/task_5/main_4.c @@ -0,0 +1,17 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + unsigned int n; + + n = flip_bits(ULONG_MAX, ULONG_MAX - 1); + printf("%u\n", n); + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_6/main_0.c b/0x14-bit_manipulation/tests/task_6/main_0.c new file mode 100644 index 00000000..63c85098 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_6/main_0.c @@ -0,0 +1,18 @@ +#include +#include "main.h" + +int main(void) +{ + int n; + + n = get_endianness(); + if (n != 0) + { + printf("Little Endian\n"); + } + else + { + printf("Big Endian\n"); + } + return (0); +} diff --git a/0x14-bit_manipulation/tests/task_7/main_0.c b/0x14-bit_manipulation/tests/task_7/main_0.c new file mode 100644 index 00000000..e0dbca23 --- /dev/null +++ b/0x14-bit_manipulation/tests/task_7/main_0.c @@ -0,0 +1,63 @@ +#include +#include + +/** + * check_password - Check that a given password is correct + * + * @pwd: The password to be checked + * + * Return: 1 on success, 0 on failure + */ +int check_password(char *pwd) +{ + unsigned int xor; + unsigned char i; + unsigned char mask; + + if (strlen(pwd) != 4) + { + return (0); + } + xor = 0x046c6f48; + /* ./a.out `printf "Hol\x04"` */ + mask = 0xff; + for (i = 0; i < 4; i++) + { + /* printf("Comparing %x w %x\n", pwd[i], ((xor >> (i * 8)) & mask));*/ + if ((unsigned char)(pwd[i]) != ((xor >> (i * 8)) & mask)) + { + return (0); + } + } + return (1); +} + +/** + * main - Entry point + * + * @ac: Arguments counter + * @av: Arguments array + * + * Return: 0 on success, error code otherwise + */ +int main(int ac, char **av) +{ + int ret; + + if (ac != 2) + { + fprintf(stderr, "Usage: %s password\n", av[0]); + return (1); + } + ret = check_password(av[1]); + if (ret == 1) + { + printf("Congratulations!\n"); + } + else + { + printf("ko\n"); + return (1); + } + return (0); +} diff --git a/0x15-file_io/tests/task_0/0-main.c b/0x15-file_io/tests/task_0/0-main.c new file mode 100644 index 00000000..d7a81614 --- /dev/null +++ b/0x15-file_io/tests/task_0/0-main.c @@ -0,0 +1,22 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(int ac, char **av) +{ + ssize_t n; + + if (ac != 2) + { + dprintf(2, "Usage: %s filename\n", av[0]); + exit(1); + } + n = read_textfile(av[1], 114); + printf("\n(printed chars: %li)\n", n); + n = read_textfile(av[1], 1024); + printf("\n(printed chars: %li)\n", n); + return (0); +} diff --git a/0x15-file_io/tests/task_0/main_0.c b/0x15-file_io/tests/task_0/main_0.c new file mode 100644 index 00000000..a7449e6d --- /dev/null +++ b/0x15-file_io/tests/task_0/main_0.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * @ac: Arguments counter + * @av: Arguments array + * + * Return: Always 0. + */ +int main(int ac, char **av) +{ + ssize_t n; + size_t size; + char *file; + int fd1, fd2; + + if (ac != 3) + { + printf("Usage: %s filename size_to_read\n", av[0]); + exit(1); + } + fd1 = open("main_0.c", O_RDONLY); + if (fd1 == -1) + { + printf("Can't open file.\n"); + return (1); + } + file = av[1]; + if (strcmp(file, "NULL") == 0) + file = NULL; + size = atoi(av[2]); + n = read_textfile(av[1], size); + printf("\n(printed chars: %li)\n", n); + fd2 = open("0-read_textfile.c", O_RDONLY); + if (fd2 == -1) + { + printf("Can't open file.\n"); + return (1); + } + if (fd2 != fd1 + 1) + { + printf("Stream was not closed !\n"); + return (1); + } + return (0); +} diff --git a/0x15-file_io/tests/task_0/no_read_perm.txt b/0x15-file_io/tests/task_0/no_read_perm.txt new file mode 100644 index 00000000..a3af8d23 --- /dev/null +++ b/0x15-file_io/tests/task_0/no_read_perm.txt @@ -0,0 +1,2 @@ +Wait ! +You should not be able to see this ! diff --git a/0x15-file_io/tests/task_0/textfile_0.txt b/0x15-file_io/tests/task_0/textfile_0.txt new file mode 100644 index 00000000..6cdffd83 --- /dev/null +++ b/0x15-file_io/tests/task_0/textfile_0.txt @@ -0,0 +1,22 @@ +When you invoke GCC, it normally does preprocessing, compilation, assembly and linking. The "overall options" allow you to +stop this process at an intermediate stage. For example, the -c option says not to run the linker. Then the output +consists of object files output by the assembler. + +Other options are passed on to one stage of processing. Some options control the preprocessor and others the compiler +itself. Yet other options control the assembler and linker; most of these are not documented here, since you rarely need +to use any of them. + +Most of the command-line options that you can use with GCC are useful for C programs; when an option is only useful with +another language (usually C++), the explanation says so explicitly. If the description for a particular option does not +mention a source language, you can use that option with all supported languages. + +The gcc program accepts options and file names as operands. Many options have multi-letter names; therefore multiple +single-letter options may not be grouped: -dv is very different from -d -v. + +You can mix options and other arguments. For the most part, the order you use doesn't matter. Order does matter when you +use several options of the same kind; for example, if you specify -L more than once, the directories are searched in the +order specified. Also, the placement of the -l option is significant. + +Many options have long names starting with -f or with -W---for example, -fmove-loop-invariants, -Wformat and so on. Most +of these have both positive and negative forms; the negative form of -ffoo is -fno-foo. This manual documents only one of +these two forms, whichever one is not the default. diff --git a/0x15-file_io/tests/task_1/1-main.c b/0x15-file_io/tests/task_1/1-main.c new file mode 100644 index 00000000..b66afcae --- /dev/null +++ b/0x15-file_io/tests/task_1/1-main.c @@ -0,0 +1,21 @@ +#include "main.h" + +/** + * main - check the code + * @ac: number of arguments. + * @av: array of string + * Return: Always 0. + */ +int main(int ac, char **av) +{ + int res; + + if (ac != 3) + { + dprintf(2, "Usage: %s filename text\n", av[0]); + exit(1); + } + res = create_file(av[1], av[2]); + printf("-> %i)\n", res); + return (0); +} diff --git a/0x15-file_io/tests/task_1/main_0.c b/0x15-file_io/tests/task_1/main_0.c new file mode 100644 index 00000000..bb9d5d72 --- /dev/null +++ b/0x15-file_io/tests/task_1/main_0.c @@ -0,0 +1,25 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * @ac: Argumetns counter + * @av: Arguments array + * Return: Always 0. + */ +int main(int ac, char **av) +{ + int res; + char *content = "Best School !"; + + if (ac < 2) + { + printf("Usage: %s filename [content]\n", av[0]); + return (1); + } + res = create_file(av[1], av[2] ? av[2] : content); + printf("%i\n", res); + return (0); +} diff --git a/0x15-file_io/tests/task_1/main_4.c b/0x15-file_io/tests/task_1/main_4.c new file mode 100644 index 00000000..9923fe76 --- /dev/null +++ b/0x15-file_io/tests/task_1/main_4.c @@ -0,0 +1,24 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * @ac: Argumetns counter + * @av: Arguments array + * Return: Always 0. + */ +int main(int ac, char **av) +{ + int res; + + if (ac < 2) + { + printf("Usage: %s filename\n", av[0]); + return (1); + } + res = create_file(av[1], NULL); + printf("%i\n", res); + return (0); +} diff --git a/0x15-file_io/tests/task_1/main_5.c b/0x15-file_io/tests/task_1/main_5.c new file mode 100644 index 00000000..2f9f5419 --- /dev/null +++ b/0x15-file_io/tests/task_1/main_5.c @@ -0,0 +1,18 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * Return: Always 0. + */ +int main(void) +{ + int res; + char *content = "Best School !"; + + res = create_file(NULL, content); + printf("%i\n", res); + return (0); +} diff --git a/0x15-file_io/tests/task_1/no_read_perm.txt b/0x15-file_io/tests/task_1/no_read_perm.txt new file mode 100644 index 00000000..a3af8d23 --- /dev/null +++ b/0x15-file_io/tests/task_1/no_read_perm.txt @@ -0,0 +1,2 @@ +Wait ! +You should not be able to see this ! diff --git a/0x15-file_io/tests/task_2/2-main.c b/0x15-file_io/tests/task_2/2-main.c new file mode 100644 index 00000000..9410178d --- /dev/null +++ b/0x15-file_io/tests/task_2/2-main.c @@ -0,0 +1,20 @@ +#include "main.h" + +/** + * main - check the code + * + * Return: Always 0. + */ +int main(int ac, char **av) +{ + int res; + + if (ac != 3) + { + dprintf(2, "Usage: %s filename text\n", av[0]); + exit(1); + } + res = append_text_to_file(av[1], av[2]); + printf("-> %i)\n", res); + return (0); +} diff --git a/0x15-file_io/tests/task_2/main_0.c b/0x15-file_io/tests/task_2/main_0.c new file mode 100644 index 00000000..f4479f0c --- /dev/null +++ b/0x15-file_io/tests/task_2/main_0.c @@ -0,0 +1,26 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * @ac: Arguments counter + * @av: Arguments array + * + * Return: 0 on success, 1 on error + */ +int main(int ac, char **av) +{ + int res; + char *content = "Best School !"; + + if (ac < 2) + { + printf("Usage: %s filename [content]\n", av[0]); + return (1); + } + res = append_text_to_file(av[1], av[2] ? av[2] : content); + printf("%i\n", res); + return (0); +} diff --git a/0x15-file_io/tests/task_2/main_2.c b/0x15-file_io/tests/task_2/main_2.c new file mode 100644 index 00000000..5447af39 --- /dev/null +++ b/0x15-file_io/tests/task_2/main_2.c @@ -0,0 +1,25 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * @ac: Arguments counter + * @av: Arguments array + * + * Return: 0 on success, 1 on error + */ +int main(int ac, char **av) +{ + int res; + char *content = "Best School !"; + if ((ac != 1) && (av == NULL)) + { + /* Empty */ + } + + res = append_text_to_file(NULL, content); + printf("%i\n", res); + return (0); +} diff --git a/0x15-file_io/tests/task_2/main_3.c b/0x15-file_io/tests/task_2/main_3.c new file mode 100644 index 00000000..3d831567 --- /dev/null +++ b/0x15-file_io/tests/task_2/main_3.c @@ -0,0 +1,25 @@ +#include +#include +#include "main.h" + +/** + * main - check the code . + * + * @ac: Arguments counter + * @av: Arguments array + * + * Return: 0 on success, 1 on error + */ +int main(int ac, char **av) +{ + int res; + + if (ac < 2) + { + printf("Usage: %s filename\n", av[0]); + return (1); + } + res = append_text_to_file(av[1], NULL); + printf("%i\n", res); + return (0); +} diff --git a/0x15-file_io/tests/task_2/no_read_perm.txt b/0x15-file_io/tests/task_2/no_read_perm.txt new file mode 100644 index 00000000..a3af8d23 --- /dev/null +++ b/0x15-file_io/tests/task_2/no_read_perm.txt @@ -0,0 +1,2 @@ +Wait ! +You should not be able to see this ! diff --git a/0x15-file_io/tests/task_2/no_write_perm.txt b/0x15-file_io/tests/task_2/no_write_perm.txt new file mode 100644 index 00000000..5f3c92e9 --- /dev/null +++ b/0x15-file_io/tests/task_2/no_write_perm.txt @@ -0,0 +1,2 @@ +Wait ! +You should not be able to write here ! diff --git a/0x15-file_io/tests/task_2/textfile_0.txt b/0x15-file_io/tests/task_2/textfile_0.txt new file mode 100644 index 00000000..6cdffd83 --- /dev/null +++ b/0x15-file_io/tests/task_2/textfile_0.txt @@ -0,0 +1,22 @@ +When you invoke GCC, it normally does preprocessing, compilation, assembly and linking. The "overall options" allow you to +stop this process at an intermediate stage. For example, the -c option says not to run the linker. Then the output +consists of object files output by the assembler. + +Other options are passed on to one stage of processing. Some options control the preprocessor and others the compiler +itself. Yet other options control the assembler and linker; most of these are not documented here, since you rarely need +to use any of them. + +Most of the command-line options that you can use with GCC are useful for C programs; when an option is only useful with +another language (usually C++), the explanation says so explicitly. If the description for a particular option does not +mention a source language, you can use that option with all supported languages. + +The gcc program accepts options and file names as operands. Many options have multi-letter names; therefore multiple +single-letter options may not be grouped: -dv is very different from -d -v. + +You can mix options and other arguments. For the most part, the order you use doesn't matter. Order does matter when you +use several options of the same kind; for example, if you specify -L more than once, the directories are searched in the +order specified. Also, the placement of the -l option is significant. + +Many options have long names starting with -f or with -W---for example, -fmove-loop-invariants, -Wformat and so on. Most +of these have both positive and negative forms; the negative form of -ffoo is -fno-foo. This manual documents only one of +these two forms, whichever one is not the default. diff --git a/0x15-file_io/tests/task_3/_constructor.c b/0x15-file_io/tests/task_3/_constructor.c new file mode 100644 index 00000000..2ed784df --- /dev/null +++ b/0x15-file_io/tests/task_3/_constructor.c @@ -0,0 +1,7 @@ +#include +#include + +__attribute__((constructor)) void checker_constructor(void) +{ + umask(0); +} diff --git a/0x15-file_io/tests/task_3/case_9.bash b/0x15-file_io/tests/task_3/case_9.bash new file mode 100644 index 00000000..9421f951 --- /dev/null +++ b/0x15-file_io/tests/task_3/case_9.bash @@ -0,0 +1,4 @@ +#!/bin/bash + +./test_folder/3-cp_0 test_folder/textfile_0 "" +echo $? diff --git a/0x15-file_io/tests/task_3/no_read_perm.txt b/0x15-file_io/tests/task_3/no_read_perm.txt new file mode 100644 index 00000000..a3af8d23 --- /dev/null +++ b/0x15-file_io/tests/task_3/no_read_perm.txt @@ -0,0 +1,2 @@ +Wait ! +You should not be able to see this ! diff --git a/0x15-file_io/tests/task_3/no_write_perm.txt b/0x15-file_io/tests/task_3/no_write_perm.txt new file mode 100644 index 00000000..5f3c92e9 --- /dev/null +++ b/0x15-file_io/tests/task_3/no_write_perm.txt @@ -0,0 +1,2 @@ +Wait ! +You should not be able to write here ! diff --git a/0x15-file_io/tests/task_3/textfile_0.txt b/0x15-file_io/tests/task_3/textfile_0.txt new file mode 100644 index 00000000..6cdffd83 --- /dev/null +++ b/0x15-file_io/tests/task_3/textfile_0.txt @@ -0,0 +1,22 @@ +When you invoke GCC, it normally does preprocessing, compilation, assembly and linking. The "overall options" allow you to +stop this process at an intermediate stage. For example, the -c option says not to run the linker. Then the output +consists of object files output by the assembler. + +Other options are passed on to one stage of processing. Some options control the preprocessor and others the compiler +itself. Yet other options control the assembler and linker; most of these are not documented here, since you rarely need +to use any of them. + +Most of the command-line options that you can use with GCC are useful for C programs; when an option is only useful with +another language (usually C++), the explanation says so explicitly. If the description for a particular option does not +mention a source language, you can use that option with all supported languages. + +The gcc program accepts options and file names as operands. Many options have multi-letter names; therefore multiple +single-letter options may not be grouped: -dv is very different from -d -v. + +You can mix options and other arguments. For the most part, the order you use doesn't matter. Order does matter when you +use several options of the same kind; for example, if you specify -L more than once, the directories are searched in the +order specified. Also, the placement of the -l option is significant. + +Many options have long names starting with -f or with -W---for example, -fmove-loop-invariants, -Wformat and so on. Most +of these have both positive and negative forms; the negative form of -ffoo is -fno-foo. This manual documents only one of +these two forms, whichever one is not the default. diff --git a/0x15-file_io/tests/task_3/textfile_2.txt b/0x15-file_io/tests/task_3/textfile_2.txt new file mode 100644 index 00000000..d534449c --- /dev/null +++ b/0x15-file_io/tests/task_3/textfile_2.txt @@ -0,0 +1,19 @@ +Lorem ipsum dolor sit amet, fabellas intellegam eu per, suas officiis legendos ex vel. Eos vide legimus ei, vis cu modo platonem corrumpit, mutat admodum lucilius pri ei. Vim et dolores maluisset, epicuri sensibus similique cu vel. Minim denique his in. Usu aliquip diceret te, eu nemore quaeque invidunt eam. + +Eruditi debitis eam te, sint minim ad eum, te sed tritani aliquando forensibus. Vis maiorum facilisi facilisis ut. Magna labore accusata nec no. Ne usu regione disputando. + +Cibo eirmod omnesque duo te, vidit argumentum in eos, pri id soluta abhorreant consequuntur. Ei mel labore mollis, id epicuri electram eam, at decore definitionem vel. Nec at blandit perfecto ocurreret. Eos ei eirmod facilis similique. An qui natum dictas accumsan, cu ius volumus scriptorem omittantur. At eos dicunt eirmod. + +Putent scaevola placerat ea sit, ne eum laboramus consequuntur. Ei nam assum urbanitas torquatos, sanctus vulputate et eam. Scaevola abhorreant an mea, his autem prompta no. Id vidit ferri mei, enim adolescens delicatissimi an eum, per cu assum soluta virtute. + +Ut mel justo mazim aperiam. Ipsum decore id est, elit possim elaboraret pri at, pri an putent facilisi imperdiet. Porro numquam placerat vix cu, utinam inimicus posidonium nam an. Eam te nostrud interesset, conceptam argumentum his ex, mea eruditi pertinax ut. + +Odio aeterno vituperatoribus in eam. Ipsum zril ea vis, pro ex minimum evertitur philosophia. Te noster aperiri reprimique vix. Oblique molestie nam an, mel lucilius quaestio similique ad, ex nam causae utroque iudicabit. No his accusam atomorum, semper equidem ornatus ne mea, cibo labores molestiae quo no. Ne habeo feugait vituperatoribus est, ex sed saperet utroque. Ex ipsum lucilius dissentiet nam, eu nam elitr veniam. + +Tacimates posidonium ut est, ad iriure apeirian qui. Ad quaeque admodum eum, mel et magna meliore referrentur. Regione posidonium vel in. Suas mucius eleifend et ius, altera discere iudicabit eu eam, an expetenda assueverit liberavisse has. Ea mea dico justo everti. + +No sea noster impetus inermis, magna mentitum detraxit cum ea. Populo moderatius ea mea, blandit maluisset per no. Duo ferri soleat iudicabit no, mea omnes pericula ex, eam wisi epicuri id. Magna partiendo dissentiunt est no, vis clita labitur no. Cetero fierent in eum, essent vituperata eu vis, no elit rebum eos. Te vis erant nobis. + +Mel et alterum recteque, an ignota accumsan cum. Vel in reque debitis interesset, sit veri dicta ignota eu, soleat copiosae consulatu eu vim. Appellantur voluptatibus duo an, et laudem platonem mel. Dicam impetus adipiscing in sed, facilisi suscipiantur complectitur ea vix. Duo cu rebum adipisci. Sed eu tractatos iudicabit. + +Mea in omnium laoreet, atqui platonem eos ad. No vel soluta dicunt appetere. Omnis malis nam ei, eos ei praesent appellantur. Zril offendit scaevola sea ea, ut ubique fabellas est. diff --git a/0x15-file_io/tests/task_3/textfile_3 b/0x15-file_io/tests/task_3/textfile_3 new file mode 100644 index 0000000000000000000000000000000000000000..9e8396ae179c02e1e5a388f03933aa218ecce7d7 GIT binary patch literal 2877 zcmZXWOOo3*5Qe?hDR2Ol?%;~Oa8>-M#Lgl+kc4JBMF2D&6O~V&?*}Q3lWb-rkpQ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QpgBs0%E;AwWl z7iX>K8-~S&4|%}q6TeoD|6<#L@6Y)79lT=m$?->qVfZlyp0umVSE&-gkLoEkjwue& zwt~bU5$WY?KO{TiB#iR>LmyNx`gSXQpjLZBE7#w^@0oD&AsjuJ61#M|2Xh@DR!Jmq zWkiJMJ#fGM{qHkP_+8@_^V-MYM|Y#04M%k3E`X!@$fRVe6N7+70_)3Ow9+$6odQU4&8?L zmFpYchjt1Eqyu`0A2}P2M5j2nyuVz(<^AXf;8*$S2;T@tbWLy%g6=`k9f6l9ReNx+(+{JszXO* zbneay{oI}S_OVM<(DVNUjPgo!v!I&=-BtvseCeV5lKvipqkItEYr8A-*LH(m5&=eZ z^gIJ6>2}{zq3^y$#N|l*BVP184=3q1+*+Y;xV3;IyyW+yLe~Mhj<=!vkwVuGx_;0} z9xA_oQs@RjHwZfQk#T75MY2+Uw}Ngf=)On-J5QDK`z!oXostjno5f_6%6J{rbFkDY2N}}>gzI8;PVURT2J{71Z6htjXf@*M}AS{|umUhPI=;5^d%{{UIe BuCf3C literal 0 HcmV?d00001 diff --git a/0x15-file_io/tests/task_4/sortix32 b/0x15-file_io/tests/task_4/sortix32 new file mode 100644 index 0000000000000000000000000000000000000000..6ea5ed7e7bd403fe80bf9f92c24d6e07698e86d9 GIT binary patch literal 4917 zcmbtXVQ3u36&~p>_EkA2vg))Bb<3u;AS7mWr^>-KCY2q@Aw{+oOLi!xzMSsX(y6Dr zV{cEDN|Q*erzY|QW1#+7ehs8z(4Xs1qaSpv?>_Y1(WUf z&Ftt_vg?+1;O(1l-g`4|X5Q?~d#$@?e?vn;-5K|Cq8 zipRi(psZs8I-pt9Ne_X-pb+Rb2{O{>Q72KxzDcq`CO~gQgdovgG%NX=z;B)pM@Wlk zUIKAk${Wc)1NsTKFVGD?Jf8+tm^yduLjCz~lF~{W^E4)ee@pb?|!M?c8 zD4WIKy{EwEzaNf#5xfQ7#=xfo{e1)Y8tlQO{>$KYn11~%$5+^db z3}hq8OpdCF{J^k4)TP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e6Aq)cym%o%U`nl}8UhUn(8Z^x{DeO|Bj_+-L9yZ$hQBW8_jtqfD^+6q zfFw~ry@+uE!+DpOu}pO32Q{DU(_cY&GAk}LXJGMQ#`YI4SUv^&PrHg&XI+vD;%Lib zmF=`Ob>r;{uP}P~sn_+`EMk5amUW<`Taa`SaSdB<>@m8M!})n?mmIOM^q)YbgP%_;I`ajd++S4t{U&P9bF{^>#3k=oUb2k zt)w~#4jkCP}CeNA^<0A;b|(GEs~@s|kA*77g?R?guD@v9PSei1A=d z%MkYmXxQRoTv6n4dLu@}`XK)p;z%Gy>*)B5Ns${7ci`TH_&VBt)`f#eHr&>%OSy)A~qJVOz!`9y^$N?5&>2Y=r(uB7bA_z zqF(Z$+>eq^HS|#&1K^#pQx5s$ceyX7{Qe@3QctTD$Rhjrk-jUtaCdX5yH21pKTN`?=w z>^>9$I)l;fXOW`o3$t9pEBz(h8+jyb@E5@&0O-RUlK{q0H}7XeT#o8~1rYUSHQ;!l z0r!SYpq=_&?*@z4nf#e9=0kRwI&8>x8EeoG^3HL@Y+NA3;Qb~@noyIL<%4h!pNJnuJ literal 0 HcmV?d00001 diff --git a/0x15-file_io/tests/task_4/ubuntu64 b/0x15-file_io/tests/task_4/ubuntu64 new file mode 100644 index 0000000000000000000000000000000000000000..d727f776dd9882d9e32418365ff5eba3072516e4 GIT binary patch literal 8920 zcmeHMd2AHd8GpNL8=GUj=19yT7`4!tG#=JqTnCh7)(4D#7b9}BM;VvO6b_kh#;TW+24f0qWEJpU!IrTy zfJ@;aJw>F5PYc(?%Y_>c@Dg|$-6qiJR(OK=G82XfCQ%8IW4t^mB5CrKb4-yqV-g3@ z4$JEEauIkpPY~ZD%F!)2*`bJbHNvh&*b%=X3PzmjhjqiJL-^}(D6C8F8|E0_?Dy_ewsYxKqR{)-F?`e#C{y*2JPc4fShc;o4X< zo*t|nY;34)sFza-c`dIu`bXW(+d6q9YDWnqEb~Hma13Dn)yE@$JGFe(LqEQLYkYy{ zxn)1k{Hh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uqURQmzjz}*Oz!{sp;XM5d<&xo6)>dy?H;H2hd8~s@g$3 zSlf{q*Qw5IjBVbkLJ4eFtk8+6gw_{~hoRhB+jh_jN8?&Lr9->rtBmaia!)EH-0(|V zyvucj+HyeKDTYdOESO5cIKeAnhn5D-MLmb@NTbWvicC%&>^Fivz>TEI`zQr>&3bZx z$?=4t%Yml0S|iviq~3U1?ny`CPk?Bc$td*&Q+-ShAB=-PlN(7h=YXC}MH6wGpg~?z zj|I^{qy}OJlX(-!kd%89AmYUblW`z}Qi6A`toMnb+ZP5WB$=k>7&a{^y)Oi65GL3k z4M7&19HO{V+octOfrKgx_;mx^mwU+NaY0U3A_d->7S)kAg4@9#}p& z(SDZxPm%;qjMi6@>mXsZr+qK3Q%EaKmU}zxTOj8SoJlDD3Ae&^PY8g@kM~DNbpA0V zxUYc(p25hT_R(Vkm=cO*z_IRR4?8tZyWx#zG_t4t_DOMYqjR3AZTg@z^1blj8H?;` zU%p&abfHkD@{=C%{g97mHj-)o-YD$-!roba0W;ihp(@$aKA+#*15Wj%_|Ezt7WPfR zk?1@yB;t>A)I1lXFQ@%6z_4Ahd`NU|P((mFf19~xSt*S?1CQ07&KKRnp5NJ7416L@ z{7VjdI)_XNdnzxvaLV6w*wgo)D)emb0B?Grxa9A94tqM+92N(2I-iriXjT&04~0GT zAMIm~3&Y-=rkQY-|7C|g{eMgU>()E$o$=2*?CCt^7Z)AxJM5kDUxj?wHSsxwsmPyatoW2Jyd-<0w);eUk;Yx#5MM-gBT846Bz#HSthw4dH1?5UjOhU`eb3kk%i z{(n = 9; + head->prev = new; + new->next = head; + new->prev = NULL; + head = new; + n = print_dlistint(head); + printf("-> %lu elements\n", n); + free(new); + return (EXIT_SUCCESS); +} diff --git a/0x17-doubly_linked_lists/tests/task_0/main_0.c b/0x17-doubly_linked_lists/tests/task_0/main_0.c new file mode 100644 index 00000000..f33e4084 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_0/main_0.c @@ -0,0 +1,20 @@ +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t head = {9, 0, 0}; + dlistint_t tail = {6, 0, 0}; + size_t n; + + head.next = &tail; + tail.prev = &head; + n = print_dlistint(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_0/main_1.c b/0x17-doubly_linked_lists/tests/task_0/main_1.c new file mode 100644 index 00000000..ab8ae6b4 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_0/main_1.c @@ -0,0 +1,17 @@ +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t head = {9, 0, 0}; + size_t n; + + n = print_dlistint(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_0/main_2.c b/0x17-doubly_linked_lists/tests/task_0/main_2.c new file mode 100644 index 00000000..d921d2ca --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_0/main_2.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = va_arg(args, int); + tmp->prev = prev; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlist - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlist(dlistint_t *list) +{ + if (list) + { + _free_dlist(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *list; + size_t n; + + list = _create_dlist(130, 7856, 4460, -8622, -6734, -4625, 9495, 2277, -1368, -1080, -1057, -4294, -3307, 9065, -3329, -507, -6507, -5248, 9471, -9026, -6124, -6383, 8133, 2752, -7869, -6714, -2709, 8465, -643, -1376, 1241, 7203, -306, 5856, 1212, -4360, 1375, 2113, -458, 6376, 6979, -4259, -7266, -5247, -9745, 4475, -6326, -9484, -1812, 7753, -7113, 1797, 4361, 3600, -6086, 8727, 760, 588, -9504, -3123, -2760, -1722, -5455, 4398, 9749, 235, -5199, -1243, 8973, -6865, -8598, -8692, 1515, 6475, -8714, -1754, 1611, 8953, -9775, 285, 9344, 7857, 3656, -6463, 2829, -1213, 1626, 6407, -2399, 7755, 5376, -5928, -3927, -2289, -6307, -4162, -7075, 518, -8735, 3474, 9951, 6377, -1782, -4119, -3766, -619, 1656, -3739, 3468, -9458, -613, 2846, 1550, -1967, -7232, -4337, -1780, 4148, 4190, -5837, 605, -130, 6430, 1170, -4384, 1310, 9896, -4189, 9176, 2942, -7917); + n = print_dlistint(list); + printf("-> %lu elements\n", n); + _free_dlist(list); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_0/main_3.c b/0x17-doubly_linked_lists/tests/task_0/main_3.c new file mode 100644 index 00000000..518cade0 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_0/main_3.c @@ -0,0 +1,20 @@ +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t head = {0, 0, 0}; + dlistint_t tail = {6, 0, 0}; + size_t n; + + head.next = &tail; + tail.prev = &head; + n = print_dlistint(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_0/main_4.c b/0x17-doubly_linked_lists/tests/task_0/main_4.c new file mode 100644 index 00000000..c43eb79f --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_0/main_4.c @@ -0,0 +1,16 @@ +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + size_t n; + + n = print_dlistint(0); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_1/1-main.c b/0x17-doubly_linked_lists/tests/task_1/1-main.c new file mode 100644 index 00000000..58465e6f --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_1/1-main.c @@ -0,0 +1,31 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *new; + dlistint_t hello = {8, NULL, NULL}; + size_t n; + + head = &hello; + new = malloc(sizeof(dlistint_t)); + if (new == NULL) + { + dprintf(2, "Error: Can't malloc\n"); + return (EXIT_FAILURE); + } + new->n = 9; + head->prev = new; + new->next = head; + new->prev = NULL; + head = new; + n = dlistint_len(head); + printf("-> %lu elements\n", n); + free(new); + return (EXIT_SUCCESS); +} diff --git a/0x17-doubly_linked_lists/tests/task_1/main_0.c b/0x17-doubly_linked_lists/tests/task_1/main_0.c new file mode 100644 index 00000000..300e1997 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_1/main_0.c @@ -0,0 +1,20 @@ +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t head = {9, 0, 0}; + dlistint_t tail = {6, 0, 0}; + size_t n; + + head.next = &tail; + tail.prev = &head; + n = dlistint_len(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_1/main_1.c b/0x17-doubly_linked_lists/tests/task_1/main_1.c new file mode 100644 index 00000000..3a73a73d --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_1/main_1.c @@ -0,0 +1,17 @@ +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t head = {9, 0, 0}; + size_t n; + + n = dlistint_len(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_1/main_2.c b/0x17-doubly_linked_lists/tests/task_1/main_2.c new file mode 100644 index 00000000..de89ab8b --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_1/main_2.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = va_arg(args, int); + tmp->prev = prev; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlist - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlist(dlistint_t *list) +{ + if (list) + { + _free_dlist(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *list; + size_t n; + + list = _create_dlist(130, 7856, 4460, -8622, -6734, -4625, 9495, 2277, -1368, -1080, -1057, -4294, -3307, 9065, -3329, -507, -6507, -5248, 9471, -9026, -6124, -6383, 8133, 2752, -7869, -6714, -2709, 8465, -643, -1376, 1241, 7203, -306, 5856, 1212, -4360, 1375, 2113, -458, 6376, 6979, -4259, -7266, -5247, -9745, 4475, -6326, -9484, -1812, 7753, -7113, 1797, 4361, 3600, -6086, 8727, 760, 588, -9504, -3123, -2760, -1722, -5455, 4398, 9749, 235, -5199, -1243, 8973, -6865, -8598, -8692, 1515, 6475, -8714, -1754, 1611, 8953, -9775, 285, 9344, 7857, 3656, -6463, 2829, -1213, 1626, 6407, -2399, 7755, 5376, -5928, -3927, -2289, -6307, -4162, -7075, 518, -8735, 3474, 9951, 6377, -1782, -4119, -3766, -619, 1656, -3739, 3468, -9458, -613, 2846, 1550, -1967, -7232, -4337, -1780, 4148, 4190, -5837, 605, -130, 6430, 1170, -4384, 1310, 9896, -4189, 9176, 2942, -7917); + n = dlistint_len(list); + printf("-> %lu elements\n", n); + _free_dlist(list); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_1/main_3.c b/0x17-doubly_linked_lists/tests/task_1/main_3.c new file mode 100644 index 00000000..0348bebc --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_1/main_3.c @@ -0,0 +1,20 @@ +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t head = {0, 0, 0}; + dlistint_t tail = {6, 0, 0}; + size_t n; + + head.next = &tail; + tail.prev = &head; + n = dlistint_len(&head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_1/main_4.c b/0x17-doubly_linked_lists/tests/task_1/main_4.c new file mode 100644 index 00000000..1217bddf --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_1/main_4.c @@ -0,0 +1,16 @@ +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + size_t n; + + n = dlistint_len(0); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_2/2-main.c b/0x17-doubly_linked_lists/tests/task_2/2-main.c new file mode 100644 index 00000000..ee307a8b --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_2/2-main.c @@ -0,0 +1,22 @@ +#include "lists.h" +/** + * main - check the code + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + dlistint_t *head; + + head = NULL; + add_dnodeint(&head, 0); + add_dnodeint(&head, 1); + add_dnodeint(&head, 2); + add_dnodeint(&head, 3); + add_dnodeint(&head, 4); + add_dnodeint(&head, 98); + add_dnodeint(&head, 402); + add_dnodeint(&head, 1024); + print_dlistint(head); + return (EXIT_SUCCESS); +} diff --git a/0x17-doubly_linked_lists/tests/task_2/main_0.c b/0x17-doubly_linked_lists/tests/task_2/main_0.c new file mode 100644 index 00000000..baa4ce2a --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_2/main_0.c @@ -0,0 +1,54 @@ +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _free_dlist - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_dlist(dlistint_t *head) +{ + if (head) + { + _free_dlist(head->next); + free(head); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int ints[2] = { + 9, + 6 + }; + dlistint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < 2; ++i) + { + ptr = add_dnodeint(&head, ints[i]); + if (!ptr) + { + printf("Failed\n"); + _free_dlist(head); + return (1); + } + } + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlist(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_2/main_1.c b/0x17-doubly_linked_lists/tests/task_2/main_1.c new file mode 100644 index 00000000..5f33f463 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_2/main_1.c @@ -0,0 +1,53 @@ +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _free_dlist - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_dlist(dlistint_t *head) +{ + if (head) + { + _free_dlist(head->next); + free(head); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int ints[1] = { + 9 + }; + dlistint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < 1; ++i) + { + ptr = add_dnodeint(&head, ints[i]); + if (!ptr) + { + printf("Failed\n"); + _free_dlist(head); + return (1); + } + } + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlist(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_2/main_2.c b/0x17-doubly_linked_lists/tests/task_2/main_2.c new file mode 100644 index 00000000..0053fb35 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_2/main_2.c @@ -0,0 +1,54 @@ +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + + +/** + * _free_dlist - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_dlist(dlistint_t *head) +{ + if (head) + { + _free_dlist(head->next); + free(head); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int ints[130] = { + 7856, 4460, -8622, -6734, -4625, 9495, 2277, -1368, -1080, -1057, -4294, -3307, 9065, -3329, -507, -6507, -5248, 9471, -9026, -6124, -6383, 8133, 2752, -7869, -6714, -2709, 8465, -643, -1376, 1241, 7203, -306, 5856, 1212, -4360, 1375, 2113, -458, 6376, 6979, -4259, -7266, -5247, -9745, 4475, -6326, -9484, -1812, 7753, -7113, 1797, 4361, 3600, -6086, 8727, 760, 588, -9504, -3123, -2760, -1722, -5455, 4398, 9749, 235, -5199, -1243, 8973, -6865, -8598, -8692, 1515, 6475, -8714, -1754, 1611, 8953, -9775, 285, 9344, 7857, 3656, -6463, 2829, -1213, 1626, 6407, -2399, 7755, 5376, -5928, -3927, -2289, -6307, -4162, -7075, 518, -8735, 3474, 9951, 6377, -1782, -4119, -3766, -619, 1656, -3739, 3468, -9458, -613, 2846, 1550, -1967, -7232, -4337, -1780, 4148, 4190, -5837, 605, -130, 6430, 1170, -4384, 1310, 9896, -4189, 9176, 2942, -7917 + }; + dlistint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < 130; ++i) + { + ptr = add_dnodeint(&head, ints[i]); + if (!ptr) + { + printf("Failed\n"); + _free_dlist(head); + return (1); + } + } + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlist(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_2/main_3.c b/0x17-doubly_linked_lists/tests/task_2/main_3.c new file mode 100644 index 00000000..2c2446c6 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_2/main_3.c @@ -0,0 +1,54 @@ +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _free_dlist - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_dlist(dlistint_t *head) +{ + if (head) + { + _free_dlist(head->next); + free(head); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int ints[2] = { + 0, + 9 + }; + dlistint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < 2; ++i) + { + ptr = add_dnodeint(&head, ints[i]); + if (!ptr) + { + printf("Failed\n"); + _free_dlist(head); + return (1); + } + } + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlist(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_3/3-main.c b/0x17-doubly_linked_lists/tests/task_3/3-main.c new file mode 100644 index 00000000..f81f6532 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_3/3-main.c @@ -0,0 +1,22 @@ +#include "lists.h" +/** + * main - check the code + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + dlistint_t *head; + + head = NULL; + add_dnodeint_end(&head, 0); + add_dnodeint_end(&head, 1); + add_dnodeint_end(&head, 2); + add_dnodeint_end(&head, 3); + add_dnodeint_end(&head, 4); + add_dnodeint_end(&head, 98); + add_dnodeint_end(&head, 402); + add_dnodeint_end(&head, 1024); + print_dlistint(head); + return (EXIT_SUCCESS); +} diff --git a/0x17-doubly_linked_lists/tests/task_3/main_0.c b/0x17-doubly_linked_lists/tests/task_3/main_0.c new file mode 100644 index 00000000..5395fbbb --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_3/main_0.c @@ -0,0 +1,54 @@ +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _free_dlist - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_dlist(dlistint_t *head) +{ + if (head) + { + _free_dlist(head->next); + free(head); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int ints[2] = { + 9, + 6 + }; + dlistint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < 2; ++i) + { + ptr = add_dnodeint_end(&head, ints[i]); + if (!ptr) + { + printf("Failed\n"); + _free_dlist(head); + return (1); + } + } + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlist(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_3/main_1.c b/0x17-doubly_linked_lists/tests/task_3/main_1.c new file mode 100644 index 00000000..b6069f13 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_3/main_1.c @@ -0,0 +1,53 @@ +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _free_dlist - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_dlist(dlistint_t *head) +{ + if (head) + { + _free_dlist(head->next); + free(head); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int ints[1] = { + 9 + }; + dlistint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < 1; ++i) + { + ptr = add_dnodeint_end(&head, ints[i]); + if (!ptr) + { + printf("Failed\n"); + _free_dlist(head); + return (1); + } + } + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlist(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_3/main_2.c b/0x17-doubly_linked_lists/tests/task_3/main_2.c new file mode 100644 index 00000000..631321f8 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_3/main_2.c @@ -0,0 +1,54 @@ +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + + +/** + * _free_dlist - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_dlist(dlistint_t *head) +{ + if (head) + { + _free_dlist(head->next); + free(head); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int ints[130] = { + 7856, 4460, -8622, -6734, -4625, 9495, 2277, -1368, -1080, -1057, -4294, -3307, 9065, -3329, -507, -6507, -5248, 9471, -9026, -6124, -6383, 8133, 2752, -7869, -6714, -2709, 8465, -643, -1376, 1241, 7203, -306, 5856, 1212, -4360, 1375, 2113, -458, 6376, 6979, -4259, -7266, -5247, -9745, 4475, -6326, -9484, -1812, 7753, -7113, 1797, 4361, 3600, -6086, 8727, 760, 588, -9504, -3123, -2760, -1722, -5455, 4398, 9749, 235, -5199, -1243, 8973, -6865, -8598, -8692, 1515, 6475, -8714, -1754, 1611, 8953, -9775, 285, 9344, 7857, 3656, -6463, 2829, -1213, 1626, 6407, -2399, 7755, 5376, -5928, -3927, -2289, -6307, -4162, -7075, 518, -8735, 3474, 9951, 6377, -1782, -4119, -3766, -619, 1656, -3739, 3468, -9458, -613, 2846, 1550, -1967, -7232, -4337, -1780, 4148, 4190, -5837, 605, -130, 6430, 1170, -4384, 1310, 9896, -4189, 9176, 2942, -7917 + }; + dlistint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < 130; ++i) + { + ptr = add_dnodeint_end(&head, ints[i]); + if (!ptr) + { + printf("Failed\n"); + _free_dlist(head); + return (1); + } + } + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlist(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_3/main_3.c b/0x17-doubly_linked_lists/tests/task_3/main_3.c new file mode 100644 index 00000000..302a0b62 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_3/main_3.c @@ -0,0 +1,54 @@ +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _free_dlist - Realease the memory allocated for a list + * + * @head: A pointer to the first node of the list to free + */ +void _free_dlist(dlistint_t *head) +{ + if (head) + { + _free_dlist(head->next); + free(head); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int ints[2] = { + 0, + 9 + }; + dlistint_t *ptr; + int i; + size_t n; + + head = NULL; + for (i = 0; i < 2; ++i) + { + ptr = add_dnodeint_end(&head, ints[i]); + if (!ptr) + { + printf("Failed\n"); + _free_dlist(head); + return (1); + } + } + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlist(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_4/4-main.c b/0x17-doubly_linked_lists/tests/task_4/4-main.c new file mode 100644 index 00000000..deae1735 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_4/4-main.c @@ -0,0 +1,25 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + dlistint_t *head; + + head = NULL; + add_dnodeint_end(&head, 0); + add_dnodeint_end(&head, 1); + add_dnodeint_end(&head, 2); + add_dnodeint_end(&head, 3); + add_dnodeint_end(&head, 4); + add_dnodeint_end(&head, 98); + add_dnodeint_end(&head, 402); + add_dnodeint_end(&head, 1024); + print_dlistint(head); + free_dlistint(head); + head = NULL; + return (EXIT_SUCCESS); +} diff --git a/0x17-doubly_linked_lists/tests/task_4/main_0.c b/0x17-doubly_linked_lists/tests/task_4/main_0.c new file mode 100644 index 00000000..678712d9 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_4/main_0.c @@ -0,0 +1,58 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = va_arg(args, int); + tmp->prev = prev; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *list; + size_t n; + + list = _create_dlist(2, 9, 6); + n = print_dlistint(list); + printf("-> %lu elements\n", n); + free_dlistint(list); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_4/main_1.c b/0x17-doubly_linked_lists/tests/task_4/main_1.c new file mode 100644 index 00000000..ab45bc7f --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_4/main_1.c @@ -0,0 +1,58 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = va_arg(args, int); + tmp->prev = prev; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *list; + size_t n; + + list = _create_dlist(1, 9); + n = print_dlistint(list); + printf("-> %lu elements\n", n); + free_dlistint(list); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_4/main_2.c b/0x17-doubly_linked_lists/tests/task_4/main_2.c new file mode 100644 index 00000000..d700a71c --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_4/main_2.c @@ -0,0 +1,58 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = va_arg(args, int); + tmp->prev = prev; + tmp->next = NULL; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *list; + size_t n; + + list = _create_dlist(130, 7856, 4460, -8622, -6734, -4625, 9495, 2277, -1368, -1080, -1057, -4294, -3307, 9065, -3329, -507, -6507, -5248, 9471, -9026, -6124, -6383, 8133, 2752, -7869, -6714, -2709, 8465, -643, -1376, 1241, 7203, -306, 5856, 1212, -4360, 1375, 2113, -458, 6376, 6979, -4259, -7266, -5247, -9745, 4475, -6326, -9484, -1812, 7753, -7113, 1797, 4361, 3600, -6086, 8727, 760, 588, -9504, -3123, -2760, -1722, -5455, 4398, 9749, 235, -5199, -1243, 8973, -6865, -8598, -8692, 1515, 6475, -8714, -1754, 1611, 8953, -9775, 285, 9344, 7857, 3656, -6463, 2829, -1213, 1626, 6407, -2399, 7755, 5376, -5928, -3927, -2289, -6307, -4162, -7075, 518, -8735, 3474, 9951, 6377, -1782, -4119, -3766, -619, 1656, -3739, 3468, -9458, -613, 2846, 1550, -1967, -7232, -4337, -1780, 4148, 4190, -5837, 605, -130, 6430, 1170, -4384, 1310, 9896, -4189, 9176, 2942, -7917); + n = print_dlistint(list); + printf("-> %lu elements\n", n); + free_dlistint(list); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_4/main_3.c b/0x17-doubly_linked_lists/tests/task_4/main_3.c new file mode 100644 index 00000000..61c49afa --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_4/main_3.c @@ -0,0 +1,15 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + free_dlistint(NULL); + printf("Freed !\n"); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_5/5-main.c b/0x17-doubly_linked_lists/tests/task_5/5-main.c new file mode 100644 index 00000000..6d5547fb --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_5/5-main.c @@ -0,0 +1,28 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *node; + + head = NULL; + add_dnodeint_end(&head, 0); + add_dnodeint_end(&head, 1); + add_dnodeint_end(&head, 2); + add_dnodeint_end(&head, 3); + add_dnodeint_end(&head, 4); + add_dnodeint_end(&head, 98); + add_dnodeint_end(&head, 402); + add_dnodeint_end(&head, 1024); + print_dlistint(head); + node = get_dnodeint_at_index(head, 5); + printf("%d\n", node->n); + free_dlistint(head); + head = NULL; + return (EXIT_SUCCESS); +} diff --git a/0x17-doubly_linked_lists/tests/task_5/main_0.c b/0x17-doubly_linked_lists/tests/task_5/main_0.c new file mode 100644 index 00000000..ab620ca7 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_5/main_0.c @@ -0,0 +1,77 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *n; + + head = _create_dlist(2, 9, 6); + n = get_dnodeint_at_index(head, 0); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_5/main_1.c b/0x17-doubly_linked_lists/tests/task_5/main_1.c new file mode 100644 index 00000000..dd8862b7 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_5/main_1.c @@ -0,0 +1,77 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *n; + + head = _create_dlist(1, 9); + n = get_dnodeint_at_index(head, 10); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_5/main_2.c b/0x17-doubly_linked_lists/tests/task_5/main_2.c new file mode 100644 index 00000000..5298ec24 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_5/main_2.c @@ -0,0 +1,81 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *n; + int i; + + head = _create_dlist(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + for (i = 0; i < 10; ++i) + { + n = get_dnodeint_at_index(head, i * 10); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + } + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_5/main_3.c b/0x17-doubly_linked_lists/tests/task_5/main_3.c new file mode 100644 index 00000000..e4e24b92 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_5/main_3.c @@ -0,0 +1,77 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *n; + + head = _create_dlist(2, -12, 6); + n = get_dnodeint_at_index(head, 1); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_5/main_4.c b/0x17-doubly_linked_lists/tests/task_5/main_4.c new file mode 100644 index 00000000..c6d0e5d5 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_5/main_4.c @@ -0,0 +1,22 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *n; + + head = NULL; + n = get_dnodeint_at_index(head, 0); + if (n) + printf("-> %d\n", n->n); + else + printf("(nil)\n"); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_6/6-main.c b/0x17-doubly_linked_lists/tests/task_6/6-main.c new file mode 100644 index 00000000..0dad7b43 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_6/6-main.c @@ -0,0 +1,27 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + dlistint_t *head; + int sum; + + head = NULL; + add_dnodeint_end(&head, 0); + add_dnodeint_end(&head, 1); + add_dnodeint_end(&head, 2); + add_dnodeint_end(&head, 3); + add_dnodeint_end(&head, 4); + add_dnodeint_end(&head, 98); + add_dnodeint_end(&head, 402); + add_dnodeint_end(&head, 1024); + sum = sum_dlistint(head); + printf("sum = %d\n", sum); + free_dlistint(head); + head = NULL; + return (EXIT_SUCCESS); +} diff --git a/0x17-doubly_linked_lists/tests/task_6/main_0.c b/0x17-doubly_linked_lists/tests/task_6/main_0.c new file mode 100644 index 00000000..054ddf85 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_6/main_0.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int n; + + head = _create_dlist(2, 9, 6); + n = sum_dlistint(head); + printf("-> %d\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_6/main_1.c b/0x17-doubly_linked_lists/tests/task_6/main_1.c new file mode 100644 index 00000000..3dc3100a --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_6/main_1.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int n; + + head = _create_dlist(1, 9); + n = sum_dlistint(head); + printf("-> %d\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_6/main_2.c b/0x17-doubly_linked_lists/tests/task_6/main_2.c new file mode 100644 index 00000000..1b5e2e48 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_6/main_2.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int n; + + head = _create_dlist(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + n = sum_dlistint(head); + printf("-> %d\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_6/main_3.c b/0x17-doubly_linked_lists/tests/task_6/main_3.c new file mode 100644 index 00000000..cd38acdc --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_6/main_3.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "lists.h" + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int n; + + head = _create_dlist(2, -12, 6); + n = sum_dlistint(head); + printf("-> %d\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_6/main_4.c b/0x17-doubly_linked_lists/tests/task_6/main_4.c new file mode 100644 index 00000000..ae851b10 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_6/main_4.c @@ -0,0 +1,19 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int n; + + head = NULL; + n = sum_dlistint(head); + printf("-> %d\n", n); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_7/7-main.c b/0x17-doubly_linked_lists/tests/task_7/7-main.c new file mode 100644 index 00000000..d8990f08 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_7/7-main.c @@ -0,0 +1,28 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + dlistint_t *head; + + head = NULL; + add_dnodeint_end(&head, 0); + add_dnodeint_end(&head, 1); + add_dnodeint_end(&head, 2); + add_dnodeint_end(&head, 3); + add_dnodeint_end(&head, 4); + add_dnodeint_end(&head, 98); + add_dnodeint_end(&head, 402); + add_dnodeint_end(&head, 1024); + print_dlistint(head); + printf("-----------------\n"); + insert_dnodeint_at_index(&head, 5, 4096); + print_dlistint(head); + free_dlistint(head); + head = NULL; + return (EXIT_SUCCESS); +} diff --git a/0x17-doubly_linked_lists/tests/task_7/main_0.c b/0x17-doubly_linked_lists/tests/task_7/main_0.c new file mode 100644 index 00000000..e3e5be2d --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_7/main_0.c @@ -0,0 +1,84 @@ +#include +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *node; + size_t n; + + head = _create_dlist(2, 9, 6); + node = insert_dnodeint_at_index(&head, 0, 98); + if (node) + printf("-> %d\n", node->n); + else + printf("(nil)\n"); + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_7/main_1.c b/0x17-doubly_linked_lists/tests/task_7/main_1.c new file mode 100644 index 00000000..9e139c35 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_7/main_1.c @@ -0,0 +1,84 @@ +#include +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *node; + size_t n; + + head = _create_dlist(1, 9); + node = insert_dnodeint_at_index(&head, 10, 98); + if (node) + printf("-> %d\n", node->n); + else + printf("(nil)\n"); + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_7/main_2.c b/0x17-doubly_linked_lists/tests/task_7/main_2.c new file mode 100644 index 00000000..bc9abb10 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_7/main_2.c @@ -0,0 +1,93 @@ +#include +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *node; + size_t n; + int i; + + head = _create_dlist(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + node = insert_dnodeint_at_index(&head, 150, 150); + if (node) + printf("-> %d\n", node->n); + else + printf("(nil)\n"); + for (i = 0; i < 10; ++i) + { + node = insert_dnodeint_at_index(&head, i * 10, 98); + if (node) + printf("-> %d\n", node->n); + else + printf("(nil)\n"); + } + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_7/main_3.c b/0x17-doubly_linked_lists/tests/task_7/main_3.c new file mode 100644 index 00000000..97994568 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_7/main_3.c @@ -0,0 +1,84 @@ +#include +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *node; + size_t n; + + head = _create_dlist(2, -12, 6); + node = insert_dnodeint_at_index(&head, 1, 98); + if (node) + printf("-> %d\n", node->n); + else + printf("(nil)\n"); + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_7/main_4.c b/0x17-doubly_linked_lists/tests/task_7/main_4.c new file mode 100644 index 00000000..c5f2aa25 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_7/main_4.c @@ -0,0 +1,29 @@ +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + dlistint_t *node; + size_t n; + + head = NULL; + node = insert_dnodeint_at_index(&head, 0, 98); + if (node) + printf("-> %d\n", node->n); + else + printf("(nil)\n"); + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_8/8-main.c b/0x17-doubly_linked_lists/tests/task_8/8-main.c new file mode 100644 index 00000000..2b2a076f --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_8/8-main.c @@ -0,0 +1,65 @@ +#include "lists.h" + +/** + * main - check the code + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + dlistint_t *head; + + head = NULL; + add_dnodeint_end(&head, 0); + add_dnodeint_end(&head, 1); + add_dnodeint_end(&head, 2); + add_dnodeint_end(&head, 3); + add_dnodeint_end(&head, 4); + add_dnodeint_end(&head, 98); + add_dnodeint_end(&head, 402); + add_dnodeint_end(&head, 1024); + print_dlistint(head); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 5); + print_dlistint(head); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + print_dlistint(head); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + print_dlistint(head); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + print_dlistint(head); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + print_dlistint(head); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + print_dlistint(head); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + print_dlistint(head); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + printf("-----------------\n"); + delete_dnodeint_at_index(&head, 0); + print_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_8/main_0.c b/0x17-doubly_linked_lists/tests/task_8/main_0.c new file mode 100644 index 00000000..14b79c04 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_8/main_0.c @@ -0,0 +1,81 @@ +#include +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int r; + size_t n; + + head = _create_dlist(2, 9, 6); + r = delete_dnodeint_at_index(&head, 0); + printf("-> %d\n", r); + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_8/main_1.c b/0x17-doubly_linked_lists/tests/task_8/main_1.c new file mode 100644 index 00000000..874603d1 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_8/main_1.c @@ -0,0 +1,81 @@ +#include +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int r; + size_t n; + + head = _create_dlist(1, 9); + r = delete_dnodeint_at_index(&head, 10); + printf("-> %d\n", r); + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_8/main_2.c b/0x17-doubly_linked_lists/tests/task_8/main_2.c new file mode 100644 index 00000000..bdbb81eb --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_8/main_2.c @@ -0,0 +1,85 @@ +#include +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int r; + int i; + size_t n; + + head = _create_dlist(150, 919955, -221576, -859826, -673092, -227441, -274387, -436509, -877540, -312324, -132610, -451068, -634665, 265754, 680646, -103124, 455298, -674129, -505322, -480779, -976755, -61049, 752586, -780309, -225601, 545574, 967894, -952912, -710816, -464807, -83928, -144352, 272984, -103436, -469044, 727842, -471465, 632218, 484071, 164176, -888075, 375238, -368407, -126852, 747849, -444324, -508919, 212726, 921259, 145606, -168736, 482175, 417315, -144374, 766661, 459419, -971797, 614621, 395332, 382023, 937524, 281705, 106337, 588634, 914645, 904202, 123836, -912500, -937165, 904917, 514808, -429722, 364031, 4549, 849042, -130394, -678079, 866332, 290840, -398001, 894631, -843992, 650923, 759358, -173141, -814339, 102554, -152928, -384918, -694858, -909105, 758674, -903057, 995532, -473530, 170832, -283768, 202502, -77236, -828210, -5871, 751590, 617269, -113835, -424265, 885113, -228101, 348995, -597740, 488342, 178172, 636416, -115361, 349580, 598603, 463378, -892583, -426662, 246129, -831511, -287468, 694342, -935414, 230693, 22105, -803356, -739612, -134577, -702335, -952953, 825327, -199434, 162758, -725024, 554175, 644023, -983839, -931458, -825615, -121051, -2142, 331891, -330280, 547907, -626812, 107124, -140852, 862279, -694146, 775690, -98861); + for (i = 0; i < 10; ++i) + { + r = delete_dnodeint_at_index(&head, i * 10); + printf("-> %d\n", r); + } + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_8/main_3.c b/0x17-doubly_linked_lists/tests/task_8/main_3.c new file mode 100644 index 00000000..327c6bd7 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_8/main_3.c @@ -0,0 +1,81 @@ +#include +#include +#include +#include "lists.h" + +size_t _print_dlistint_backward(const dlistint_t *h); + +/** + * _create_dlist - Create a list + * + * @n: Number of elements + * + * Return: A pointer to the first element of the created list + */ +dlistint_t *_create_dlist(unsigned int n, ...) +{ + va_list args; + dlistint_t *list; + dlistint_t *tmp; + dlistint_t *prev; + unsigned int i; + int nb; + + va_start(args, n); + prev = tmp = list = NULL; + i = 0; + while (i < n) + { + nb = va_arg(args, int); + tmp = malloc(sizeof(*tmp)); + if (!tmp) + return (NULL); + tmp->n = nb; + tmp->next = NULL; + tmp->prev = prev; + if (!list) + list = tmp; + if (prev) + prev->next = tmp; + prev = tmp; + ++i; + } + va_end(args); + return (list); +} + +/** + * _free_dlistint - Free a list + * + * @list: A pointer to the first element of a list to free + */ +void _free_dlistint(dlistint_t *list) +{ + if (list) + { + _free_dlistint(list->next); + free(list); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int r; + size_t n; + + head = _create_dlist(2, -12, 6); + r = delete_dnodeint_at_index(&head, 1); + printf("-> %d\n", r); + n = print_dlistint(head); + printf("-> %lu elements\n", n); + n = _print_dlistint_backward(head); + printf("-> %lu elements\n", n); + _free_dlistint(head); + return (0); +} diff --git a/0x17-doubly_linked_lists/tests/task_8/main_4.c b/0x17-doubly_linked_lists/tests/task_8/main_4.c new file mode 100644 index 00000000..9786f266 --- /dev/null +++ b/0x17-doubly_linked_lists/tests/task_8/main_4.c @@ -0,0 +1,19 @@ +#include +#include +#include "lists.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always 0. + */ +int main(void) +{ + dlistint_t *head; + int r; + + head = NULL; + r = delete_dnodeint_at_index(&head, 0); + printf("-> %d\n", r); + return (0); +} diff --git a/0x18-dynamic_libraries/tests/task_1/source_0.c b/0x18-dynamic_libraries/tests/task_1/source_0.c new file mode 100644 index 00000000..8a739cb9 --- /dev/null +++ b/0x18-dynamic_libraries/tests/task_1/source_0.c @@ -0,0 +1,8 @@ +/** + * source_0 - Source 0 + * Return: Always 0 + */ +int source_0(void) +{ + return (0); +} diff --git a/0x18-dynamic_libraries/tests/task_1/source_1.c b/0x18-dynamic_libraries/tests/task_1/source_1.c new file mode 100644 index 00000000..1578b56a --- /dev/null +++ b/0x18-dynamic_libraries/tests/task_1/source_1.c @@ -0,0 +1,8 @@ +/** + * source_1 - Source 1 + * Return: Always 0 + */ +int source_1(void) +{ + return (0); +} diff --git a/0x18-dynamic_libraries/tests/task_1/source_2.c b/0x18-dynamic_libraries/tests/task_1/source_2.c new file mode 100644 index 00000000..677433ee --- /dev/null +++ b/0x18-dynamic_libraries/tests/task_1/source_2.c @@ -0,0 +1,8 @@ +/** + * source_2 - Source 2 + * Return: Always 0 + */ +int source_2(void) +{ + return (0); +} diff --git a/0x1A-hash_tables/tests/task_0/main_0.c b/0x1A-hash_tables/tests/task_0/main_0.c new file mode 100644 index 00000000..e10f9f8f --- /dev/null +++ b/0x1A-hash_tables/tests/task_0/main_0.c @@ -0,0 +1,20 @@ +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + size_t i; + + ht = hash_table_create(2048); + if (!ht || ht->size != 2048 || !ht->array) + return (EXIT_FAILURE); + /*Loop through the array, should not SEGV*/ + for (i = 0; i < 2048 && ht->array[i]; ++i); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_1/main_0.c b/0x1A-hash_tables/tests/task_1/main_0.c new file mode 100644 index 00000000..74cdff00 --- /dev/null +++ b/0x1A-hash_tables/tests/task_1/main_0.c @@ -0,0 +1,17 @@ +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + char *s; + + s = "Holberton School !"; + printf("%lu\n", hash_djb2((unsigned char *)s)); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_1/main_1.c b/0x1A-hash_tables/tests/task_1/main_1.c new file mode 100644 index 00000000..1abbcf13 --- /dev/null +++ b/0x1A-hash_tables/tests/task_1/main_1.c @@ -0,0 +1,17 @@ +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + char *s; + + s = "98 Battery Street"; + printf("%lu\n", hash_djb2((unsigned char *)s)); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_1/main_2.c b/0x1A-hash_tables/tests/task_1/main_2.c new file mode 100644 index 00000000..d4553128 --- /dev/null +++ b/0x1A-hash_tables/tests/task_1/main_2.c @@ -0,0 +1,17 @@ +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + char *s; + + s = ""; + printf("%lu\n", hash_djb2((unsigned char *)s)); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_1/main_3.c b/0x1A-hash_tables/tests/task_1/main_3.c new file mode 100644 index 00000000..30f187f9 --- /dev/null +++ b/0x1A-hash_tables/tests/task_1/main_3.c @@ -0,0 +1,17 @@ +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + char *s; + + s = "\x07\x08\x09\x0A\x0BCisfun\x0C"; + printf("%lu\n", hash_djb2((unsigned char *)s)); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_2/main_0.c b/0x1A-hash_tables/tests/task_2/main_0.c new file mode 100644 index 00000000..89511f6e --- /dev/null +++ b/0x1A-hash_tables/tests/task_2/main_0.c @@ -0,0 +1,20 @@ +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + char *s; + unsigned long int hash_table_array_size; + + hash_table_array_size = 512; + s = "C is awesome"; + printf("%lu\n", hash_djb2((unsigned char *)s)); + printf("%lu\n", key_index((unsigned char *)s, hash_table_array_size)); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_2/main_1.c b/0x1A-hash_tables/tests/task_2/main_1.c new file mode 100644 index 00000000..65b80588 --- /dev/null +++ b/0x1A-hash_tables/tests/task_2/main_1.c @@ -0,0 +1,20 @@ +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + char *s; + unsigned long int hash_table_array_size; + + hash_table_array_size = 2048; + s = "FullstackSoftwareEngineer"; + printf("%lu\n", hash_djb2((unsigned char *)s)); + printf("%lu\n", key_index((unsigned char *)s, hash_table_array_size)); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_2/main_2.c b/0x1A-hash_tables/tests/task_2/main_2.c new file mode 100644 index 00000000..d40da1e5 --- /dev/null +++ b/0x1A-hash_tables/tests/task_2/main_2.c @@ -0,0 +1,20 @@ +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + char *s; + unsigned long int hash_table_array_size; + + hash_table_array_size = 1; + s = ""; + printf("%lu\n", hash_djb2((unsigned char *)s)); + printf("%lu\n", key_index((unsigned char *)s, hash_table_array_size)); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_3/main_0.c b/0x1A-hash_tables/tests/task_3/main_0.c new file mode 100644 index 00000000..a152879a --- /dev/null +++ b/0x1A-hash_tables/tests/task_3/main_0.c @@ -0,0 +1,44 @@ +#include +#include +#include +#include "hash_tables.h" + +void _hash_table_print(const hash_table_t *ht) +{ + unsigned long int i; + hash_node_t *p; + char n; + + for (i = 0; ht && i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + int ret; + + ht = hash_table_create(1024); + ret = hash_table_set(ht, "C", "is fun"); + printf("%d\n", ret); + _hash_table_print(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_3/main_1.c b/0x1A-hash_tables/tests/task_3/main_1.c new file mode 100644 index 00000000..e8d9d51f --- /dev/null +++ b/0x1A-hash_tables/tests/task_3/main_1.c @@ -0,0 +1,70 @@ +#include +#include +#include +#include "hash_tables.h" + +void _hash_table_print(const hash_table_t *ht) +{ + unsigned long int i; + hash_node_t *p; + char n; + + for (i = 0; ht && i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + int ret; + + ht = hash_table_create(1024); + ret = hash_table_set(ht, "USA", "Washington"); + printf("%d\n", ret); + ret = hash_table_set(ht, "France", "Paris"); + printf("%d\n", ret); + ret = hash_table_set(ht, "UK", "London"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Spain", "Madrid"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Germany", "Berlin"); + printf("%d\n", ret); + ret = hash_table_set(ht, "China", "Beijing"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Russia", "Moscow"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Bahrain", "Manama"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Canada", "Ottawa"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Brazil", "Brasilia"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Sweden", "Stockholm"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Iceland", "Reykjavik"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Japan", "Tokyo"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Australia", "Canberra"); + printf("%d\n", ret); + _hash_table_print(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_3/main_2.c b/0x1A-hash_tables/tests/task_3/main_2.c new file mode 100644 index 00000000..4b7ede15 --- /dev/null +++ b/0x1A-hash_tables/tests/task_3/main_2.c @@ -0,0 +1,70 @@ +#include +#include +#include +#include "hash_tables.h" + +void _hash_table_print(const hash_table_t *ht) +{ + unsigned long int i; + hash_node_t *p; + char n; + + for (i = 0; ht && i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + int ret; + + ht = hash_table_create(30); + ret = hash_table_set(ht, "USA", "Washington"); + printf("%d\n", ret); + ret = hash_table_set(ht, "France", "Paris"); + printf("%d\n", ret); + ret = hash_table_set(ht, "UK", "London"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Spain", "Madrid"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Germany", "Berlin"); + printf("%d\n", ret); + ret = hash_table_set(ht, "China", "Beijing"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Russia", "Moscow"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Bahrain", "Manama"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Canada", "Ottawa"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Brazil", "Brasilia"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Sweden", "Stockholm"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Iceland", "Reykjavik"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Japan", "Tokyo"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Australia", "Canberra"); + printf("%d\n", ret); + _hash_table_print(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_3/main_3.c b/0x1A-hash_tables/tests/task_3/main_3.c new file mode 100644 index 00000000..3ef4d5da --- /dev/null +++ b/0x1A-hash_tables/tests/task_3/main_3.c @@ -0,0 +1,70 @@ +#include +#include +#include +#include "hash_tables.h" + +void _hash_table_print(const hash_table_t *ht) +{ + unsigned long int i; + hash_node_t *p; + char n; + + for (i = 0; ht && i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + int ret; + + ht = hash_table_create(1); + ret = hash_table_set(ht, "USA", "Washington"); + printf("%d\n", ret); + ret = hash_table_set(ht, "France", "Paris"); + printf("%d\n", ret); + ret = hash_table_set(ht, "UK", "London"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Spain", "Madrid"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Germany", "Berlin"); + printf("%d\n", ret); + ret = hash_table_set(ht, "China", "Beijing"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Russia", "Moscow"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Bahrain", "Manama"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Canada", "Ottawa"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Brazil", "Brasilia"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Sweden", "Stockholm"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Iceland", "Reykjavik"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Japan", "Tokyo"); + printf("%d\n", ret); + ret = hash_table_set(ht, "Australia", "Canberra"); + printf("%d\n", ret); + _hash_table_print(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_3/main_4.c b/0x1A-hash_tables/tests/task_3/main_4.c new file mode 100644 index 00000000..3c9816aa --- /dev/null +++ b/0x1A-hash_tables/tests/task_3/main_4.c @@ -0,0 +1,48 @@ +#include +#include +#include +#include "hash_tables.h" + +void _hash_table_print(const hash_table_t *ht) +{ + unsigned long int i; + hash_node_t *p; + char n; + + for (i = 0; ht && i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + char *key = strdup("USA"); + char *value = strdup("Washington"); + int ret; + + ht = hash_table_create(1); + ret = hash_table_set(ht, key, value); + printf("%d\n", ret); + free(key); + free(value); + _hash_table_print(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_3/main_5.c b/0x1A-hash_tables/tests/task_3/main_5.c new file mode 100644 index 00000000..f89629c9 --- /dev/null +++ b/0x1A-hash_tables/tests/task_3/main_5.c @@ -0,0 +1,50 @@ +#include +#include +#include +#include "hash_tables.h" + +void _hash_table_print(const hash_table_t *ht) +{ + unsigned long int i; + hash_node_t *p; + char n; + + for (i = 0; ht && i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + int ret; + + ht = hash_table_create(10); + ret = hash_table_set(ht, "Holberton", "is cool"); + printf("%d\n", ret); + _hash_table_print(ht); + ret = hash_table_set(ht, "Holberton", "is soooo cooool"); + printf("%d\n", ret); + _hash_table_print(ht); + ret = hash_table_set(ht, "Holberton", "is awesome"); + printf("%d\n", ret); + _hash_table_print(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_3/main_6.c b/0x1A-hash_tables/tests/task_3/main_6.c new file mode 100644 index 00000000..899df504 --- /dev/null +++ b/0x1A-hash_tables/tests/task_3/main_6.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + int ret; + + ret = hash_table_set(NULL, "Holberton", "is cool"); + printf("%d\n", ret); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_4/main_0.c b/0x1A-hash_tables/tests/task_4/main_0.c new file mode 100644 index 00000000..a6e3cdd0 --- /dev/null +++ b/0x1A-hash_tables/tests/task_4/main_0.c @@ -0,0 +1,35 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + char *value; + + ht = hash_table_create(1024); + hash_table_set(ht, "USA", "Washington"); + hash_table_set(ht, "France", "Paris"); + hash_table_set(ht, "UK", "London"); + hash_table_set(ht, "Spain", "Madrid"); + hash_table_set(ht, "Germany", "Berlin"); + hash_table_set(ht, "China", "Beijing"); + hash_table_set(ht, "Russia", "Moscow"); + hash_table_set(ht, "Bahrain", "Manama"); + hash_table_set(ht, "Canada", "Ottawa"); + hash_table_set(ht, "Brazil", "Brasilia"); + hash_table_set(ht, "Sweden", "Stockholm"); + hash_table_set(ht, "Iceland", "Reykjavik"); + hash_table_set(ht, "Japan", "Tokyo"); + hash_table_set(ht, "Australia", "Canberra"); + + value = hash_table_get(ht, "USA"); + printf("%s:%s\n", "USA", value); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_4/main_1.c b/0x1A-hash_tables/tests/task_4/main_1.c new file mode 100644 index 00000000..e18d24d0 --- /dev/null +++ b/0x1A-hash_tables/tests/task_4/main_1.c @@ -0,0 +1,35 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + char *value; + + ht = hash_table_create(30); + hash_table_set(ht, "USA", "Washington"); + hash_table_set(ht, "France", "Paris"); + hash_table_set(ht, "UK", "London"); + hash_table_set(ht, "Spain", "Madrid"); + hash_table_set(ht, "Germany", "Berlin"); + hash_table_set(ht, "China", "Beijing"); + hash_table_set(ht, "Russia", "Moscow"); + hash_table_set(ht, "Bahrain", "Manama"); + hash_table_set(ht, "Canada", "Ottawa"); + hash_table_set(ht, "Brazil", "Brasilia"); + hash_table_set(ht, "Sweden", "Stockholm"); + hash_table_set(ht, "Iceland", "Reykjavik"); + hash_table_set(ht, "Japan", "Tokyo"); + hash_table_set(ht, "Australia", "Canberra"); + + value = hash_table_get(ht, "Canada"); + printf("%s:%s\n", "Canada", value); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_4/main_2.c b/0x1A-hash_tables/tests/task_4/main_2.c new file mode 100644 index 00000000..634fbd27 --- /dev/null +++ b/0x1A-hash_tables/tests/task_4/main_2.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + char *value; + + value = hash_table_get(NULL, "Canada"); + printf("%s:%s\n", "Canada", value); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_4/main_3.c b/0x1A-hash_tables/tests/task_4/main_3.c new file mode 100644 index 00000000..b80059b7 --- /dev/null +++ b/0x1A-hash_tables/tests/task_4/main_3.c @@ -0,0 +1,35 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + char *value; + + ht = hash_table_create(1024); + hash_table_set(ht, "USA", "Washington"); + hash_table_set(ht, "France", "Paris"); + hash_table_set(ht, "UK", "London"); + hash_table_set(ht, "Spain", "Madrid"); + hash_table_set(ht, "Germany", "Berlin"); + hash_table_set(ht, "China", "Beijing"); + hash_table_set(ht, "Russia", "Moscow"); + hash_table_set(ht, "Bahrain", "Manama"); + hash_table_set(ht, "Canada", "Ottawa"); + hash_table_set(ht, "Brazil", "Brasilia"); + hash_table_set(ht, "Sweden", "Stockholm"); + hash_table_set(ht, "Iceland", "Reykjavik"); + hash_table_set(ht, "Japan", "Tokyo"); + hash_table_set(ht, "Australia", "Canberra"); + + value = hash_table_get(ht, "Poland"); + printf("%s:%s\n", "Poland", value); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_5/main_0.c b/0x1A-hash_tables/tests/task_5/main_0.c new file mode 100644 index 00000000..90bf7c34 --- /dev/null +++ b/0x1A-hash_tables/tests/task_5/main_0.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + + ht = hash_table_create(1024); + hash_table_set(ht, "USA", "Washington"); + hash_table_set(ht, "France", "Paris"); + hash_table_set(ht, "UK", "London"); + hash_table_set(ht, "Spain", "Madrid"); + hash_table_set(ht, "Germany", "Berlin"); + hash_table_set(ht, "China", "Beijing"); + hash_table_set(ht, "Russia", "Moscow"); + hash_table_set(ht, "Bahrain", "Manama"); + hash_table_set(ht, "Canada", "Ottawa"); + hash_table_set(ht, "Brazil", "Brasilia"); + hash_table_set(ht, "Sweden", "Stockholm"); + hash_table_set(ht, "Iceland", "Reykjavik"); + hash_table_set(ht, "Japan", "Tokyo"); + hash_table_set(ht, "Australia", "Canberra"); + + hash_table_print(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_5/main_1.c b/0x1A-hash_tables/tests/task_5/main_1.c new file mode 100644 index 00000000..d28c7fd4 --- /dev/null +++ b/0x1A-hash_tables/tests/task_5/main_1.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + + ht = hash_table_create(30); + hash_table_set(ht, "USA", "Washington"); + hash_table_set(ht, "France", "Paris"); + hash_table_set(ht, "UK", "London"); + hash_table_set(ht, "Spain", "Madrid"); + hash_table_set(ht, "Germany", "Berlin"); + hash_table_set(ht, "China", "Beijing"); + hash_table_set(ht, "Russia", "Moscow"); + hash_table_set(ht, "Bahrain", "Manama"); + hash_table_set(ht, "Canada", "Ottawa"); + hash_table_set(ht, "Brazil", "Brasilia"); + hash_table_set(ht, "Sweden", "Stockholm"); + hash_table_set(ht, "Iceland", "Reykjavik"); + hash_table_set(ht, "Japan", "Tokyo"); + hash_table_set(ht, "Australia", "Canberra"); + + hash_table_print(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_5/main_2.c b/0x1A-hash_tables/tests/task_5/main_2.c new file mode 100644 index 00000000..6113ab5a --- /dev/null +++ b/0x1A-hash_tables/tests/task_5/main_2.c @@ -0,0 +1,15 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_print(NULL); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_6/main_0.c b/0x1A-hash_tables/tests/task_6/main_0.c new file mode 100644 index 00000000..8806d28f --- /dev/null +++ b/0x1A-hash_tables/tests/task_6/main_0.c @@ -0,0 +1,17 @@ +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + + ht = hash_table_create(1024); + hash_table_set(ht, "C", "is fun"); + hash_table_delete(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_6/main_1.c b/0x1A-hash_tables/tests/task_6/main_1.c new file mode 100644 index 00000000..6cb1b5f0 --- /dev/null +++ b/0x1A-hash_tables/tests/task_6/main_1.c @@ -0,0 +1,30 @@ +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + + ht = hash_table_create(1024); + hash_table_set(ht, "USA", "Washington"); + hash_table_set(ht, "France", "Paris"); + hash_table_set(ht, "UK", "London"); + hash_table_set(ht, "Spain", "Madrid"); + hash_table_set(ht, "Germany", "Berlin"); + hash_table_set(ht, "China", "Beijing"); + hash_table_set(ht, "Russia", "Moscow"); + hash_table_set(ht, "Bahrain", "Manama"); + hash_table_set(ht, "Canada", "Ottawa"); + hash_table_set(ht, "Brazil", "Brasilia"); + hash_table_set(ht, "Sweden", "Stockholm"); + hash_table_set(ht, "Iceland", "Reykjavik"); + hash_table_set(ht, "Japan", "Tokyo"); + hash_table_set(ht, "Australia", "Canberra"); + hash_table_delete(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_6/main_2.c b/0x1A-hash_tables/tests/task_6/main_2.c new file mode 100644 index 00000000..0578afc7 --- /dev/null +++ b/0x1A-hash_tables/tests/task_6/main_2.c @@ -0,0 +1,30 @@ +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + + ht = hash_table_create(30); + hash_table_set(ht, "USA", "Washington"); + hash_table_set(ht, "France", "Paris"); + hash_table_set(ht, "UK", "London"); + hash_table_set(ht, "Spain", "Madrid"); + hash_table_set(ht, "Germany", "Berlin"); + hash_table_set(ht, "China", "Beijing"); + hash_table_set(ht, "Russia", "Moscow"); + hash_table_set(ht, "Bahrain", "Manama"); + hash_table_set(ht, "Canada", "Ottawa"); + hash_table_set(ht, "Brazil", "Brasilia"); + hash_table_set(ht, "Sweden", "Stockholm"); + hash_table_set(ht, "Iceland", "Reykjavik"); + hash_table_set(ht, "Japan", "Tokyo"); + hash_table_set(ht, "Australia", "Canberra"); + hash_table_delete(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_6/main_3.c b/0x1A-hash_tables/tests/task_6/main_3.c new file mode 100644 index 00000000..8a6dd4a5 --- /dev/null +++ b/0x1A-hash_tables/tests/task_6/main_3.c @@ -0,0 +1,30 @@ +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + + ht = hash_table_create(1); + hash_table_set(ht, "USA", "Washington"); + hash_table_set(ht, "France", "Paris"); + hash_table_set(ht, "UK", "London"); + hash_table_set(ht, "Spain", "Madrid"); + hash_table_set(ht, "Germany", "Berlin"); + hash_table_set(ht, "China", "Beijing"); + hash_table_set(ht, "Russia", "Moscow"); + hash_table_set(ht, "Bahrain", "Manama"); + hash_table_set(ht, "Canada", "Ottawa"); + hash_table_set(ht, "Brazil", "Brasilia"); + hash_table_set(ht, "Sweden", "Stockholm"); + hash_table_set(ht, "Iceland", "Reykjavik"); + hash_table_set(ht, "Japan", "Tokyo"); + hash_table_set(ht, "Australia", "Canberra"); + hash_table_delete(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_6/main_4.c b/0x1A-hash_tables/tests/task_6/main_4.c new file mode 100644 index 00000000..445364a2 --- /dev/null +++ b/0x1A-hash_tables/tests/task_6/main_4.c @@ -0,0 +1,22 @@ +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + char *key = strdup("USA"); + char *value = strdup("Washington"); + + ht = hash_table_create(1); + hash_table_set(ht, key, value); + free(key); + free(value); + hash_table_delete(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_6/main_5.c b/0x1A-hash_tables/tests/task_6/main_5.c new file mode 100644 index 00000000..24cbb29c --- /dev/null +++ b/0x1A-hash_tables/tests/task_6/main_5.c @@ -0,0 +1,19 @@ +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + hash_table_t *ht; + + ht = hash_table_create(10); + hash_table_set(ht, "Holberton", "is cool"); + hash_table_set(ht, "Holberton", "is soooo cooool"); + hash_table_set(ht, "Holberton", "is awesome"); + hash_table_delete(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_0.c b/0x1A-hash_tables/tests/task_7/main_0.c new file mode 100644 index 00000000..51331152 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_0.c @@ -0,0 +1,20 @@ +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + size_t i; + + ht = shash_table_create(2048); + if (!ht || ht->size != 2048 || !ht->array) + return (EXIT_FAILURE); + /*Loop through the array, should not SEGV*/ + for (i = 0; i < 2048 && ht->array[i]; ++i); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_1.c b/0x1A-hash_tables/tests/task_7/main_1.c new file mode 100644 index 00000000..21e60674 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_1.c @@ -0,0 +1,70 @@ +#include +#include +#include +#include "hash_tables.h" + +void _shash_table_print_array(const shash_table_t *ht) +{ + unsigned long int i; + shash_node_t *p; + char n; + + if (!ht) + return; + for (i = 0; i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p->next; + n = 1; + } + printf("\n"); + } +} + +void _shash_table_print_sorted(const shash_table_t *ht) +{ + shash_node_t *p; + char n; + + if (!ht) + return; + printf("{"); + n = 0; + p = ht->shead; + while (p) + { + if (n == 1) + { + printf(", "); + } + printf("'%s': '%s'", p->key, p->value); + n = 1; + p = p->snext; + } + printf("}\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + int ret; + + ht = shash_table_create(1024); + ret = shash_table_set(ht, "C", "is fun"); + printf("%d\n", ret); + _shash_table_print_array(ht); + _shash_table_print_sorted(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_10.c b/0x1A-hash_tables/tests/task_7/main_10.c new file mode 100644 index 00000000..8bfd568f --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_10.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + char *value; + + value = shash_table_get(NULL, "USA"); + printf("%s:%s\n", "USA", value); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_11.c b/0x1A-hash_tables/tests/task_7/main_11.c new file mode 100644 index 00000000..604a6385 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_11.c @@ -0,0 +1,35 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + char *value; + + ht = shash_table_create(1024); + shash_table_set(ht, "USA", "Washington"); + shash_table_set(ht, "France", "Paris"); + shash_table_set(ht, "UK", "London"); + shash_table_set(ht, "Spain", "Madrid"); + shash_table_set(ht, "Germany", "Berlin"); + shash_table_set(ht, "China", "Beijing"); + shash_table_set(ht, "Russia", "Moscow"); + shash_table_set(ht, "Bahrain", "Manama"); + shash_table_set(ht, "Canada", "Ottawa"); + shash_table_set(ht, "Brazil", "Brasilia"); + shash_table_set(ht, "Sweden", "Stockholm"); + shash_table_set(ht, "Iceland", "Reykjavik"); + shash_table_set(ht, "Japan", "Tokyo"); + shash_table_set(ht, "Australia", "Canberra"); + + value = shash_table_get(ht, "Poland"); + printf("%s:%s\n", "Poland", value); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_12.c b/0x1A-hash_tables/tests/task_7/main_12.c new file mode 100644 index 00000000..0cff0c96 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_12.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + + ht = shash_table_create(1024); + shash_table_set(ht, "USA", "Washington"); + shash_table_set(ht, "France", "Paris"); + shash_table_set(ht, "UK", "London"); + shash_table_set(ht, "Spain", "Madrid"); + shash_table_set(ht, "Germany", "Berlin"); + shash_table_set(ht, "China", "Beijing"); + shash_table_set(ht, "Russia", "Moscow"); + shash_table_set(ht, "Bahrain", "Manama"); + shash_table_set(ht, "Canada", "Ottawa"); + shash_table_set(ht, "Brazil", "Brasilia"); + shash_table_set(ht, "Sweden", "Stockholm"); + shash_table_set(ht, "Iceland", "Reykjavik"); + shash_table_set(ht, "Japan", "Tokyo"); + shash_table_set(ht, "Australia", "Canberra"); + + shash_table_print(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_13.c b/0x1A-hash_tables/tests/task_7/main_13.c new file mode 100644 index 00000000..3bd26c3f --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_13.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + + ht = shash_table_create(30); + shash_table_set(ht, "USA", "Washington"); + shash_table_set(ht, "France", "Paris"); + shash_table_set(ht, "UK", "London"); + shash_table_set(ht, "Spain", "Madrid"); + shash_table_set(ht, "Germany", "Berlin"); + shash_table_set(ht, "China", "Beijing"); + shash_table_set(ht, "Russia", "Moscow"); + shash_table_set(ht, "Bahrain", "Manama"); + shash_table_set(ht, "Canada", "Ottawa"); + shash_table_set(ht, "Brazil", "Brasilia"); + shash_table_set(ht, "Sweden", "Stockholm"); + shash_table_set(ht, "Iceland", "Reykjavik"); + shash_table_set(ht, "Japan", "Tokyo"); + shash_table_set(ht, "Australia", "Canberra"); + + shash_table_print(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_14.c b/0x1A-hash_tables/tests/task_7/main_14.c new file mode 100644 index 00000000..8845f1b6 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_14.c @@ -0,0 +1,15 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_print(NULL); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_15.c b/0x1A-hash_tables/tests/task_7/main_15.c new file mode 100644 index 00000000..ca139227 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_15.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + + ht = shash_table_create(1024); + shash_table_set(ht, "USA", "Washington"); + shash_table_set(ht, "France", "Paris"); + shash_table_set(ht, "UK", "London"); + shash_table_set(ht, "Spain", "Madrid"); + shash_table_set(ht, "Germany", "Berlin"); + shash_table_set(ht, "China", "Beijing"); + shash_table_set(ht, "Russia", "Moscow"); + shash_table_set(ht, "Bahrain", "Manama"); + shash_table_set(ht, "Canada", "Ottawa"); + shash_table_set(ht, "Brazil", "Brasilia"); + shash_table_set(ht, "Sweden", "Stockholm"); + shash_table_set(ht, "Iceland", "Reykjavik"); + shash_table_set(ht, "Japan", "Tokyo"); + shash_table_set(ht, "Australia", "Canberra"); + + shash_table_print_rev(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_16.c b/0x1A-hash_tables/tests/task_7/main_16.c new file mode 100644 index 00000000..87ad2199 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_16.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + + ht = shash_table_create(30); + shash_table_set(ht, "USA", "Washington"); + shash_table_set(ht, "France", "Paris"); + shash_table_set(ht, "UK", "London"); + shash_table_set(ht, "Spain", "Madrid"); + shash_table_set(ht, "Germany", "Berlin"); + shash_table_set(ht, "China", "Beijing"); + shash_table_set(ht, "Russia", "Moscow"); + shash_table_set(ht, "Bahrain", "Manama"); + shash_table_set(ht, "Canada", "Ottawa"); + shash_table_set(ht, "Brazil", "Brasilia"); + shash_table_set(ht, "Sweden", "Stockholm"); + shash_table_set(ht, "Iceland", "Reykjavik"); + shash_table_set(ht, "Japan", "Tokyo"); + shash_table_set(ht, "Australia", "Canberra"); + + shash_table_print_rev(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_17.c b/0x1A-hash_tables/tests/task_7/main_17.c new file mode 100644 index 00000000..45e7627e --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_17.c @@ -0,0 +1,15 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_print_rev(NULL); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_2.c b/0x1A-hash_tables/tests/task_7/main_2.c new file mode 100644 index 00000000..04fbdce5 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_2.c @@ -0,0 +1,96 @@ +#include +#include +#include +#include "hash_tables.h" + +void _shash_table_print_array(const shash_table_t *ht) +{ + unsigned long int i; + shash_node_t *p; + char n; + + if (!ht) + return; + for (i = 0; i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +void _shash_table_print_sorted(const shash_table_t *ht) +{ + shash_node_t *p; + char n; + + if (!ht) + return; + printf("{"); + n = 0; + p = ht->shead; + while (p) + { + if (n == 1) + { + printf(", "); + } + printf("'%s': '%s'", p->key, p->value); + n = 1; + p = p->snext; + } + printf("}\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + int ret; + + ht = shash_table_create(1024); + ret = shash_table_set(ht, "USA", "Washington"); + printf("%d\n", ret); + ret = shash_table_set(ht, "France", "Paris"); + printf("%d\n", ret); + ret = shash_table_set(ht, "UK", "London"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Spain", "Madrid"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Germany", "Berlin"); + printf("%d\n", ret); + ret = shash_table_set(ht, "China", "Beijing"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Russia", "Moscow"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Bahrain", "Manama"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Canada", "Ottawa"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Brazil", "Brasilia"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Sweden", "Stockholm"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Iceland", "Reykjavik"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Japan", "Tokyo"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Australia", "Canberra"); + printf("%d\n", ret); + _shash_table_print_array(ht); + _shash_table_print_sorted(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_3.c b/0x1A-hash_tables/tests/task_7/main_3.c new file mode 100644 index 00000000..ed007108 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_3.c @@ -0,0 +1,96 @@ +#include +#include +#include +#include "hash_tables.h" + +void _shash_table_print_array(const shash_table_t *ht) +{ + unsigned long int i; + shash_node_t *p; + char n; + + if (!ht) + return; + for (i = 0; i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +void _shash_table_print_sorted(const shash_table_t *ht) +{ + shash_node_t *p; + char n; + + if (!ht) + return; + printf("{"); + n = 0; + p = ht->shead; + while (p) + { + if (n == 1) + { + printf(", "); + } + printf("'%s': '%s'", p->key, p->value); + n = 1; + p = p->snext; + } + printf("}\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + int ret; + + ht = shash_table_create(30); + ret = shash_table_set(ht, "USA", "Washington"); + printf("%d\n", ret); + ret = shash_table_set(ht, "France", "Paris"); + printf("%d\n", ret); + ret = shash_table_set(ht, "UK", "London"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Spain", "Madrid"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Germany", "Berlin"); + printf("%d\n", ret); + ret = shash_table_set(ht, "China", "Beijing"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Russia", "Moscow"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Bahrain", "Manama"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Canada", "Ottawa"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Brazil", "Brasilia"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Sweden", "Stockholm"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Iceland", "Reykjavik"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Japan", "Tokyo"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Australia", "Canberra"); + printf("%d\n", ret); + _shash_table_print_array(ht); + _shash_table_print_sorted(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_4.c b/0x1A-hash_tables/tests/task_7/main_4.c new file mode 100644 index 00000000..548e3849 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_4.c @@ -0,0 +1,96 @@ +#include +#include +#include +#include "hash_tables.h" + +void _shash_table_print_array(const shash_table_t *ht) +{ + unsigned long int i; + shash_node_t *p; + char n; + + if (!ht) + return; + for (i = 0; i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +void _shash_table_print_sorted(const shash_table_t *ht) +{ + shash_node_t *p; + char n; + + if (!ht) + return; + printf("{"); + n = 0; + p = ht->shead; + while (p) + { + if (n == 1) + { + printf(", "); + } + printf("'%s': '%s'", p->key, p->value); + n = 1; + p = p->snext; + } + printf("}\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + int ret; + + ht = shash_table_create(1); + ret = shash_table_set(ht, "USA", "Washington"); + printf("%d\n", ret); + ret = shash_table_set(ht, "France", "Paris"); + printf("%d\n", ret); + ret = shash_table_set(ht, "UK", "London"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Spain", "Madrid"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Germany", "Berlin"); + printf("%d\n", ret); + ret = shash_table_set(ht, "China", "Beijing"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Russia", "Moscow"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Bahrain", "Manama"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Canada", "Ottawa"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Brazil", "Brasilia"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Sweden", "Stockholm"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Iceland", "Reykjavik"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Japan", "Tokyo"); + printf("%d\n", ret); + ret = shash_table_set(ht, "Australia", "Canberra"); + printf("%d\n", ret); + _shash_table_print_array(ht); + _shash_table_print_sorted(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_5.c b/0x1A-hash_tables/tests/task_7/main_5.c new file mode 100644 index 00000000..2a5dae2a --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_5.c @@ -0,0 +1,74 @@ +#include +#include +#include +#include "hash_tables.h" + +void _shash_table_print_array(const shash_table_t *ht) +{ + unsigned long int i; + shash_node_t *p; + char n; + + if (!ht) + return; + for (i = 0; i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +void _shash_table_print_sorted(const shash_table_t *ht) +{ + shash_node_t *p; + char n; + + if (!ht) + return; + printf("{"); + n = 0; + p = ht->shead; + while (p) + { + if (n == 1) + { + printf(", "); + } + printf("'%s': '%s'", p->key, p->value); + n = 1; + p = p->snext; + } + printf("}\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + char *key = strdup("USA"); + char *value = strdup("Washington"); + int ret; + + ht = shash_table_create(1); + ret = shash_table_set(ht, key, value); + printf("%d\n", ret); + free(key); + free(value); + _shash_table_print_array(ht); + _shash_table_print_sorted(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_6.c b/0x1A-hash_tables/tests/task_7/main_6.c new file mode 100644 index 00000000..b16260d3 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_6.c @@ -0,0 +1,78 @@ +#include +#include +#include +#include "hash_tables.h" + +void _shash_table_print_array(const shash_table_t *ht) +{ + unsigned long int i; + shash_node_t *p; + char n; + + if (!ht) + return; + for (i = 0; i < ht->size; i++) + { + p = ht->array[i]; + printf("[%lu]", i); + n = 0; + while (p) + { + if (n) + printf(", "); + printf("'%s': '%s'", p->key, p->value); + p = p-> next; + n = 1; + } + printf("\n"); + } +} + +void _shash_table_print_sorted(const shash_table_t *ht) +{ + shash_node_t *p; + char n; + + if (!ht) + return; + printf("{"); + n = 0; + p = ht->shead; + while (p) + { + if (n == 1) + { + printf(", "); + } + printf("'%s': '%s'", p->key, p->value); + n = 1; + p = p->snext; + } + printf("}\n"); +} + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + int ret; + + ht = shash_table_create(10); + ret = shash_table_set(ht, "Holberton", "is cool"); + printf("%d\n", ret); + _shash_table_print_array(ht); + _shash_table_print_sorted(ht); + ret = shash_table_set(ht, "Holberton", "is soooo cooool"); + printf("%d\n", ret); + _shash_table_print_array(ht); + _shash_table_print_sorted(ht); + ret = shash_table_set(ht, "Holberton", "is awesome"); + printf("%d\n", ret); + _shash_table_print_array(ht); + _shash_table_print_sorted(ht); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_7.c b/0x1A-hash_tables/tests/task_7/main_7.c new file mode 100644 index 00000000..1fafc2d7 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_7.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + int ret; + + ret = shash_table_set(NULL, "Holberton", "is cool"); + printf("%d\n", ret); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_8.c b/0x1A-hash_tables/tests/task_7/main_8.c new file mode 100644 index 00000000..b8bdf191 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_8.c @@ -0,0 +1,35 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + char *value; + + ht = shash_table_create(1024); + shash_table_set(ht, "USA", "Washington"); + shash_table_set(ht, "France", "Paris"); + shash_table_set(ht, "UK", "London"); + shash_table_set(ht, "Spain", "Madrid"); + shash_table_set(ht, "Germany", "Berlin"); + shash_table_set(ht, "China", "Beijing"); + shash_table_set(ht, "Russia", "Moscow"); + shash_table_set(ht, "Bahrain", "Manama"); + shash_table_set(ht, "Canada", "Ottawa"); + shash_table_set(ht, "Brazil", "Brasilia"); + shash_table_set(ht, "Sweden", "Stockholm"); + shash_table_set(ht, "Iceland", "Reykjavik"); + shash_table_set(ht, "Japan", "Tokyo"); + shash_table_set(ht, "Australia", "Canberra"); + + value = shash_table_get(ht, "USA"); + printf("%s:%s\n", "USA", value); + return (EXIT_SUCCESS); +} diff --git a/0x1A-hash_tables/tests/task_7/main_9.c b/0x1A-hash_tables/tests/task_7/main_9.c new file mode 100644 index 00000000..eff4fde0 --- /dev/null +++ b/0x1A-hash_tables/tests/task_7/main_9.c @@ -0,0 +1,35 @@ +#include +#include +#include +#include "hash_tables.h" + +/** + * main - check the code for Holberton School students. + * + * Return: Always EXIT_SUCCESS. + */ +int main(void) +{ + shash_table_t *ht; + char *value; + + ht = shash_table_create(30); + shash_table_set(ht, "USA", "Washington"); + shash_table_set(ht, "France", "Paris"); + shash_table_set(ht, "UK", "London"); + shash_table_set(ht, "Spain", "Madrid"); + shash_table_set(ht, "Germany", "Berlin"); + shash_table_set(ht, "China", "Beijing"); + shash_table_set(ht, "Russia", "Moscow"); + shash_table_set(ht, "Bahrain", "Manama"); + shash_table_set(ht, "Canada", "Ottawa"); + shash_table_set(ht, "Brazil", "Brasilia"); + shash_table_set(ht, "Sweden", "Stockholm"); + shash_table_set(ht, "Iceland", "Reykjavik"); + shash_table_set(ht, "Japan", "Tokyo"); + shash_table_set(ht, "Australia", "Canberra"); + + value = shash_table_get(ht, "Canada"); + printf("%s:%s\n", "Canada", value); + return (EXIT_SUCCESS); +} diff --git a/0x1C-makefiles/tests/task_0/m.h b/0x1C-makefiles/tests/task_0/m.h new file mode 100644 index 00000000..2dc627a8 --- /dev/null +++ b/0x1C-makefiles/tests/task_0/m.h @@ -0,0 +1,9 @@ +#ifndef __M_H__ +#define __M_H__ + +#include +#include + +void print_school(void); + +#endif diff --git a/0x1C-makefiles/tests/task_0/main.c b/0x1C-makefiles/tests/task_0/main.c new file mode 100644 index 00000000..ce1255de --- /dev/null +++ b/0x1C-makefiles/tests/task_0/main.c @@ -0,0 +1,12 @@ +#include "m.h" + +/** + * main - Entry point + * + * Return: Always + */ +int main(void) +{ + print_school(); + return (EXIT_SUCCESS); +} diff --git a/0x1C-makefiles/tests/task_0/main_0.c b/0x1C-makefiles/tests/task_0/main_0.c new file mode 100644 index 00000000..08882e5c --- /dev/null +++ b/0x1C-makefiles/tests/task_0/main_0.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("This main should not be compiled !\n"); + return (0); +} diff --git a/0x1C-makefiles/tests/task_1/m.h b/0x1C-makefiles/tests/task_1/m.h new file mode 100644 index 00000000..2dc627a8 --- /dev/null +++ b/0x1C-makefiles/tests/task_1/m.h @@ -0,0 +1,9 @@ +#ifndef __M_H__ +#define __M_H__ + +#include +#include + +void print_school(void); + +#endif diff --git a/0x1C-makefiles/tests/task_1/main.c b/0x1C-makefiles/tests/task_1/main.c new file mode 100644 index 00000000..ce1255de --- /dev/null +++ b/0x1C-makefiles/tests/task_1/main.c @@ -0,0 +1,12 @@ +#include "m.h" + +/** + * main - Entry point + * + * Return: Always + */ +int main(void) +{ + print_school(); + return (EXIT_SUCCESS); +} diff --git a/0x1C-makefiles/tests/task_1/main_0.c b/0x1C-makefiles/tests/task_1/main_0.c new file mode 100644 index 00000000..08882e5c --- /dev/null +++ b/0x1C-makefiles/tests/task_1/main_0.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("This main should not be compiled !\n"); + return (0); +} diff --git a/0x1C-makefiles/tests/task_1/school.c b/0x1C-makefiles/tests/task_1/school.c new file mode 100644 index 00000000..f4f1afcf --- /dev/null +++ b/0x1C-makefiles/tests/task_1/school.c @@ -0,0 +1,36 @@ +#include "m.h" + +/** + * print_school - print the logo of Holberton + * + * Return: Nothing + * + */ +void print_school(void) +{ + printf("j#0000000000000000000000000000000000000\n"); + printf("j#000000000000000000@Q**g00000000000000\n"); + printf("j#0000000000000000*]++]4000000000000000\n"); + printf("j#000000000000000k]++]++*N#000000000000\n"); + printf("j#0000000000000*C+++]++]++]J*0000000000\n"); + printf("j#00000000000@+]++qwwwp=]++++]*00000000\n"); + printf("j#0000000000*+++]q#0000k+]+]++]4#000000\n"); + printf("j#00000000*C+]+]w#0000*]+++]+]++0000000\n"); + printf("j#0000we+]wW000***C++]++]+]++++40000000\n"); + printf("j#000000000*C+]+]]+]++]++]++]+q#0000000\n"); + printf("j#0000000*]+]+++++++]++]+++]+++J0000000\n"); + printf("j#000000C++]=]+]+]+]++]++]+]+]+]=000000\n"); + printf("j#00000k+]++]+++]+]++qwW0000000AgW00000\n"); + printf("j#00000k++]++]+]+++qW#00000000000000000\n"); + printf("j#00000A]++]++]++]++J**0000000000000000\n"); + printf("j#000000e]++]+++]++]++]J000000000000000\n"); + printf("j#0000000A]++]+]++]++]++000000000000000\n"); + printf("j#000000000w]++]+]++]+qW#00000000000000\n"); + printf("j#00000000000w]++++]*0##000000000000000\n"); + printf("j#0000000000000Ag]+]++*0000000000000000\n"); + printf("j#00000000000000000we]+]Q00000000000000\n"); + printf("j#0000000000000@@+wgdA]+J00000000000000\n"); + printf("j#0000000000000k?qwgdC=]4#0000000000000\n"); + printf("j#00000000000000w]+]++qw#00000000000000\n"); + printf("\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); +} diff --git a/0x1C-makefiles/tests/task_2/m.h b/0x1C-makefiles/tests/task_2/m.h new file mode 100644 index 00000000..2dc627a8 --- /dev/null +++ b/0x1C-makefiles/tests/task_2/m.h @@ -0,0 +1,9 @@ +#ifndef __M_H__ +#define __M_H__ + +#include +#include + +void print_school(void); + +#endif diff --git a/0x1C-makefiles/tests/task_2/main.c b/0x1C-makefiles/tests/task_2/main.c new file mode 100644 index 00000000..ce1255de --- /dev/null +++ b/0x1C-makefiles/tests/task_2/main.c @@ -0,0 +1,12 @@ +#include "m.h" + +/** + * main - Entry point + * + * Return: Always + */ +int main(void) +{ + print_school(); + return (EXIT_SUCCESS); +} diff --git a/0x1C-makefiles/tests/task_2/main_0.c b/0x1C-makefiles/tests/task_2/main_0.c new file mode 100644 index 00000000..08882e5c --- /dev/null +++ b/0x1C-makefiles/tests/task_2/main_0.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("This main should not be compiled !\n"); + return (0); +} diff --git a/0x1C-makefiles/tests/task_3/m.h b/0x1C-makefiles/tests/task_3/m.h new file mode 100644 index 00000000..2dc627a8 --- /dev/null +++ b/0x1C-makefiles/tests/task_3/m.h @@ -0,0 +1,9 @@ +#ifndef __M_H__ +#define __M_H__ + +#include +#include + +void print_school(void); + +#endif diff --git a/0x1C-makefiles/tests/task_3/main.c b/0x1C-makefiles/tests/task_3/main.c new file mode 100644 index 00000000..ce1255de --- /dev/null +++ b/0x1C-makefiles/tests/task_3/main.c @@ -0,0 +1,12 @@ +#include "m.h" + +/** + * main - Entry point + * + * Return: Always + */ +int main(void) +{ + print_school(); + return (EXIT_SUCCESS); +} diff --git a/0x1C-makefiles/tests/task_3/main_0.c b/0x1C-makefiles/tests/task_3/main_0.c new file mode 100644 index 00000000..08882e5c --- /dev/null +++ b/0x1C-makefiles/tests/task_3/main_0.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("This main should not be compiled !\n"); + return (0); +} diff --git a/0x1C-makefiles/tests/task_3/school.c b/0x1C-makefiles/tests/task_3/school.c new file mode 100644 index 00000000..f4f1afcf --- /dev/null +++ b/0x1C-makefiles/tests/task_3/school.c @@ -0,0 +1,36 @@ +#include "m.h" + +/** + * print_school - print the logo of Holberton + * + * Return: Nothing + * + */ +void print_school(void) +{ + printf("j#0000000000000000000000000000000000000\n"); + printf("j#000000000000000000@Q**g00000000000000\n"); + printf("j#0000000000000000*]++]4000000000000000\n"); + printf("j#000000000000000k]++]++*N#000000000000\n"); + printf("j#0000000000000*C+++]++]++]J*0000000000\n"); + printf("j#00000000000@+]++qwwwp=]++++]*00000000\n"); + printf("j#0000000000*+++]q#0000k+]+]++]4#000000\n"); + printf("j#00000000*C+]+]w#0000*]+++]+]++0000000\n"); + printf("j#0000we+]wW000***C++]++]+]++++40000000\n"); + printf("j#000000000*C+]+]]+]++]++]++]+q#0000000\n"); + printf("j#0000000*]+]+++++++]++]+++]+++J0000000\n"); + printf("j#000000C++]=]+]+]+]++]++]+]+]+]=000000\n"); + printf("j#00000k+]++]+++]+]++qwW0000000AgW00000\n"); + printf("j#00000k++]++]+]+++qW#00000000000000000\n"); + printf("j#00000A]++]++]++]++J**0000000000000000\n"); + printf("j#000000e]++]+++]++]++]J000000000000000\n"); + printf("j#0000000A]++]+]++]++]++000000000000000\n"); + printf("j#000000000w]++]+]++]+qW#00000000000000\n"); + printf("j#00000000000w]++++]*0##000000000000000\n"); + printf("j#0000000000000Ag]+]++*0000000000000000\n"); + printf("j#00000000000000000we]+]Q00000000000000\n"); + printf("j#0000000000000@@+wgdA]+J00000000000000\n"); + printf("j#0000000000000k?qwgdC=]4#0000000000000\n"); + printf("j#00000000000000w]+]++qw#00000000000000\n"); + printf("\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); +} diff --git a/0x1C-makefiles/tests/task_4/m.h b/0x1C-makefiles/tests/task_4/m.h new file mode 100644 index 00000000..2dc627a8 --- /dev/null +++ b/0x1C-makefiles/tests/task_4/m.h @@ -0,0 +1,9 @@ +#ifndef __M_H__ +#define __M_H__ + +#include +#include + +void print_school(void); + +#endif diff --git a/0x1C-makefiles/tests/task_4/main.c b/0x1C-makefiles/tests/task_4/main.c new file mode 100644 index 00000000..ce1255de --- /dev/null +++ b/0x1C-makefiles/tests/task_4/main.c @@ -0,0 +1,12 @@ +#include "m.h" + +/** + * main - Entry point + * + * Return: Always + */ +int main(void) +{ + print_school(); + return (EXIT_SUCCESS); +} diff --git a/0x1C-makefiles/tests/task_4/main_0.c b/0x1C-makefiles/tests/task_4/main_0.c new file mode 100644 index 00000000..08882e5c --- /dev/null +++ b/0x1C-makefiles/tests/task_4/main_0.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("This main should not be compiled !\n"); + return (0); +} diff --git a/0x1C-makefiles/tests/task_5/main_0.py b/0x1C-makefiles/tests/task_5/main_0.py new file mode 100644 index 00000000..fb76cd88 --- /dev/null +++ b/0x1C-makefiles/tests/task_5/main_0.py @@ -0,0 +1,15 @@ +#!/usr/bin/python3 +""" +Test +""" +island_perimeter = __import__('5-island_perimeter').island_perimeter + +if __name__ == "__main__": + grid = [ + [0, 0, 0, 0, 0, 0], + [0, 1, 0, 0, 0, 0], + [0, 1, 0, 0, 0, 0], + [0, 1, 1, 1, 0, 0], + [0, 0, 0, 0, 0, 0] + ] + print(island_perimeter(grid)) diff --git a/0x1C-makefiles/tests/task_5/main_1.py b/0x1C-makefiles/tests/task_5/main_1.py new file mode 100644 index 00000000..60cda33d --- /dev/null +++ b/0x1C-makefiles/tests/task_5/main_1.py @@ -0,0 +1,13 @@ +#!/usr/bin/python3 +""" +Test +""" +island_perimeter = __import__('5-island_perimeter').island_perimeter + +if __name__ == "__main__": + grid = [ + [0, 0, 0, 0, 0, 0], + [0, 1, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0] + ] + print(island_perimeter(grid)) diff --git a/0x1C-makefiles/tests/task_5/main_2.py b/0x1C-makefiles/tests/task_5/main_2.py new file mode 100644 index 00000000..1a974f26 --- /dev/null +++ b/0x1C-makefiles/tests/task_5/main_2.py @@ -0,0 +1,14 @@ +#!/usr/bin/python3 +""" +Test +""" +island_perimeter = __import__('5-island_perimeter').island_perimeter + +if __name__ == "__main__": + grid = [ + [0, 0, 0, 0, 0, 0], + [0, 1, 1, 1, 0, 0], + [0, 1, 1, 1, 0, 0], + [0, 1, 1, 1, 0, 0] + ] + print(island_perimeter(grid)) diff --git a/0x1C-makefiles/tests/task_5/main_3.py b/0x1C-makefiles/tests/task_5/main_3.py new file mode 100644 index 00000000..afa7d23a --- /dev/null +++ b/0x1C-makefiles/tests/task_5/main_3.py @@ -0,0 +1,13 @@ +#!/usr/bin/python3 +""" +Test +""" +island_perimeter = __import__('5-island_perimeter').island_perimeter + +if __name__ == "__main__": + grid = [ + [0], + [0], + [0] + ] + print(island_perimeter(grid)) diff --git a/0x1C-makefiles/tests/task_5/main_4.py b/0x1C-makefiles/tests/task_5/main_4.py new file mode 100644 index 00000000..73327862 --- /dev/null +++ b/0x1C-makefiles/tests/task_5/main_4.py @@ -0,0 +1,13 @@ +#!/usr/bin/python3 +""" +Test +""" +island_perimeter = __import__('5-island_perimeter').island_perimeter + +if __name__ == "__main__": + grid = [ + [1, 1, 1, 1, 1], + [1, 1, 1, 1, 1], + [1, 1, 1, 1, 1] + ] + print(island_perimeter(grid)) diff --git a/0x1C-makefiles/tests/task_5/main_5.py b/0x1C-makefiles/tests/task_5/main_5.py new file mode 100644 index 00000000..7c92ed64 --- /dev/null +++ b/0x1C-makefiles/tests/task_5/main_5.py @@ -0,0 +1,15 @@ +#!/usr/bin/python3 +""" +Test +""" +island_perimeter = __import__('5-island_perimeter').island_perimeter + +if __name__ == "__main__": + grid = [ + [0, 0, 0, 0, 0, 0], + [0, 1, 1, 0, 0, 0], + [1, 1, 1, 0, 0, 0], + [0, 1, 1, 1, 0, 0], + [0, 0, 0, 1, 1, 1] + ] + print(island_perimeter(grid)) diff --git a/0x1C-makefiles/tests/task_5/main_6.py b/0x1C-makefiles/tests/task_5/main_6.py new file mode 100644 index 00000000..33b257f9 --- /dev/null +++ b/0x1C-makefiles/tests/task_5/main_6.py @@ -0,0 +1,15 @@ +#!/usr/bin/python3 +""" +Test +""" +island_perimeter = __import__('5-island_perimeter').island_perimeter + +if __name__ == "__main__": + grid = [ + [0, 1, 0, 0, 0, 1], + [1, 1, 0, 0, 0, 1], + [1, 1, 0, 1, 1, 1], + [0, 1, 1, 1, 0, 0], + [0, 0, 1, 1, 0, 0] + ] + print(island_perimeter(grid)) diff --git a/0x1C-makefiles/tests/task_6/m.h b/0x1C-makefiles/tests/task_6/m.h new file mode 100644 index 00000000..2dc627a8 --- /dev/null +++ b/0x1C-makefiles/tests/task_6/m.h @@ -0,0 +1,9 @@ +#ifndef __M_H__ +#define __M_H__ + +#include +#include + +void print_school(void); + +#endif diff --git a/0x1C-makefiles/tests/task_6/main.c b/0x1C-makefiles/tests/task_6/main.c new file mode 100644 index 00000000..ce1255de --- /dev/null +++ b/0x1C-makefiles/tests/task_6/main.c @@ -0,0 +1,12 @@ +#include "m.h" + +/** + * main - Entry point + * + * Return: Always + */ +int main(void) +{ + print_school(); + return (EXIT_SUCCESS); +} diff --git a/0x1C-makefiles/tests/task_6/main_0.c b/0x1C-makefiles/tests/task_6/main_0.c new file mode 100644 index 00000000..08882e5c --- /dev/null +++ b/0x1C-makefiles/tests/task_6/main_0.c @@ -0,0 +1,12 @@ +#include + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("This main should not be compiled !\n"); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_0/main_0.c b/0x1E-search_algorithms/tests/task_0/main_0.c new file mode 100644 index 00000000..6a0f683c --- /dev/null +++ b/0x1E-search_algorithms/tests/task_0/main_0.c @@ -0,0 +1,17 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[10] = { + 8, 1, 42, 3, 4, 42, 6, 7, -1, 9 + }; + + printf("Found at index: %d\n", linear_search(array, 10, 3)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_0/main_1.c b/0x1E-search_algorithms/tests/task_0/main_1.c new file mode 100644 index 00000000..9a218fef --- /dev/null +++ b/0x1E-search_algorithms/tests/task_0/main_1.c @@ -0,0 +1,17 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[10] = { + 10, 1, 21, 3, 4, 21, 6, 7, -1, 9 + }; + + printf("Found at index: %d\n", linear_search(array, 10, 21)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_0/main_2.c b/0x1E-search_algorithms/tests/task_0/main_2.c new file mode 100644 index 00000000..dab9bc37 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_0/main_2.c @@ -0,0 +1,17 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[10] = { + 10, 1, 42, 3, 4, 21, 6, 7, -1, 9 + }; + + printf("Found at index: %d\n", linear_search(array, 10, 123456789)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_0/main_3.c b/0x1E-search_algorithms/tests/task_0/main_3.c new file mode 100644 index 00000000..68e76ff1 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_0/main_3.c @@ -0,0 +1,13 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Found at index: %d\n", linear_search(NULL, 0, 0)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_1/main_0.c b/0x1E-search_algorithms/tests/task_1/main_0.c new file mode 100644 index 00000000..9ae9e5c1 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_1/main_0.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[17] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 25, 48, 89 + }; + printf("Found at index: %d\n", binary_search(array, 16, 12)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_1/main_1.c b/0x1E-search_algorithms/tests/task_1/main_1.c new file mode 100644 index 00000000..e8f1260c --- /dev/null +++ b/0x1E-search_algorithms/tests/task_1/main_1.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[17] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 25, 48, 89 + }; + printf("Found at index: %d\n", binary_search(array, 16, 123456789)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_1/main_2.c b/0x1E-search_algorithms/tests/task_1/main_2.c new file mode 100644 index 00000000..40d46b19 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_1/main_2.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[17] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 25, 48, 89 + }; + printf("Found at index: %d\n", binary_search(array, 10, 13)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_1/main_3.c b/0x1E-search_algorithms/tests/task_1/main_3.c new file mode 100644 index 00000000..5b43ac62 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_1/main_3.c @@ -0,0 +1,13 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Found at index: %d\n", binary_search(NULL, 0, 0)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_10/main_0.c b/0x1E-search_algorithms/tests/task_10/main_0.c new file mode 100644 index 00000000..f5be4ffe --- /dev/null +++ b/0x1E-search_algorithms/tests/task_10/main_0.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[16] = { + 0, 1, 2, 3, 4, 7, 12, 15, 18, 19, 23, 54, 61, 62, 76, 99 + }; + printf("Found at index: %d\n", exponential_search(array, 16, 76)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_10/main_1.c b/0x1E-search_algorithms/tests/task_10/main_1.c new file mode 100644 index 00000000..5edbfeb0 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_10/main_1.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[16] = { + 0, 1, 2, 3, 4, 7, 12, 15, 18, 19, 23, 54, 61, 62, 76, 99 + }; + printf("Found at index: %d\n", exponential_search(array, 16, 3)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_10/main_2.c b/0x1E-search_algorithms/tests/task_10/main_2.c new file mode 100644 index 00000000..a297e2e6 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_10/main_2.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[16] = { + 0, 1, 2, 3, 4, 7, 12, 15, 18, 19, 23, 54, 61, 62, 76, 99 + }; + printf("Found at index: %d\n", exponential_search(array, 16, 123456789)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_10/main_3.c b/0x1E-search_algorithms/tests/task_10/main_3.c new file mode 100644 index 00000000..5990385f --- /dev/null +++ b/0x1E-search_algorithms/tests/task_10/main_3.c @@ -0,0 +1,13 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Found at index: %d\n", exponential_search(NULL, 0, 0)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_11/main_0.c b/0x1E-search_algorithms/tests/task_11/main_0.c new file mode 100644 index 00000000..eec3d2aa --- /dev/null +++ b/0x1E-search_algorithms/tests/task_11/main_0.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[17] = { + 3, 4, 5, 7, 7, 7, 8, 9, 10, 11, 21, 31, 33, 33, 33, 44, 51 + }; + printf("Found at index: %d\n", advanced_binary(array, 17, 31)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_11/main_1.c b/0x1E-search_algorithms/tests/task_11/main_1.c new file mode 100644 index 00000000..c1fedb52 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_11/main_1.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[17] = { + 3, 4, 5, 7, 7, 7, 8, 9, 10, 11, 21, 31, 33, 33, 33, 44, 51 + }; + printf("Found at index: %d\n", advanced_binary(array, 17, 123456789)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_11/main_2.c b/0x1E-search_algorithms/tests/task_11/main_2.c new file mode 100644 index 00000000..2e07a510 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_11/main_2.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[17] = { + 3, 4, 5, 7, 7, 7, 8, 9, 10, 11, 21, 31, 33, 33, 33, 44, 51 + }; + printf("Found at index: %d\n", advanced_binary(array, 17, 7)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_11/main_3.c b/0x1E-search_algorithms/tests/task_11/main_3.c new file mode 100644 index 00000000..c82be941 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_11/main_3.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[17] = { + 3, 4, 5, 7, 7, 7, 8, 9, 10, 11, 21, 33, 33, 33, 35, 44, 51 + }; + printf("Found at index: %d\n", advanced_binary(array, 17, 33)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_11/main_4.c b/0x1E-search_algorithms/tests/task_11/main_4.c new file mode 100644 index 00000000..117eb54a --- /dev/null +++ b/0x1E-search_algorithms/tests/task_11/main_4.c @@ -0,0 +1,13 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Found at index: %d\n", advanced_binary(NULL, 0, 0)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_12/main_0.c b/0x1E-search_algorithms/tests/task_12/main_0.c new file mode 100644 index 00000000..c28ed39b --- /dev/null +++ b/0x1E-search_algorithms/tests/task_12/main_0.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include "search_algos.h" + +listint_t *create_list(int *array, size_t size); +void free_list(listint_t *list); + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + listint_t *head, *res; + int array[23] = { + 0, 1, 2, 3, 4, 7, 12, 15, 18, 19, 23, 53, 61, 62, 100, 100, 100, 111, 122, 123, 145, 155, 260 + }; + + head = create_list(array, 23); + res = jump_list(head, 23, 62); + printf("Found at index: %lu\n", res->index); + free_list(head); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_13/main_0.c b/0x1E-search_algorithms/tests/task_13/main_0.c new file mode 100644 index 00000000..575b1b21 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_13/main_0.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include "search_algos.h" + +skiplist_t *create_skiplist(int *array, size_t size); +void free_skiplist(skiplist_t *list); + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + skiplist_t *head, *res; + int array[23] = { + 0, 1, 2, 3, 4, 7, 12, 15, 18, 19, 23, 53, 61, 62, 100, 100, 100, 111, 122, 123, 145, 155, 260 + }; + + head = create_skiplist(array, 23); + res = linear_skip(head, 62); + printf("Found at index: %lu\n", res->index); + free_skiplist(head); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_13/main_1.c b/0x1E-search_algorithms/tests/task_13/main_1.c new file mode 100644 index 00000000..9572778c --- /dev/null +++ b/0x1E-search_algorithms/tests/task_13/main_1.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include "search_algos.h" + +skiplist_t *create_skiplist(int *array, size_t size); +void free_skiplist(skiplist_t *list); + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + skiplist_t *head, *res; + int array[23] = { + 0, 1, 2, 3, 4, 7, 12, 15, 18, 19, 23, 53, 61, 62, 100, 100, 100, 111, 122, 123, 145, 155, 260 + }; + + head = create_skiplist(array, 23); + res = linear_skip(head, 100); + printf("Found at index: %lu\n", res->index); + free_skiplist(head); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_13/main_2.c b/0x1E-search_algorithms/tests/task_13/main_2.c new file mode 100644 index 00000000..fd3773c8 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_13/main_2.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include "search_algos.h" + +skiplist_t *create_skiplist(int *array, size_t size); +void free_skiplist(skiplist_t *list); + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + skiplist_t *head, *res; + int array[23] = { + 0, 1, 2, 3, 4, 7, 12, 15, 18, 19, 23, 53, 61, 62, 100, 100, 100, 111, 122, 123, 145, 155, 260 + }; + + head = create_skiplist(array, 23); + res = linear_skip(head, 123456789); + printf("Found at index: %p\n", (void *) res); + free_skiplist(head); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_13/main_3.c b/0x1E-search_algorithms/tests/task_13/main_3.c new file mode 100644 index 00000000..81f21eef --- /dev/null +++ b/0x1E-search_algorithms/tests/task_13/main_3.c @@ -0,0 +1,14 @@ +#include +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Found at index: %p\n", (void *) linear_skip(NULL, 0)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_7/main_0.c b/0x1E-search_algorithms/tests/task_7/main_0.c new file mode 100644 index 00000000..5c808ba6 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_7/main_0.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[15] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 23, 47, 89, 160 + }; + printf("Found at index: %d\n", jump_search(array, 15, 11)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_7/main_1.c b/0x1E-search_algorithms/tests/task_7/main_1.c new file mode 100644 index 00000000..e5c9bdef --- /dev/null +++ b/0x1E-search_algorithms/tests/task_7/main_1.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[15] = { + 0, 1, 2, 3, 4, 5, 6, 7, 9, 9, 11, 23, 47, 89, 160 + }; + printf("Found at index: %d\n", jump_search(array, 15, 9)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_7/main_2.c b/0x1E-search_algorithms/tests/task_7/main_2.c new file mode 100644 index 00000000..8acd90a7 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_7/main_2.c @@ -0,0 +1,16 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[15] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 23, 47, 89, 160 + }; + printf("Found at index: %d\n", jump_search(array, 15, 123456789)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_7/main_3.c b/0x1E-search_algorithms/tests/task_7/main_3.c new file mode 100644 index 00000000..07ede202 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_7/main_3.c @@ -0,0 +1,13 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Found at index: %d\n", jump_search(NULL, 0, 0)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_9/main_0.c b/0x1E-search_algorithms/tests/task_9/main_0.c new file mode 100644 index 00000000..9d00a4e3 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_9/main_0.c @@ -0,0 +1,17 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[35] = { + 0, 0, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 8, 9, 9, + 10, 11, 12, 12, 12, 19, 19, 19, 71, 71, 71, 81, 82, 83, 84 + }; + printf("Found at index: %d\n", interpolation_search(array, 35, 2)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_9/main_1.c b/0x1E-search_algorithms/tests/task_9/main_1.c new file mode 100644 index 00000000..28cacb08 --- /dev/null +++ b/0x1E-search_algorithms/tests/task_9/main_1.c @@ -0,0 +1,17 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[35] = { + 0, 0, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 8, 9, 9, + 10, 11, 12, 12, 12, 19, 19, 19, 71, 71, 71, 81, 82, 83, 84 + }; + printf("Found at index: %d\n", interpolation_search(array, 35, 19)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_9/main_2.c b/0x1E-search_algorithms/tests/task_9/main_2.c new file mode 100644 index 00000000..3d74427c --- /dev/null +++ b/0x1E-search_algorithms/tests/task_9/main_2.c @@ -0,0 +1,17 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + int array[35] = { + 0, 0, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 8, 9, 9, + 10, 11, 12, 12, 12, 19, 19, 19, 71, 71, 71, 81, 82, 83, 84 + }; + printf("Found at index: %d\n", interpolation_search(array, 35, 123456789)); + return (0); +} diff --git a/0x1E-search_algorithms/tests/task_9/main_3.c b/0x1E-search_algorithms/tests/task_9/main_3.c new file mode 100644 index 00000000..c378abeb --- /dev/null +++ b/0x1E-search_algorithms/tests/task_9/main_3.c @@ -0,0 +1,13 @@ +#include +#include "search_algos.h" + +/** + * main - Entry point + * + * Return: Always 0 (Success) + */ +int main(void) +{ + printf("Found at index: %d\n", interpolation_search(NULL, 0, 0)); + return (0); +} diff --git a/l.sh b/l.sh new file mode 100644 index 00000000..da2f07ee --- /dev/null +++ b/l.sh @@ -0,0 +1,6 @@ +#!/usr/bin/bash +for d in */tests/task_*; do + for f in "$d"/*.txt; do + mv -- "$f" "${f%.txt}.c" + done +done diff --git a/tests.sh b/tests.sh new file mode 100644 index 00000000..7042183f --- /dev/null +++ b/tests.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# creates test file folders for each project + +for d in */; do + if [ ! -d "$d/tests" ]; then + mkdir -p "$d/tests" + fi + for i in {0..25}; do + if [ ! -d "$d/tests/task_$i" ]; then + mkdir -p "$d/tests/task_$i" + fi + done + if [ -d "$d/test" ]; then + for f in "$d/test/"*; do + filename=$(basename -- "$f") + task_number=$(echo $filename | grep -o -E '^[0-9]+') + if [ ! -z "$task_number" ]; then + cp "$f" "$d/tests/task_$task_number/" + fi + done + for f in "$d/tests/task_$task_number/"*.txt; do + mv -- "$f" "${f%.txt}.c" + done + fi +done