Review Request 127717: Fix error when destroying an default constructed KEduVocDocument
Andreas Cord-Landwehr
cordlandwehr at kde.org
Sun May 1 13:27:39 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127717/#review95053
-----------------------------------------------------------
It seems to me that you try a too complicated approach. Using QTest like done for the automatic unit tests in /autotests is much more convenient.
In particular that includes the test in the ctest list and will be executed on the CI system automatically.
At least, for now I do not see anything in your test that really prevents using QTest.
By convention, automatic unit tests should go to autotests/ while in tests/ only special test applications should be located, e.g. for testing GUI interactions for specific components.
keduvocdocument/tests/emptydocumenttest.cpp (line 22)
<https://git.reviewboard.kde.org/r/127717/#comment64512>
ha any output -> has any output
keduvocdocument/tests/emptydocumenttest.cpp (line 23)
<https://git.reviewboard.kde.org/r/127717/#comment64513>
not output -> no output
keduvocdocument/tests/emptydocumenttest.cpp (line 30)
<https://git.reviewboard.kde.org/r/127717/#comment64514>
since Qt5 we do not use module includes anymore.
- Andreas Cord-Landwehr
On April 22, 2016, 9:02 nachm., Hartmut Riesenbeck wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127717/
> -----------------------------------------------------------
>
> (Updated April 22, 2016, 9:02 nachm.)
>
>
> Review request for KDE Edu.
>
>
> Repository: libkeduvocdocument
>
>
> Description
> -------
>
> When a KEduVocDocument which was constructed by the default constructor
> becomes destructed, the error message "QFile::remove: Empty or null
> file name" is given on stderr.
>
> Since the file name of the KAutoSaveFile was not set in the default
> constructor, the KAutoSaveFile::remove() method in ~KEduVocDocument()
> have given this error message. Removed this method call and the
> following KAutoSaveFile::releaseLock(), because they are called in the
> KAutoSaveFile destructor as well but with check for file name.
>
> Added unit test emptydocumenttest to proof the bugfix.
>
> Since I'm not a cmake expert, I hope the test was added in the right way. I would be thankful for improvements.
>
>
> Diffs
> -----
>
> .gitignore PRE-CREATION
> keduvocdocument/keduvocdocument.cpp feaebe45d98ec5e862dbb7b8e95c142a7d59c7ff
> keduvocdocument/tests/CMakeLists.txt 366181de4376ce3dcbae349faca4108065661724
> keduvocdocument/tests/emptydocumenttest.cpp PRE-CREATION
> keduvocdocument/tests/emptydocumenttest.h.in PRE-CREATION
> keduvocdocument/tests/emptydocumenttest_helper.cpp PRE-CREATION
>
> Diff: https://git.reviewboard.kde.org/r/127717/diff/
>
>
> Testing
> -------
>
> Unit test emptydocumenttest
>
>
> Thanks,
>
> Hartmut Riesenbeck
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20160501/e9618937/attachment.html>
More information about the kde-edu
mailing list