Giter VIP home page Giter VIP logo

42_tests's Introduction

42_tests

This site is my personal testing/evaluating site for 42 projects.

If you like it - it would be nice of you to leave a star :)

I'm still at the beginning of setting this up - so if you have any ideas / add ons - let me know via the discussion forum here on github or via email.

At the moment this site and the subsites are IN PROGRESS

general tests:

  • nm -u program // to see the external used functions
  • input: wrong argc, digits mixed with letters
  • check function limits (usleep has limit uint max for example)
  • Check with ulimits
  • Check with valgrind (also with options like --track-fds=yes for open file descriptors)
    • valgrind --leak-check=full --show-leak-kinds=all --track-fds=yes
  • Check with funcheck (is limited with multiprocess stuff)
  • Check edgecases (INT_MAX, INT_MIN)
    • Int min: -2147483648
    • Int max: 2147483647
  • Check not allowed input (empty quotes "", " ", wrong signs)
    • "" shouldn't be handled as 0
  • Check too many/less arguments
  • Read the subject and think about tests for the specific project - what could crash the program (wrong maps, wrong input, high workload of the processor, ...)

Check the code:

  • suggestion: use vscode by typing code . into the terminal when you are in the project directory
  • Search for unprotected malloc / functions (even printf/write can fail - so let the evaluated people argue why they choose to not protect something - mallocs have always to be protected)
  • Check if errors are printed in Standard error (fd=2)
  • Check exits in case of error (especially if exit is not allowed)
  • Let some malloc/function fail manually and see if everything is freed correctly (you can use static ints if some function is called more than once and for example let the 4. call of the function fail with some if + return/exit function which is used at that point. Best place is to put it just before the malloc / function.

Know what you are doing - learn about your testing tools! If you haven't accomplished a project - maybe try to test some project you find on github first.

Tests specially for the project - see other files in the github project:

Hope this helps when testing your stuff or a project from somebody else!

Yours Benjamin

P.s.: always be nice and polite when evaluating someone's project! They put lots of hours inside and are hoping to pass - so don't put them down! We are here to learn! Be part of an enviroment where people can trust and learn from each other. And sure - try to help people to get better coders!

Hall of fame of contributors:

42_tests's People

Contributors

poechlauerbe avatar

Stargazers

Boldizsar Szabo avatar Hannes avatar Lukas avatar  avatar  avatar Deyan Dyankov 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.