Commit Graph

14 Commits (d581fc82b18219d9c5bef8f0e0c0c42545c7b054)

Author SHA1 Message Date
Juliana Fajardini d581fc82b1 util/unittests: delete PASS_IF macro
The logic flow we want to achieve with unittests, where first we have
all FAIL statements and then just one PASS statement could become more
convoluted with the existence of the PASS_IF macro. Besides, what could
be written as a FAIL_IF might in some cases be written in not so clear
ways with the PASS_IF option available.

Also: fix inverted check values in documentation, update copyright year

Optimization: #4795
5 years ago
Jeff Lucovsky f6a399f154 general: Correct typos 6 years ago
Victor Julien ab1200fbd7 compiler: more strict compiler warnings
Set flags by default:

    -Wmissing-prototypes
    -Wmissing-declarations
    -Wstrict-prototypes
    -Wwrite-strings
    -Wcast-align
    -Wbad-function-cast
    -Wformat-security
    -Wno-format-nonliteral
    -Wmissing-format-attribute
    -funsigned-char

Fix minor compiler warnings for these new flags on gcc and clang.
9 years ago
Jason Ish 2a42e8be03 unittest: FAIL macro to unconditionally fail a test 10 years ago
Jason Ish 13cf2f829e testing: new test macros, new testing documentation group.
Unit testing support macros for failing on expressions,
as well as passing tests on expressions.

If fatal unittests are enabled BUG_ON will be triggered for
an assertion providing the line number of the failure, otherwise
the test will simply fail.

Moved the fatal flag to a global var instead of a configuration
parameter for ease of access from a macro.
10 years ago
Jason Ish 796dd5223b tests: no longer necessary to provide successful return code
1 pass, 0 is fail.
10 years ago
Victor Julien 1df3304655 Clean up for unittests code: only compile unittest api code when unittests are enabled. Fix unittest code that wasn't wrapped in the proper UNITTESTS ifdefs. 15 years ago
Anoop Saldanha 229f7281ea list runmodes. Allow specification of runmode id from cof file. Also allow for command line override 16 years ago
William Metcalf ce01927515 Import of GPLv2 Header 050410 16 years ago
Jason Ish 097a77e9fd Bug 6
Add a new command line option, --list-unittests to list all registered unit tests then exit.  If -U is supplied, the regex will be respected.
17 years ago
Breno Silva c43319c337 Regular expression for UnitTests
Signed-off-by: Brian Rectanus <brectanu@gmail.com>
17 years ago
Victor Julien 85abc3ef62 Complete removal of global de_ctx. UtRuntests now returns the number of failed tests or 0 on none. Program exits with code 1 on failed tests, code 0 otherwise. Removal of broken http uri test. 17 years ago
Victor Julien 689bbfdc45 Rename all structure definitions in the "typedef struct _SomeStruct" format to "typedef struct SomeStruct_" to make the Doxygen output more useful.
Remove the Trie multi pattern matcher code. It wasn't used anymore.
17 years ago
Victor Julien bab4b62376 Initial add of the files. 17 years ago