lib: internal: add BT_ASSERT_POST()
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 28 Jun 2019 19:55:56 +0000 (15:55 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 29 Jun 2019 06:04:08 +0000 (02:04 -0400)
commit1f9f5b4d1def78f948fab510e065bc5ca01c8147
tree5d6866cb703a89a33e47a912a7f6fd50e896e54e
parent7085eeaab415fdeb43a5f77c9383f831a4b85acf
lib: internal: add BT_ASSERT_POST()

BT_ASSERT_POST() is just like BT_ASSERT_PRE(), but it is used to
validate the returned values of user functions and methods.

The only difference with BT_ASSERT_PRE() is that its error message
indicates that a postcondition was not satisfied instead of a
precondition. This is simply more accurate.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I91815301ada19b42ba58f32db7b9c412cbe641e0
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1574
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
CONTRIBUTING.adoc
src/common/assert.h
src/lib/Makefile.am
src/lib/assert-post.h [new file with mode: 0644]
src/lib/assert-pre.h
This page took 0.029574 seconds and 4 git commands to generate.