
On Wed, Mar 16, 2016 at 12:05:36PM +0100, Erik Skultety wrote:
Add a generic DO_TEST_FULL macro, some PASS/FAIL macros to better visually distinguish tests that should fail and tests that should pass --- tests/virlogtest.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-)
ACK
diff --git a/tests/virlogtest.c b/tests/virlogtest.c index dfe0f75..9e0ebb5 100644 --- a/tests/virlogtest.c +++ b/tests/virlogtest.c @@ -23,20 +23,20 @@
#include "virlog.h"
-struct testLogMatchData { +struct testLogData { const char *str; - bool res; + bool pass; };
static int testLogMatch(const void *opaque) { - const struct testLogMatchData *data = opaque; + const struct testLogData *data = opaque;
bool got = virLogProbablyLogMessage(data->str); - if (got != data->res) { - fprintf(stderr, "Expected '%d' but got '%d' for '%s'\n", - data->res, got, data->str); + if (got != data->pass) {
+ VIR_TEST_DEBUG("Expected '%d' but got '%d' for '%s'\n", + data->pass, got, data->str);
This change is not mentioned in the commit message and it would better fit in a separate commit. Jan