From 04f275fea9186a75836b589022a9fa410aea7b02 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 14 Feb 2011 14:09:04 +0000 Subject: Added gcov (coverage measurement) in unittests. --- tools/test.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tools/test.h') diff --git a/tools/test.h b/tools/test.h index f470162..4770a1e 100644 --- a/tools/test.h +++ b/tools/test.h @@ -109,11 +109,11 @@ #define TEST_EQUAL_STR(x, y, fmt...) { \ TEST_BASE(fmt); \ - std::string s1 = x; \ - std::string s2 = y; \ + std::string __s1 = x; \ + std::string __s2 = y; \ fprintf(stderr, "Comparing: \"%s\" == \"%s\"\n", \ - s1.c_str(), s2.c_str()); \ - if(s1 == s2) { \ + __s1.c_str(), __s2.c_str()); \ + if(__s1 == __s2) { \ TEST_OK(#x" and "#y" are equal."); \ } else { \ TEST_FAIL(#x" and "#y" are not equal."); \ @@ -122,11 +122,11 @@ #define TEST_NOTEQUAL_STR(x, y, fmt...) { \ TEST_BASE(fmt); \ - std::string s1 = x; \ - std::string s2 = y; \ + std::string __s1 = x; \ + std::string __s2 = y; \ fprintf(stderr, "Comparing: \"%s\" != \"%s\"\n", \ - s1.c_str(), s2.c_str()); \ - if(s1 != s2) { \ + __s1.c_str(), __s2.c_str()); \ + if(__s1 != __s2) { \ TEST_OK(#x" and "#y" not are equal."); \ } else { \ TEST_FAIL(#x" and "#y" are equal."); \ -- cgit v1.2.3