summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLib/testString.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeLib/testString.cxx')
-rw-r--r--Tests/CMakeLib/testString.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/CMakeLib/testString.cxx b/Tests/CMakeLib/testString.cxx
index 2aa1459..af5e41e 100644
--- a/Tests/CMakeLib/testString.cxx
+++ b/Tests/CMakeLib/testString.cxx
@@ -16,10 +16,12 @@
#include <utility>
#define ASSERT_TRUE(x) \
- if (!(x)) { \
- std::cout << "ASSERT_TRUE(" #x ") failed on line " << __LINE__ << "\n"; \
- return false; \
- }
+ do { \
+ if (!(x)) { \
+ std::cout << "ASSERT_TRUE(" #x ") failed on line " << __LINE__ << "\n"; \
+ return false; \
+ } \
+ } while (false)
static bool testConstructDefault()
{
@@ -144,7 +146,6 @@ static bool testConstructFromCStr()
{
std::cout << "testConstructFromCStr()\n";
return testFromCStr(cstr);
- ;
}
static bool testAssignFromCStr()
@@ -153,7 +154,6 @@ static bool testAssignFromCStr()
cm::String str;
str = cstr;
return testFromCStr(str);
- ;
}
static const std::string stdstr = "abc";