[GSoC] Character border, 11.-12. week

Zolnai Tamás zolnaitamas2000 at gmail.com
Mon Sep 9 04:35:30 PDT 2013

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
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
I pushed the diff to gerrit, if you have other comments to it:

> - 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.


Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130909/a5a0961e/attachment.html>

More information about the LibreOffice mailing list