Git Product home page Git Product logo

random-c-programs's Introduction

random-c-programs

lint-and-test

A set of random c programs that I write to practice my c skills.

(actually some directories don't contain programs, but just a function with a bunch of tests, but I don't want to rename the repo)

Building and running programs

To build and run a program (a directory with a main.c file inside), use the ./scripts/run.sh.

$ ./scripts/run.sh ./programs/htoi
Enter your hex number: beef
Ten-based value is: 48879

To make things more handy, while working on a particular program, one can bind running run.sh to some key in vim, like so:

:map <leader>r :! .scripts/run.sh hello-world<cr>

Tests

For unit tests I've used the criterion testing framework.

To run all tests, use the following script:

$ ./scripts/test-all.sh

To run tests for a particular program, use:

$ ./scripts/test.sh ./programs/htoi

random-c-programs's People

Contributors

slaviqueue avatar

Watchers

Lucian avatar  avatar  avatar

random-c-programs's Issues

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.