Review Request: SoK - Unit Test : core/meta/support/MetaKeys( TrackKey )

Matěj Laitl matej at laitl.cz
Fri Jul 20 12:32:19 UTC 2012



> On July 18, 2012, 8:50 p.m., Matěj Laitl wrote:
> > src/core/meta/support/MetaKeys.h, line 25
> > <http://git.reviewboard.kde.org/r/105454/diff/3/?file=72593#file72593line25>
> >
> >     Same here: is this really needed? "friend class" should be enough IMO, but I'm too lazy to try. :-|
> 
> Jasneet Bhatti wrote:
>     TestMetaAlbumKey is declared in a global namespace.
>     So, to be able to add it as a friend class, we need to either do the explicit forward declaration as above and use the :: operator to refer to it
>     OR
>     do:
>     namespace
>     {
>         class TestMetaAlbumKey;
>     }
>     and then use it without the :: operator like any other class
>     
>     Had it been declared in some user defined namespace, only the friend class declaration would have sufficed.

Okay, then proceed with the original patch, same for the AlbumKey one.

Good work, Jasneet, your rate is amazing. If you ever want something more complicated then these easy core classes, there is SqlScanResultProcessor, QtGroupingProxy etc to test, but beware these may be rather complicated and time-consuming to test properly.


- Matěj


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105454/#review16093
-----------------------------------------------------------


On July 14, 2012, 4:06 a.m., Jasneet Bhatti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105454/
> -----------------------------------------------------------
> 
> (Updated July 14, 2012, 4:06 a.m.)
> 
> 
> Review request for Amarok, Matěj Laitl and Sven Krohlas.
> 
> 
> Description
> -------
> 
> Added a unit test for class TrackKey of core/meta/support/MetaKeys
> 
> 
> Diffs
> -----
> 
>   src/core/meta/support/MetaKeys.h 1a2fc25 
>   src/core/meta/support/MetaKeys.cpp d3fd722 
>   tests/core/meta/CMakeLists.txt 3ae78c9 
>   tests/core/meta/support/CMakeLists.txt PRE-CREATION 
>   tests/core/meta/support/TestMetaTrackKey.h PRE-CREATION 
>   tests/core/meta/support/TestMetaTrackKey.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/105454/diff/
> 
> 
> Testing
> -------
> 
> Builds, and runs fine.
> 
> Output of running test with -v2 flag:
> 
> ********* Start testing of TestMetaTrackKey *********
> Config: Using QTest library 4.8.1, Qt 4.8.1
> INFO   : TestMetaTrackKey::initTestCase() entering
> PASS   : TestMetaTrackKey::initTestCase()
> INFO   : TestMetaTrackKey::testOperatorAssignment() entering
> QSYSTEM: TestMetaTrackKey::testOperatorAssignment() qttest(4918)/kdecore (K*TimeZone*): No time zone information obtained from ktimezoned 
> INFO   : TestMetaTrackKey::testOperatorAssignment() QVERIFY(!( trackKey1 == trackKey2 ))
>    Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaTrackKey.cpp(41)]
> INFO   : TestMetaTrackKey::testOperatorAssignment() QVERIFY(trackKey1 == trackKey2)
>    Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaTrackKey.cpp(45)]
> PASS   : TestMetaTrackKey::testOperatorAssignment()
> INFO   : TestMetaTrackKey::cleanupTestCase() entering
> PASS   : TestMetaTrackKey::cleanupTestCase()
> Totals: 3 passed, 0 failed, 0 skipped
> ********* Finished testing of TestMetaTrackKey *********
> 
> 
> Thanks,
> 
> Jasneet Bhatti
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20120720/ccdac536/attachment.html>


More information about the Amarok-devel mailing list