lib: internal: add BT_ASSERT_POST()
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 28 Jun 2019 19:55:56 +0000 (15:55 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 18 Jul 2019 15:53:33 +0000 (11:53 -0400)
commitc6f84660dba938fb188f14b063aa2e9684cd34d3
tree9b9f8c6bd85b9f91026697f48f12ca5d7919d820
parent2d7aa9b6584faa724fbb8640f9e045ee9e337ae8
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.028825 seconds and 4 git commands to generate.