Bug 331470 - Implement equality comparison of GeoDataAccuracy and GeoDataAlias
Summary: Implement equality comparison of GeoDataAccuracy and GeoDataAlias
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.7 (KDE 4.12)
Platform: unspecified Linux
: NOR task
Target Milestone: ---
Assignee: Cruceru Calin-Cristian
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2014-02-24 19:13 UTC by Dennis Nienhüser
Modified: 2014-02-26 09:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Nienhüser 2014-02-24 19:13:28 UTC
Add two methods
bool operator==( const GeoDataAlias &other ) const;
bool operator!=( const GeoDataAlias &other ) const;
operator!= should call !operator== inside its implementation.
to GeoDataAlias which implement equality comparision. Add a new unit test in tests/ called TestEquality.cpp (make sure to add it to CMakeLists.txt as well) which creates different GeoDataAlias instances and compares them. Some should be equal, some different, covering various combinations.

Make sure to compile Marble with the BUILD_MARBLE_TESTS=TRUE option enabled and run the test case from the build folder (run tests/TestEquality). 

Extend GeoDataAccurary and add a new operator
bool operator!=( const GeoDataAccuracy &other ) const;
which calls the existing operator== in its implementation. Add test cases for various equal and  unequal instances of GeoDataAccuracy to TestEquality.cpp as well.

Submit a review request at https://git.reviewboard.kde.org with the marble groups as reviewers.

Please leave a comment here (e.g. "I want to work on this task.") if you start working on this task to avoid multiple people working on it at the same time.
Comment 1 Cruceru Calin-Cristian 2014-02-24 23:09:38 UTC
I want to work on this task.
Comment 2 Cruceru Calin-Cristian 2014-02-26 06:31:27 UTC
Made a post in ReviewBoard with the patch for this bug: https://git.reviewboard.kde.org/r/116074/ . Plese do review it. Thank you !
Comment 3 Dennis Nienhüser 2014-02-26 09:16:53 UTC
Git commit 1185ae26133646d14582e6c82cf458c752feb5be by Dennis Nienhüser, on behalf of Cruceru Calin-Cristian.
Committed on 26/02/2014 at 09:15.
Pushed by nienhueser into branch 'master'.

Implement equality comparison of GeoDataAccuracy and GeoDataAlias
REVIEW: 116074

M  +5    -0    src/lib/marble/geodata/data/GeoDataAccuracy.cpp
M  +2    -0    src/lib/marble/geodata/data/GeoDataAccuracy.h
M  +10   -0    src/lib/marble/geodata/data/GeoDataAlias.cpp
M  +4    -0    src/lib/marble/geodata/data/GeoDataAlias.h
M  +1    -0    tests/CMakeLists.txt
A  +114  -0    tests/TestEquality.cpp     [License: LGPL]

http://commits.kde.org/marble/1185ae26133646d14582e6c82cf458c752feb5be