Small enhancement: Assert Greater with a message
Joe Larson
jpl at showpage.org
Wed May 16 13:50:15 UTC 2018
I love cppunit. I have a small suggestion.
Many of the comparison macros do not have an _MESSAGE version such as this:
#define CPPUNIT_ASSERT_GREATER_MESSAGE(message, expected, actual) \
( CPPUNIT_NS::assertGreater( (expected), \
(actual), \
CPPUNIT_SOURCELINE(), \
message ) )
The code accepts a message. It is only the corresponding macros that are missing. For now, I’ve created my own UnitTest.h file that adds the extra macros I need, but it would be great if they were part of your package.
I haven’t finished testing my macro — I started this email then sat on it. I presume it works, as it’s a cut & paste of yours, but adding the message argument. But I want to get this email out rather than let it linger...
It would be doubly-great if the ubuntu version from apt-get install libcppunit were your code instead of the old one. At least Homebrew’s version on the Mac is yours.
As a separate note, autogen.sh fails on a Mac.
$ ./autogen.sh
error: aclocal not found
For testing, I was able to autogen.sh from ubuntu and then ./configure on Mac. (I have a docker image of ubuntu running with a shared directory.) Perhaps there’s something I need to install that I don’t have. It would be great if the docs included build info for Mac.
Thanks so much for a great tool.
-Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20180516/e03a5e2f/attachment.html>
More information about the LibreOffice
mailing list