Skip to content

vhgn/bulki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Unit testing header with simple macros that point out to file and line of test fail. Everything inside is just a macro so a simple #include is enough.

Just made it to quickly test my algorithms, no deeper purpose

Usage

Just call bulki_zero, bulki_non_zero or bulki_positive to test if the result is zero, non-zero or positive, respectively.

#include "bulki.h"

int sum(int a, int b);

int main() {
	int res = sum(5, 5);

	bulki_positive(res); /* does nothing on success */

	bulki_zero(res); /* exits with failure */
	/* Returned 10 in ./test.c:8 */
}

int sum(int a, int b) { return a + b; }

Use bochka to easily use this as a dependency

About

Unit testing for C

Topics

Resources

License

Stars

Watchers

Forks

Contributors