GithubHelp home page GithubHelp logo

printf-unit-tests's Introduction

Unit-tests for ft_printf - 42

I took real_printf created by MrJe, and I added some other tests.

Getting Started

Installation

In your ft_printf repo

git clone https://github.com/afoures/printf-unit-tests

DO NOT CHANGE THE NAME OF THE REPO OR THE SCRIPT MAY NOT WORK FOR ALL THE TESTS

Running script

Run the script directly in your ft_printf repo

sh printf-unit-tests/printf-unit-tests.sh (option)

You should know that :

  • Some test are based on my personal implementation, so some test will maybe not works for you (I'm talking about %b, %r, color).
  • There is a lot of undefined behavior in this script.

Options available

Option Description
all Test for dDiuUxXoOcCsSp%fFeEgGaAn
bonus Test for b r ' * dprintf sprintf color
all+bonus Test for all and bonus options together
% Test for %%
d i & D Test for %d, %i and %D
u & U Test for %u and %U
o & O Test for %o and %O
x & X Test for %x and %X
c & C Test for %c and %C
s & S Test for %s and %S
p Test for %p
f & F Test for %f and %F
e & E Test for %e and %E
g & G Test for %g and %G
a & A Test for %a and %A
n Test for %n
fd Test for dprintf
string Test for sprintf
apostrophe Test for ' flag
* Test for * flag
b Test for %b
r Test for %r
color Test for color implementation
clean_color Remove the previous configuration of the color test
clean Remove all .diff, .out, *ft.txt and fclean your lib

Results

For every failed test, a test_name.diff will be created in ./ftprintf-unit-tests/results/

You can see there your errors.

Credits

A big thanks to MrJe for letting me use his real_printf as a starting point.

Suggestions or bugs reporting ?

You can contact me here : [email protected]

printf-unit-tests's People

Contributors

afoures avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.