help in writing tests
Miklos Vajna
vmiklos at collabora.com
Thu Jan 23 08:15:09 UTC 2020
Hi Shivam,
[ First, please let's keep the discussion on the mailing list, not in
private. ]
On Mon, Jan 20, 2020 at 02:28:34PM +0530, Shivam Kumar Singh <shivamhere247 at gmail.com> wrote:
> Thanks for you reply .Following is the patch that I had submitted .
> https://gerrit.libreoffice.org/c/core/+/86944
>
> Also, Is it necessary to add unit test for all the bug fixes we do ?
It's a good idea to always consider it. More details here:
https://wiki.documentfoundation.org/Development/Unit_Tests
Regarding your change, I would try to create a new document, dispatch an
uno command that creates the shape and the use the internal API to
verify that the fill type is none. If you put a breakpoint on your
change and take a look at the backtrace, that might give you an idea
what command to dispatch. Existing tests that do something similar
already:
- sd/qa/unit/uiimpress.cxx:69 GetDispatcher()->Execute() on how to
dispatch a command
- sd/qa/unit/import-tests.cxx:682 GetMergedItem() on how to get the fill
style
Regards,
Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20200123/38b4053d/attachment.sig>
More information about the LibreOffice
mailing list