3 ms·
You can also use the comma operator to document your assert()s, if you don't like using comments. assert(("test_foo() should be true", test_foo())); https
by cormacrelf 10y ago
You can also use the comma operator to document your assert()s, if you don't like using comments.
assert(("test_foo() should be true", test_foo()));
https://en.wikipedia.org/wiki/Comma_operator#Asserts https://en.wikipedia.org/wiki/Comma_operator#Asserts
- gpderetta 10y agoI have used often and also seen in the wild the following form: assert(condition && "message");