Re: [PATCH] SwDocStub now prints out parameters

2012-02-18 Thread Mihályi Dániel
Hi,

It sounds cool, count me in. :)

With regards,
Daniel

2012/2/18 Markus Mohrhard :
> Hello Daniel,
>
>> It is, :)
>
> Great!
>
>> but i don't understand something.
>> If it is about creating a child class then why is that we have to have
>> not only virtual methods?
>>
>
> We don't want to create a child class but replace a class with another
> class having exactly the same interface. This would allow us to break
> dependencies during testing and make it possible that we don't need to
> start a whole Libreoffice instance for tests.
>
> There is first the ieda Cedric and I had in Brussels that we should
> create stubs for some central sw classes and monitor the input into
> them during file loading. This idea would make it much more easy to
> test that the content is imported correctly. We have nice concepts for
> such tests in calc and to some degree in impress/draw but we are
> missing one for writer.
>
> And then there is another great opportunity that it would make it
> possible to write real unit tests. I hope that with this script it
> might be possible to break nearly all dependencies and bring a class
> under test control. My idea for this is that every time you need to
> mock a class you create a test class with the same interface but with
> all methods virtual and returning default values. If you now need a
> special value for a class you can easily create a subclass overriding
> just one method.
>
> I know that both concepts are still in an early stage and we don't yet
> know if they work or good but we will not know without trying.
>
> Regards,
> Markus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] SwDocStub now prints out parameters

2012-02-18 Thread Markus Mohrhard
Hello Daniel,

> It is, :)

Great!

> but i don't understand something.
> If it is about creating a child class then why is that we have to have
> not only virtual methods?
>

We don't want to create a child class but replace a class with another
class having exactly the same interface. This would allow us to break
dependencies during testing and make it possible that we don't need to
start a whole Libreoffice instance for tests.

There is first the ieda Cedric and I had in Brussels that we should
create stubs for some central sw classes and monitor the input into
them during file loading. This idea would make it much more easy to
test that the content is imported correctly. We have nice concepts for
such tests in calc and to some degree in impress/draw but we are
missing one for writer.

And then there is another great opportunity that it would make it
possible to write real unit tests. I hope that with this script it
might be possible to break nearly all dependencies and bring a class
under test control. My idea for this is that every time you need to
mock a class you create a test class with the same interface but with
all methods virtual and returning default values. If you now need a
special value for a class you can easily create a subclass overriding
just one method.

I know that both concepts are still in an early stage and we don't yet
know if they work or good but we will not know without trying.

Regards,
Markus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] SwDocStub now prints out parameters

2012-02-17 Thread Mihályi Dániel
Hi,

It is, :)
but i don't understand something.
If it is about creating a child class then why is that we have to have
not only virtual methods?

With regards,
Daniel

2012/2/18 Markus Mohrhard :
> Hello Daniel
>
>> What do you mean by relevant methods?
>>
>
> Good question. I think that at least all protected and public method
> should be in there but it should not be a problem if there are also
> the private methods in it.
>
> Cedric and I had some rough ideas in Brussels what we want to do and
> now we need to check if they are practical or if we need to adjust our
> ideas to reality ;) So if you want you may help improve our ideas and
> as soona s I set up a feature branch play with it and help out. Is
> this something that sounds interesting to you?
>
> Regards,
> Markus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] SwDocStub now prints out parameters

2012-02-17 Thread Markus Mohrhard
Hello Daniel

> What do you mean by relevant methods?
>

Good question. I think that at least all protected and public method
should be in there but it should not be a problem if there are also
the private methods in it.

Cedric and I had some rough ideas in Brussels what we want to do and
now we need to check if they are practical or if we need to adjust our
ideas to reality ;) So if you want you may help improve our ideas and
as soona s I set up a feature branch play with it and help out. Is
this something that sounds interesting to you?

Regards,
Markus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] SwDocStub now prints out parameters

2012-02-17 Thread Mihályi Dániel
Hi,

What do you mean by relevant methods?

With regards,
Daniel


2012/2/17 Markus Mohrhard :
> Hey,
>
> 2012/2/15 Markus Mohrhard :
>> Hey,
>>
>> thanks a lot for your great work here.
>>
>
>
> after discussing the problems a bit more with Cedric we noticed that
> it might be better to try first a version where we create empty stub
> methods for all relevant methods. Do you think that is something you
> could realize with some adjustments to your script?
>
> Regards,
> Markus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] SwDocStub now prints out parameters

2012-02-17 Thread Markus Mohrhard
Hey,

2012/2/15 Markus Mohrhard :
> Hey,
>
> thanks a lot for your great work here.
>


after discussing the problems a bit more with Cedric we noticed that
it might be better to try first a version where we create empty stub
methods for all relevant methods. Do you think that is something you
could realize with some adjustments to your script?

Regards,
Markus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] SwDocStub now prints out parameters

2012-02-15 Thread Markus Mohrhard
Hey,

thanks a lot for your great work here.

Regards,
Markus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice