]> begriffs open source - libtap/summary
 
descriptionhttps://github.com/zorgnax/libtap.git
last changeFri, 17 Nov 2023 22:06:22 +0000 (17:06 -0500)
readme

NAME

libtap - Write tests in C

SYNOPSIS

#include <tap.h>

int main () {
    plan(5);
    int bronze = 1, silver = 2, gold = 3;
    ok(bronze < silver, "bronze is less than silver");
    ok(bronze > silver, "not quite");
    is("gold", "gold", "gold is gold");
    cmp_ok(silver, "<", gold, "%d <= %d", silver, gold);
    like("platinum", ".*inum", "platinum matches .*inum");
    done_testing();
}

results in:

1..5
ok 1 - bronze is less than silver
not ok 2 - not quite
#   Failed test 'not quite'
#   at t/synopsis.c line 7.
ok 3 - gold is gold
ok 4 - 2 <= 3
ok 5 - platinum matches .*inum
# Looks like you failed 1 test of 5 run.

DESCRIPTION

tap is an easy to read and easy to write way of creating tests for your software. This library creates functions that can be used to generate it for your C programs. It is implemented using macros that include file and line info automatically, and makes it so that the format message of each test is optional. It is mostly based on the Test::More Perl module.

INSTALL

On Unix systems:

$ make
$ make install

For more detailed installation instructions (eg, for Windows), see INSTALL.

FUNCTIONS

shortlog
2023-11-17 Jacob GelbmanMerge pull request #44 from horgh/horgh/windows master heads/master
2023-11-15 William StoreyOnly conditionally include sys/types.h and sys/mman.h pull/44/head 44/head
2023-11-15 William StoreyMove includes and define to near the top
2023-02-03 Jacob GelbmanMerge pull request #37 from horgh/horgh/macos
2023-02-03 Jacob GelbmanMerge pull request #41 from sni/patch-2
2023-02-02 Sven Nierleinfix dropped const qualifier pull/41/head 41/head
2022-08-19 Jacob GelbmanMerge pull request #40 from sloanebernstein/force-disab...
2022-08-19 Sloane BernsteinForcibly disable optimization on tests pull/40/head 40/head
2020-10-08 William StoreyInclude additional headers pull/37/head 37/head
2020-10-04 Jacob GelbmanMerge pull request #36 from gonzus/master
2020-03-23 Gonzalo DiethelmMake division by zero test fail pull/36/head 36/head
2018-12-11 Jacob GelbmanAdd spacing
2018-12-11 Jacob GelbmanMerge pull request #34 from alyptik/fix_warnings
2018-12-11 Jacob GelbmanMerge pull request #35 from jeffsw/master
2018-12-11 Jeff WheelerMerge commit '72f3c06' pull/35/head 35/head
2018-12-11 Jeff WheelerFixing a bug which prevents builds for Windows targets.
...
tags
10 years ago 0.1.0
heads
2 years ago master