Hi Miklós,
- assertEqualBorder() -> CPPUNIT_ASSERT_EQUAL_BORDER(): in C++, in
general inline functions are preferred over macros. If the intention
is to get the place where the real problem is, run the unit test in
gdb, and get a backtrace.
I looked up how to write new unit test macros
http://cppunit.sourceforge.net/doc/lastest/group___assertions.html and
http://cppunit.sourceforge.net/doc/lastest/struct_asserter.html
and rewrite the mentioned macro using an inline function inside it, so it
becomes more safe, which is the biggest advantage of using functions
instead of macros. Plus with it, the assertion will point to the right
place.
I pushed the diff to gerrit, if you have other comments to it:
https://gerrit.libreoffice.org/#/c/5885/
- If you deal with colors in unit tests, I think writing them in hex
form is much more readable (16711680 vs 0xff0000). Or in case it's a
common color, even better: COL_RED
It seems in LO souce code COL_RED not equal with 0xff0000. I tried to use
it in the unit tests, but they failed. So I keep at hex form.
- sw/source/filter/ww8/attributeoutputbase.hxx: Please avoid using
'using' in header files, we only do that in cxx files, hxx files have
all the namespaces written out for better readability.
Ok,
Best regards,
Tamás
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.