test_dbus: Use TEST_*(), not assert*()

Downsides to assert*():

 * assert() doesn't flush previous logs before aborting
 * assert*() macros don't print the expected vs actual values, which can
   make deducing the underlying failure harder

Change all assert*() usage to TEST_*() variations.

This should help in debugging failures like this, seen very rarely in
Upstart's unit tests:

  ..test_initctl: tests/test_initctl.c:18533: void
    test_dbus_connection(void): Assertion `read (_test_fds[0],
    _test_address, sizeof (_test_address)) > 0' failed.
  FAIL test_initctl (exit status: 134)

BUG=b:342438425
TEST=cros_run_unit_tests

Change-Id: I23275ffefc3bbc128c91133bd714334a4eaff91d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/libnih/+/5623191
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Allen Webb <allenwebb@google.com>
Commit-Queue: Brian Norris <briannorris@chromium.org>
1 file changed