tripouille / libfttester Goto Github PK
View Code? Open in Web Editor NEWTester for the libft project of 42 school
Home Page: https://github.com/Tripouille
Tester for the libft project of 42 school
Home Page: https://github.com/Tripouille
I have no problem running mandatory test. But it show error during the bonus part.
make bonus -C ../Libft
make[1]: *** No rule to make target `bonus'. Stop.
make: *** [bonus_start] Error 2
A friend get killed in this test in the strsplit and passed in all of ur tests.
char *str = "1-2-3-4-5-6-7-8--8-8--8-4------4--4"
char *sep = '-'
char *str = "--1-2-3-4-5-6-7-8--8-8--8-4------4--4"
char *sep = '-'
Expected result: 1-2-3-4-5-6-7-8-8-8-8-4-4-4
RES[0]:
RES[1]:
RES[2]:
RES[3]:
RES[4]:
RES[5]:
RES[6]:
RES[7]:
RES[8]:
RES[9]:
RES[10]:
RES[11]:
RES[12]:
RES[13]:
RES[14]:
Hello ! I've been testing my bonus with your tester, but when it comes to ft_lstdelone, the tester doesn't print anything on the term. Looking at the ft_lstdelone_test.cpp file, I see that there is no CHECK function like in all the other *test.cpp files. Is there indeed something missing ? Thanks in advance !
And that's why there is an error:
fatal error: 'iostream' file not found
Line 13 in 721650f
libftTester/tests/ft_substr_test.cpp
Lines 27 to 29 in fed5efe
This test might be problematic
ft_substr("123456789\0Hello world!", 10, 100); // "Hello world!" expected? or undefined behavior?
using ubuntu 20.04 in wsl.
after call make m:
Already up to date.
If all your tests are OK and the moulinette KO you, please run the tester with valgrind (see README)
make -C /home/hui/cardet/libft
make[1]: Entering directory '/home/hui/cardet/libft'
make[1]: 'libft.a' is up to date.
make[1]: Leaving directory '/home/hui/cardet/libft'
[Mandatory]
/usr/bin/ld: /tmp/ft_memset_test-332b90.o: in function main': /home/hui/cardet/libft/libftTester/tests/ft_memset_test.cpp:22: undefined reference to
ft_memset'
/usr/bin/ld: /home/hui/cardet/libft/libftTester/tests/ft_memset_test.cpp:24: undefined reference to `ft_memset'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:24: memset] Error 1
According to this change : 1deb0cc#diff-689e14dc52cf1e217c428e7eaafc3e7362b3b09e469c100769ef9ac2acb3f2b6R23
I saw some people bypassing this test with count == SIZE_MAX || size == SIZE_MAX
, but calloc(SIZE_MAX - 58, 1)
also not work. ๐
Maybe add something like :
/* 4 */ check(ft_calloc(5468, SIZE_MAX/458) == NULL);
/* 5 */ check(ft_calloc(SIZE_MAX/4865, SIZE_MAX/54) == NULL);
Or a test on the line, I mean with more precision. ๐ค
in ft_strlcat_test.cpp in 6. & 12. tests will always KO even if your function is functional
I used strlcat instead of ft_strlcat and still KO also in case 5. you're passing negative value to size_t parameter which is not possible.
I know you made the repo for a long time now but still you could make it clean!
Thank you!
Since the Linux transition for all 42 campus, theses functions timeout without any reason.
It could be a possible bug from all developers in the cursus for the 3 last function, but for ft_putchar_fd
which just write a letter in a file its just impossible.
My code is the following:
#include <unistd.h>
void ft_putchar_fd(char c, int fd)
{
write(fd, &c, 1);
}
We can't say "This code can timeout". I set here the errors:
Assuming I have a string "taxtripouille" and I search for the last occurrence of the character "x", the code returned null instead of "xtripouille".
Hello,
I see that calloc tests 6, 7, 8, 10 and 11 check that the returned pointer is not a NULL when either argument is 0.
The documentation on malloc, calloc... says the following:
"NULL may also be returned by a successful call to malloc() with a size of zero, or by a successful call to calloc() with nmemb or size equal to zero."
My question is: What is the reason behind the check against NULL in the mentioned test cases?
Thank you for making this project, it is very nice and useful.
Bey
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.