From 53cee1a5b991044b24b5740b3de7eec547a72a50 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 31 Jan 2018 22:15:45 +0100 Subject: [PATCH] unittest: Pass errmsg to CHECKM when available From PR #169. --- unittest/test_conf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/unittest/test_conf.c b/unittest/test_conf.c index ea43e2efe..96e734732 100644 --- a/unittest/test_conf.c +++ b/unittest/test_conf.c @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2016 Joel Rosdahl +// Copyright (C) 2011-2018 Joel Rosdahl // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free @@ -342,7 +342,8 @@ TEST(conf_set_new_value) char *data; create_file("ccache.conf", "path = vanilla\n"); - CHECK(conf_set_value_in_file("ccache.conf", "stats", "chocolate", &errmsg)); + CHECKM(conf_set_value_in_file("ccache.conf", "stats", "chocolate", &errmsg), + errmsg); data = read_text_file("ccache.conf", 0); CHECK(data); CHECK_STR_EQ_FREE2("path = vanilla\nstats = chocolate\n", data); @@ -354,7 +355,8 @@ TEST(conf_set_existing_value) char *data; create_file("ccache.conf", "path = chocolate\nstats = chocolate\n"); - CHECK(conf_set_value_in_file("ccache.conf", "path", "vanilla", &errmsg)); + CHECKM(conf_set_value_in_file("ccache.conf", "path", "vanilla", &errmsg), + errmsg); data = read_text_file("ccache.conf", 0); CHECK(data); CHECK_STR_EQ_FREE2("path = vanilla\nstats = chocolate\n", data); -- 2.47.2