Giter Club home page Giter Club logo

csick's Introduction

CSick

CSick is a testing framework for C. It's sort of like webpack-dev-server, but for running tests on C files.

Sample Testing Image

What does it do?

  1. Watches all .c files in a specified directory.
  2. Parses those files to find tests, and reads their includes to trace their dependencies.
  3. When a root test file or a dependency file is modified, CSick recompiles all related tests and runs them again.
  4. The results of this are displayed on a local webpage.

The net result is that as you modify and change your files, test binaries are automatically created and run to see if your new changes worked.

Getting Started

Download and Install

  1. Install .NET core and NodeJS.
  2. Create a directory called 'test' in your existing project.
  3. Open a terminal in this folder.
  4. git clone --depth 1 https://github.com/caseymarquis/csick.git
  5. ./csick/install.bat
  6. ./run-tests.bat
  7. For example tests, see 'csick/example-project/test'
  8. When csick is running, you can debug specific tests from within VS Code by selecting a test and hitting F5. This requires a bit of configuration however. You can copy the config files from 'csick/example-project/.vscode' to get started. It is assumed that gcc and gdb will be available in your environment.
#include "./csick/csick.h"

START_TESTS

START_TEST("Assert Should Succeed")
    ASSERT(1 == 1);
END_TEST

START_TEST("Assert Should Fail")
    ASSERT(1 == 0);
END_TEST

END_TESTS

Disclaimer

CSick was written and used for the author's personal projects. It's pretty feature sparse, and will likely only have features added as needed by the author. Pull requests would be welcome, but you're unlikely to request a feature and receive it.

csick's People

Contributors

caseymarquis avatar dependabot[bot] 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.