Skip to content

kevshouse/TDD_libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libft - TDD Edition

Build Status

A modern, refactored implementation of the 42 libft project, developed using Test-Driven Development (TDD) principles and the Criterion testing framework.

🚀 Features

  • Unit Testing: Comprehensive test suite using Criterion.
  • Continuous Integration: Automated testing on every push via GitHub Actions.
  • Memory Safety: Integrated Valgrind checks to ensure zero memory leaks.
  • Code Coverage: Enforced 80%+ line coverage threshold using LCOV.
  • Documentation: Professional API documentation generated by Doxygen.
  • Modern Tooling: Clean Makefile with dedicated rules for testing and reporting.

🛠 Getting Started

Prerequisites

  • A C compiler (cc or gcc)
  • libcriterion-dev
  • valgrind
  • lcov
  • doxygen

Usage

Compile the library:

make

Run the unit test suite:

make test

Check for memory leaks:

make valgrind

Generate documentation:

make doc

📋 Libft Completion Status

Part 1: Libc Functions

  • ft_isalpha - [ ] ft_isdigit - [ ] ft_isalnum - [ ] ft_isascii
  • ft_isprint - [ ] ft_strlen - [ ] ft_memset - [ ] ft_bzero
  • ft_memcpy - [ ] ft_memmove - [ ] ft_strlcpy - [ ] ft_strlcat
  • ft_toupper - [ ] ft_tolower - [ ] ft_strchr - [ ] ft_strrchr
  • ft_strncmp - [ ] ft_memchr - [ ] ft_memcmp - [ ] ft_strnstr
  • ft_atoi - [x] ft_calloc - [ ] ft_strdup

Part 2: Additional Functions

  • ft_substr - [ ] ft_strjoin - [ ] ft_strtrim - [x] ft_split
  • ft_itoa - [ ] ft_strmapi - [ ] ft_striteri - [x] ft_putchar_fd
  • ft_putstr_fd - [x] ft_putendl_fd - [ ] ft_putnbr_fd

Bonus: Linked Lists

  • ft_lstnew - [ ] ft_lstadd_front - [ ] ft_lstsize
  • ft_lstlast - [ ] ft_lstadd_back - [ ] ft_lstdelone
  • ft_lstclear - [ ] ft_lstiter - [ ] ft_lstmap

About

A robust implementation of the C Standard Library built with a Test-Driven Development (TDD) philosophy. Features a high-coverage CI/CD pipeline using Criterion and Valgrind.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors