test: Make TEST_* report test location
authorDaisuke Nojiri <dnojiri@chromium.org>
Fri, 6 May 2016 21:38:06 +0000 (14:38 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Wed, 11 May 2016 02:41:47 +0000 (19:41 -0700)
commit099eeb9b978c70128bc2ec99cfdddf39e44a8249
tree59f9c2cf419871e946ae9ed092a924ea9a465881
parentf3f9e00ef037695c4e792948effa1253f680c118
test: Make TEST_* report test location

This patch converts TEST_* functions to macros, which print file name
and line # of the check. This will allow us to locate a failed test
quickly.

New TEST_* macros also automatically generate a test name if
testname == NULL. This will save us time to think of a name for
every single check we write in a test.

BUG=none
BRANCH=tot
TEST=make runtests

Change-Id: Ibdeb99681985c3f348836d256fa3484f2f0c315f
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/343233
Reviewed-by: Randall Spangler <rspangler@chromium.org>
tests/bdb_sprw_test.c
tests/bdb_test.c
tests/test_common.c
tests/test_common.h