Libft-God is the ultimate, high-performance testing suite for the 42 school libft project. Built upon the legacy of the industry-standard testers, this "God" edition has been massively expanded to provide the most rigorous validation possible for today's standards. It is the definitive tool for students who aim not just to pass, but to achieve perfection.
Warning
PLEB42 is an entirely independent community initiative. It is not officially endorsed by, affiliated with, or sponsored by the Staff of 42 or 42 São Paulo.
- Zero Solution Hosting: None of our repositories will ever host, share, or leak source code solutions for curriculum assignments. Our engineering scope is strictly limited to behavior validation, crash identification, and memory leak analysis.
- No Academic Verdicts: Passing a PLEB42 test suite provides no guarantee of passing the official Moulinette evaluation. Cadets bear ultimate and sole responsibility for the integrity, compliance, and originality of their submissions.
Caution
This tester is designed to be intentionally rigorous by nature (overkill). It tests extreme edge cases that often go beyond the official curriculum requirements.
- Do not fail your peers unfairly: A failure in this test suite does not mean a student should fail their peer-review.
- Evaluation Criteria: If your peer's code functions correctly and respects the official project subject, it deserves a pass. Use this tool for learning, not as an absolute grading metric.
While based on the legendary libft-war-machine, Libft-God is a major evolution designed for the modern 42 curriculum. We have tripled the number of unit tests, shifting the focus from simple functionality to extreme edge-case robustness.
Every function is subjected to a relentless barrage of tests. We don't just check if ft_atoi converts "42"; we check how it handles INT_MIN, overflowing strings, multiple signs, and weird whitespace combinations.
- Part 1 (Libc): 100% behavior matching with original
libc. - Part 2 (Additional): Strict protection against NULL and empty inputs.
- Part 3 (Linked Lists): Exhaustive memory leak and pointer manipulation checks.
- Extra Functions: Support for over 15+ additional utility functions used in advanced 42 projects.
We test what others ignore:
- NULL Pointers: How does your code react to unexpected NULLs?
- Buffer Boundaries: Testing the exact byte before and after limits.
- Integer Extremes: Full coverage for
INT_MIN,INT_MAX, andunsignedoverflows. - Empty Inputs: Handing
"", size0, and empty lists gracefully.
Large test suites can be slow. Libft-God uses Batch Mode by default, an optimized engine that runs memory leak detection (Valgrind/Leaks) in a "one-shot" batch per function. This reduces execution time by up to 90% while maintaining 100% accuracy.
If you need granular leak detection for debugging, you can use Granular Mode (-slow) to run leaks on every single test case.
- 🍎🐧 True Cross-Platform: Seamlessly detects your OS. Uses native Leaks on macOS and Valgrind on Linux. No special compilation flags needed—it works with your standard
cc. - 🎨 God-Tier UI: A modern, color-coded terminal interface with real-time progress bars and beautifully formatted result tables.
- 📏 Norminette 3.x Ready: Fully integrated with the latest Norminette.
- 🚫 Forbidden Function Scanner: Scans your binary to ensure you haven't used unauthorized functions like
printforstring.hwhere not allowed. - 🛠️ Makefile Stress-Test: Validates
all,clean,fclean, andrerules to ensure your build system is production-ready. - 📜 Deepthought Logs: Generates a detailed
deepthoughtlog file for every run, allowing you to debug complex failures with ease.
Clone the tester into a directory alongside or inside your libft:
git clone https://github.com/PLEB42/libft-god.gitThe tester needs to know where your source code is.
- Create your configuration file:
cp srcs/config_template.sh my_config.sh
- Edit
my_config.shand setPATH_LIBFT:PATH_LIBFT="/path/to/your/libft" #(pwd)
Run everything (High speed by default):
bash grademe.sh
or
./grademe.shRun a specific function:
bash grademe.sh ft_split
or
./grademe.sh ft_splitRun with Granular Mode (Detailed leak detection):
bash grademe.sh -slow
or
./grademe.sh -slow| Flag | Description |
|---|---|
-h, --help |
Display the manual. |
-slow |
Granular Mode: Runs leak detection for every individual test case (slower). |
-a, --about |
Display the Pleb_42 tribute page and ASCII art. |
-n |
Skip Norminette check. |
-f |
Skip Forbidden Functions check. |
-m |
Execute a rigorous Makefile audit. |
-op1, -op2, -op3 |
Run ONLY Part 1, Part 2, or Part 3. |
-p1, -p2, -p3 |
Exclude Part 1, Part 2, or Part 3 from the run. |
-c |
Disable terminal colors. |
-d |
Use custom directory mode (for complex project structures). |
For a detailed list of every function and the specific edge cases we test, please refer to: 👉 Supported Functions Documentation
Libft-God is a community project developed and maintained by the Pleb_42 organization—a group of students dedicated to building high-quality tools for the 42 community.
This project is an evolution of several legendary tools. We acknowledge and thank the creators who came before us:
- libft-war-machine by @0x050f (The primary foundation of this version).
- Improvements and logic from @lmartin.
- The original Libftest by @jtoty.
The Pleb_42 version (Libft-God) was created to modernize these tools for the 2026 curriculum, fixing bugs in macOS leak detection, updating Norminette compatibility, and massively expanding test coverage.
Disclaimer: This tester is a tool for excellence. Use it to refine your code, but remember that the ultimate validation is your own understanding and the official 42 evaluation.