Review Request: SoK - Unit Test : core/collections/QueryMaker
Matěj Laitl
matej at laitl.cz
Tue Jun 26 17:17:44 UTC 2012
> On June 26, 2012, 9:29 a.m., Matěj Laitl wrote:
> > tests/core/collections/MockQueryMaker.cpp, line 18
> > <http://git.reviewboard.kde.org/r/105172/diff/3/?file=70259#file70259line18>
> >
> > No need to include moc. if the Q_OBJECT is in .h file.
>
> Jasneet Bhatti wrote:
> When I remove the cpp implementation, I get an 'undefined vtable for MockQueryMaker' error on running make. Do I need to add/include the header file somewhere in the CMakeLists ?
Oh I see, when a class has virtual methods, compiler needs to put the virtual table somewhere. I think it puts it to a file where at least one mehod implementation occurs. So yeah, the .cpp file should exist and you should provide an empty destructor there so that compiler emits the vtable there.
- Matěj
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105172/#review15160
-----------------------------------------------------------
On June 23, 2012, 7:05 p.m., Jasneet Bhatti wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105172/
> -----------------------------------------------------------
>
> (Updated June 23, 2012, 7:05 p.m.)
>
>
> Review request for Amarok, Matěj Laitl and Sven Krohlas.
>
>
> Description
> -------
>
> Implements unit test for the QueryMaker class in core/collections/QueryMaker
>
>
> Diffs
> -----
>
> tests/core/collections/CMakeLists.txt b01b655
> tests/core/collections/MockQueryMaker.h PRE-CREATION
> tests/core/collections/MockQueryMaker.cpp PRE-CREATION
> tests/core/collections/TestQueryMaker.h PRE-CREATION
> tests/core/collections/TestQueryMaker.cpp PRE-CREATION
>
> Diff: http://git.reviewboard.kde.org/r/105172/diff/
>
>
> Testing
> -------
>
> Test builds and runs fine
>
>
> Thanks,
>
> Jasneet Bhatti
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20120626/add04431/attachment.html>
More information about the Amarok-devel
mailing list