summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2018-01-31 22:15:45 +0100
committerJoel Rosdahl <joel@rosdahl.net>2018-01-31 22:16:43 +0100
commit53cee1a5b991044b24b5740b3de7eec547a72a50 (patch)
treec2dba9794dab363d5e2aa57b60eb209223e33fb3
parent338bfc6e91722b01f691bea584e73f6b70234c96 (diff)
downloadccache-53cee1a5b991044b24b5740b3de7eec547a72a50.tar.gz
unittest: Pass errmsg to CHECKM when available
From PR #169.
-rw-r--r--unittest/test_conf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/unittest/test_conf.c b/unittest/test_conf.c
index ea43e2ef..96e73473 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);