GithubHelp home page GithubHelp logo

pavel-arkharov / libft_tests Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wsdonnelly/libft_tests

4.0 0.0 1.0 430 KB

collaborative and comprehensive testing for libft project

C 95.93% Makefile 4.07%

libft_tests's Introduction

first Draft

Collaborate on libft tests, everything here is open to suggestions

  • This is hopefully a way to both practice git collaboration and creat a comprehensive and efficent series of tests for the libft project.
  • Its a work in progress as we all still have to actually do the project

GOALS

  1. have a comprehensive series of tests which give meaninful error message
  2. have a main.c a .h and a testfunction.c for each lib function
  3. these sholud compile to .o files which are subsequently linked and compiled with your own libft like so:
  4. gcc *.o -L -lft
  5. functions should be named in a consistant manner like "test_.c"

HOW TO INSTALL AND RUN TESTS

  1. git clone repo to your machine
  2. Change LIBDIR variable in the Makefile according to your folder structure. That should be the folder containing your libft.a file.
  3. Change the same path in libft_tests.h file libft.h header include.
  4. Make and proceed with tests.

HOW TO ADD TESTS

  1. Create file in the root named test_ft_FUNCTIONNAME.c
  2. Write the tests using predefined templates TESTF(function_name) in the beginning; TESTN(test_number) to initialize each test and TESTOK(test_number) or TESTFAILED(test_number) to validate results.
  3. Add void test_ft_FUNCTIONNAME(void) prototype to libft_tests.h header file
  4. Add function call to test_ft_FUNCTIONNAME() in libft_tests_main.c file
  5. Compile tests with make re
  6. Run with ./test_ft

TO DO

  • add more tests
  • figure out a way to share libft.a across different users via global file/variable
Contact me here or on Discord: wdonnell

libft_tests's People

Contributors

jesper-lehtinen avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

conu101

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.