Hi,
It sounds cool, count me in. :)
With regards,
Daniel
2012/2/18 Markus Mohrhard <markus.mohrhard@googlemail.com>:
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
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.