From: Joel Rosdahl Date: Wed, 31 Jan 2018 21:15:45 +0000 (+0100) Subject: unittest: Pass errmsg to CHECKM when available X-Git-Tag: v3.4~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53cee1a5b991044b24b5740b3de7eec547a72a50;p=thirdparty%2Fccache.git unittest: Pass errmsg to CHECKM when available From PR #169. --- 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);