Closed kryshac closed 6 years ago
Hello, can i have more informations about your linux distribution ?
Hello, ubuntu 16.04 LTS 64-bit
Humm, the OSX memcmp and linux memcmp behaviour differs, the only stable thing to test is the sign of the result. I can't just check the sign of the return value because the memcmp's man page specify that the return is the difference between the two first differing bytes. I'll add conditional compilation for these test -_-
Fixed in 1990f39ffc99dd1a1cb23a4af2b0ab54a68f40b0.
ft_memcmp: [OK] [OK] [OK] [FAILED] [FAILED] [OK] [OK] [OK] [OK] [OK] [fail]: your memcmp does not work with basic input [fail]: your memcmp does not cast the memory in unsigned char
See result.log for more informations ! kryshac:~/Desktop/42v2/libft-unit-test$> cat result.log ft_memcmp: [OK] [OK] [OK] [FAILED] [FAILED] [OK] [OK] [OK] [OK] [OK] [fail]: your memcmp does not work with basic input Test code:
Diffs: memcmp: |64768| ft_memcmp: |253|
[fail]: your memcmp does not cast the memory in unsigned char Test code:
Diffs: memcmp: |32768| ft_memcmp: |128|
my code:
On MAC OS X all tests work correctly.