xaizek / stic (License: MIT) (since 2018-12-07)
Simple Tests In C with optional automatic test registration in C.
<root> / tests / stic_tests.h (5bf59b8d9eea899e1ac899901469d50f28561d09) (600B) (mode 100644) [raw]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include "../src/stic.h"

#ifndef STIC_INTERNAL_TESTS
#error STIC_INTERNAL_TESTS must be defined when compiling tests for STIC itself.
#endif

#define without_logging(X) stic_disable_logging(); X; stic_enable_logging();
#define assert_test_passes(X) without_logging(X); stic_assert_last_passed();
#define assert_test_fails(X) without_logging(X); stic_assert_last_failed();

void test_assert_true();
void test_assert_false();
void test_assert_int_equal();
void test_assert_ulong_equal();
void test_assert_string_equal();
void test_assert_n_array_equal();

void test_fixture_stic();
void all_tests();

Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/stic

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/stic

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master