mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
add brackets to macro expressions to ensure expected expansion results
This commit is contained in:
parent
6d16ffaddf
commit
bd90cc4786
|
@ -54,6 +54,6 @@
|
||||||
throw xlnt::exception("assert throws failed -> " XLNT_STRINGIFY(expression)); \
|
throw xlnt::exception("assert throws failed -> " XLNT_STRINGIFY(expression)); \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
#define xlnt_assert_equals(left, right) xlnt_assert(left == right)
|
#define xlnt_assert_equals(left, right) xlnt_assert((left) == (right))
|
||||||
#define xlnt_assert_differs(left, right) xlnt_assert(left != right)
|
#define xlnt_assert_differs(left, right) xlnt_assert((left) != (right))
|
||||||
#define xlnt_assert_delta(left, right, delta) xlnt_assert(std::abs(left - right) <= delta)
|
#define xlnt_assert_delta(left, right, delta) xlnt_assert(std::abs((left) - (right)) <= (delta))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user