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

Matěj Laitl matej at laitl.cz
Fri Jul 13 12:51:54 UTC 2012


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


Looks good, please add one more test method.


tests/core/meta/support/TestMetaTrackKey.h
<http://git.reviewboard.kde.org/r/105454/#comment12389>

    Can you also please test the TrackKey( const TrackPtr &track ) constructor? That it assigns correct values from the track.
    
    You might need to add "friend class TestMetaTrackKey;" to MetaTrack key. (wihout including the test header of otherwise defining it)
    
    Also please change actual TrackKey() constructor to initialise int m_discNumber; int m_trackNumber to 0, because primitive types are not initialised by default AFAIK and that's not nice.



tests/core/meta/support/TestMetaTrackKey.cpp
<http://git.reviewboard.kde.org/r/105454/#comment12390>

    nitpicky: perhaps too much blank lines here.


- Matěj Laitl


On July 11, 2012, 8:49 p.m., Jasneet Bhatti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105454/
> -----------------------------------------------------------
> 
> (Updated July 11, 2012, 8:49 p.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
> -----
> 
>   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/20120713/a8aee198/attachment.html>


More information about the Amarok-devel mailing list