update tests
This commit is contained in:
		
							parent
							
								
									d57bcf6958
								
							
						
					
					
						commit
						e5b5214412
					
				| @ -6,7 +6,7 @@ | |||||||
| /*   By: achubuko <marvin@42.fr>                    +#+  +:+       +#+        */ | /*   By: achubuko <marvin@42.fr>                    +#+  +:+       +#+        */ | ||||||
| /*                                                +#+#+#+#+#+   +#+           */ | /*                                                +#+#+#+#+#+   +#+           */ | ||||||
| /*   Created: 2023/12/02 22:12:42 by achubuko          #+#    #+#             */ | /*   Created: 2023/12/02 22:12:42 by achubuko          #+#    #+#             */ | ||||||
| /*   Updated: 2023/12/02 23:51:18 by achubuko         ###   ########.fr       */ | /*   Updated: 2023/12/03 18:44:35 by achubuko         ###   ########.fr       */ | ||||||
| /*                                                                            */ | /*                                                                            */ | ||||||
| /* ************************************************************************** */ | /* ************************************************************************** */ | ||||||
| #include "unity.h" | #include "unity.h" | ||||||
| @ -21,6 +21,21 @@ void	tearDown(void) | |||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void test_ft_str_is_numeric_num(void) | ||||||
|  | { | ||||||
|  | 	TEST_ASSERT_EQUAL_INT(1, ft_str_is_numeric("42")); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void test_ft_str_is_numeric_nonnum(void) | ||||||
|  | { | ||||||
|  | 	TEST_ASSERT_EQUAL_INT(0, ft_str_is_numeric("asd")); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void test_ft_str_is_numeric_neg(void) | ||||||
|  | { | ||||||
|  | 	TEST_ASSERT_EQUAL_INT(-1, ft_str_is_numeric("-42")); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void	test_ft_strlen(void) | void	test_ft_strlen(void) | ||||||
| { | { | ||||||
| 	char	*f; | 	char	*f; | ||||||
| @ -38,6 +53,9 @@ int	main(void) | |||||||
| { | { | ||||||
| 	UNITY_BEGIN(); | 	UNITY_BEGIN(); | ||||||
| 	RUN_TEST(test_ft_strlen); | 	RUN_TEST(test_ft_strlen); | ||||||
|  | 	RUN_TEST(test_ft_str_is_numeric_num); | ||||||
|  | 	RUN_TEST(test_ft_str_is_numeric_nonnum); | ||||||
|  | 	RUN_TEST(test_ft_str_is_numeric_neg); | ||||||
| 	RUN_TEST(test_ft_atoui32_42); | 	RUN_TEST(test_ft_atoui32_42); | ||||||
| 	return (UNITY_END()); | 	return (UNITY_END()); | ||||||
| } | } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user