Re: help in writing tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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

Attachment: signature.asc
Description: Digital signature

_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux