<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/105497/">http://git.reviewboard.kde.org/r/105497/</a>
     </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 13th, 2012, 1:03 p.m., <b>Matěj Laitl</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/105497/diff/1/?file=71972#file71972line33" style="color: black; font-weight: bold; text-decoration: underline;">tests/core/meta/support/TestMetaAlbumKey.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">TestMetaAlbumKey::initTestCase()</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">33</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">m_track2</span> <span class="o">=</span> <span class="n">CollectionManager</span><span class="o">::</span><span class="n">instance</span><span class="p">()</span><span class="o">-></span><span class="n">trackForUrl</span><span class="p">(</span> <span class="n">dataPath</span><span class="p">(</span> <span class="s">"data/audio/album 2/Track01.ogg"</span> <span class="p">)</span> <span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">How big are the added files? They should be no more than a few kilobytes in order not to make Amarok source unnecessary big. You can even create tracks in test programatically, see TestSqlScanManager::createTrack()</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The two added files are 4.1 KB each, which I think is acceptable.

Moreover, I think future tests will require a few tracks with different tags for trivial testing. It would save time and effort to use these instead of creating tracks as in TestSqlScanManager.
OR
The track/album/etc. generation code can be moved out of TestSqlScanManager and made into a helper class of its own.</pre>
<br />




<p>- Jasneet</p>


<br />
<p>On July 14th, 2012, 6:03 a.m., Jasneet Bhatti wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Amarok, Matěj Laitl and Sven Krohlas.</div>
<div>By Jasneet Bhatti.</div>


<p style="color: grey;"><i>Updated July 14, 2012, 6:03 a.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Unit test for class AlbumKey of core/meta/support/MetaKeys

Created a couple of silent tracks( take negligible space ) for testing with the artist and album names comprehensively. Seemed like a smarter way than to create large mocks since no other functionality is to be tested for.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Builds, links and runs fine.

Output of running test with -v2 flag:

********* Start testing of TestMetaAlbumKey *********
Config: Using QTest library 4.8.1, Qt 4.8.1
INFO   : TestMetaAlbumKey::initTestCase() entering
QSYSTEM: TestMetaAlbumKey::initTestCase() qttest(431)/kdecore (K*TimeZone*): No time zone information obtained from ktimezoned 
PASS   : TestMetaAlbumKey::initTestCase()
INFO   : TestMetaAlbumKey::testOperatorAssignment() entering
INFO   : TestMetaAlbumKey::testOperatorAssignment() QVERIFY(!( albumKey1 == albumKey2 ))
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(55)]
INFO   : TestMetaAlbumKey::testOperatorAssignment() QVERIFY(albumKey1 == tempAlbumKey)
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(59)]
INFO   : TestMetaAlbumKey::testOperatorAssignment() QVERIFY(!( albumKey1 == albumKey2 ))
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(64)]
INFO   : TestMetaAlbumKey::testOperatorAssignment() QVERIFY(albumKey1 == tempAlbumKey)
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(68)]
PASS   : TestMetaAlbumKey::testOperatorAssignment()
INFO   : TestMetaAlbumKey::testOperatorLessThan() entering
INFO   : TestMetaAlbumKey::testOperatorLessThan() QVERIFY(albumKey1 < albumKey2)
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(79)]
INFO   : TestMetaAlbumKey::testOperatorLessThan() QVERIFY(!( albumKey1 < albumKey1 ))
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(82)]
INFO   : TestMetaAlbumKey::testOperatorLessThan() QVERIFY(albumKey2 < albumKey3)
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(85)]
INFO   : TestMetaAlbumKey::testOperatorLessThan() QVERIFY(albumKey1 < albumKey3)
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(88)]
INFO   : TestMetaAlbumKey::testOperatorLessThan() QVERIFY(albumKey4 < albumKey5)
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(95)]
INFO   : TestMetaAlbumKey::testOperatorLessThan() QVERIFY(!( albumKey4 < albumKey4 ))
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(98)]
INFO   : TestMetaAlbumKey::testOperatorLessThan() QVERIFY(albumKey5 < albumKey6)
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(101)]
INFO   : TestMetaAlbumKey::testOperatorLessThan() QVERIFY(albumKey4 < albumKey6)
   Loc: [/home/jasneet/amarok/tests/core/meta/support/TestMetaAlbumKey.cpp(104)]
PASS   : TestMetaAlbumKey::testOperatorLessThan()
INFO   : TestMetaAlbumKey::cleanupTestCase() entering
PASS   : TestMetaAlbumKey::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped
********* Finished testing of TestMetaAlbumKey *********
</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/core/meta/support/MetaKeys.h <span style="color: grey">(1a2fc25)</span></li>

 <li>tests/core/meta/CMakeLists.txt <span style="color: grey">(3ae78c9)</span></li>

 <li>tests/core/meta/support/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>tests/core/meta/support/TestMetaAlbumKey.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>tests/core/meta/support/TestMetaAlbumKey.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>tests/data/audio/album2/Track01.ogg <span style="color: grey">(PRE-CREATION)</span></li>

 <li>tests/data/audio/album2/Track02.ogg <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/105497/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>