[Marble-devel] Re: Review Request: Unittest for GeoDataCoordinates-class.

Dennis Nienhüser earthwings at gentoo.org
Wed Nov 10 22:47:25 CET 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5825/#review8650
-----------------------------------------------------------


Thanks! Great to see someone is working on unit tests, we need more of them :-)



/trunk/KDE/kdeedu/marble/tests/unittest_geodatacoordinates.cpp
<http://svn.reviewboard.kde.org/r/5825/#comment9122>

    Please insert your name and email address here :-)



/trunk/KDE/kdeedu/marble/tests/unittest_geodatacoordinates.cpp
<http://svn.reviewboard.kde.org/r/5825/#comment9123>

    #include "global.h"
    Same for the lines below.
    



/trunk/KDE/kdeedu/marble/tests/unittest_geodatacoordinates.cpp
<http://svn.reviewboard.kde.org/r/5825/#comment9126>

    this looks a bit odd since you use degree values, but the api for radian ones (default unit is radian)



/trunk/KDE/kdeedu/marble/tests/unittest_geodatacoordinates.cpp
<http://svn.reviewboard.kde.org/r/5825/#comment9127>

    what about adding another, similar block
    
    coordinates1.setLongitude(longi);
    QEXPECT_FAIL("", "This should fail", Continue);  QCOMPARE(coordinates1.longitude(GeoDataCoordinates::Degree), longi);
    QCOMPARE(coordinates1.longitude(GeoDataCoordinates::Radian), longi);
    
    to verify that the default unit is indeed radian?
    



/trunk/KDE/kdeedu/marble/tests/unittest_geodatacoordinates.cpp
<http://svn.reviewboard.kde.org/r/5825/#comment9132>

    have you tried .set(0, -90, 0, GeoDataCoordinates::Degree)?



/trunk/KDE/kdeedu/marble/tests/unittest_geodatacoordinates.cpp
<http://svn.reviewboard.kde.org/r/5825/#comment9129>

    maybe just QCOMPARE(succeeded, true)



/trunk/KDE/kdeedu/marble/tests/unittest_geodatacoordinates.cpp
<http://svn.reviewboard.kde.org/r/5825/#comment9130>

    maybe verify the longitude() and latitude() results of coordinates1 here?



/trunk/KDE/kdeedu/marble/tests/unittest_geodatacoordinates.cpp
<http://svn.reviewboard.kde.org/r/5825/#comment9131>

    what about another test that checks the toString() methods against fixed expected results (i.e. the whole string)?
    Currently you check for consistency of the toString() and l*ToString() methods, but the actual values are not verified.
    



/trunk/KDE/kdeedu/marble/tests/unittest_geodatacoordinates.cpp
<http://svn.reviewboard.kde.org/r/5825/#comment9128>

    Better use a QTemporaryFile (or a QBuffer to avoid any disk access)


- Dennis


On 2010-11-10 17:33:24, Matias Kallio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5825/
> -----------------------------------------------------------
> 
> (Updated 2010-11-10 17:33:24)
> 
> 
> Review request for marble.
> 
> 
> Summary
> -------
> 
> First version of unittest for GeoDataCoordinates-class. 
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdeedu/marble/tests/CMakeLists.txt 1194752 
>   /trunk/KDE/kdeedu/marble/tests/unittest_geodatacoordinates.cpp PRE-CREATION 
> 
> Diff: http://svn.reviewboard.kde.org/r/5825/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Matias
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/marble-devel/attachments/20101110/abadcdfc/attachment-0001.htm 


More information about the Marble-devel mailing list