diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-09-12 16:42:54 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-09-12 16:42:54 +0100 |
commit | a995d74776106b2f9fc1e7aab262bc66d1b7bac2 (patch) | |
tree | 531982191e1104e2438dc0bd4ff5e0626ecf4d6e | |
parent | Add boost-test-extra.h and use it in UriParse (diff) | |
download | libadhocutil-a995d74776106b2f9fc1e7aab262bc66d1b7bac2.tar.bz2 libadhocutil-a995d74776106b2f9fc1e7aab262bc66d1b7bac2.tar.xz libadhocutil-a995d74776106b2f9fc1e7aab262bc66d1b7bac2.zip |
Add another boost test helper
-rw-r--r-- | libadhocutil/boost-test-extra.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libadhocutil/boost-test-extra.h b/libadhocutil/boost-test-extra.h index 04db643..b05349c 100644 --- a/libadhocutil/boost-test-extra.h +++ b/libadhocutil/boost-test-extra.h @@ -7,4 +7,10 @@ } \ else +#define BOOST_CHECK_EQUAL_IF(EQ, EXPR) \ + if (auto VAR = (EXPR); !(VAR == EQ)) { \ + BOOST_CHECK_EQUAL(VAR, EQ); \ + } \ + else + #endif |