diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-08-13 18:49:22 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-08-13 18:49:22 +0000 |
| commit | d70f7cc1bada9cd825ee742246f817ca4fdb14cd (patch) | |
| tree | e2f0373f664e81c3f0df1dcffb689e140323d764 /src/display/curve-test.h | |
| parent | Get rid of sp_nodepath_current() and a few instances of SP_ACTIVE_DESKTOP by ... (diff) | |
| download | inkscape-d70f7cc1bada9cd825ee742246f817ca4fdb14cd.tar.gz inkscape-d70f7cc1bada9cd825ee742246f817ca4fdb14cd.zip | |
return boost::optional for second and penultimate points of SPCurve
(bzr r6616)
Diffstat (limited to 'src/display/curve-test.h')
| -rw-r--r-- | src/display/curve-test.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/display/curve-test.h b/src/display/curve-test.h index a45f01afd..56b49ff4c 100644 --- a/src/display/curve-test.h +++ b/src/display/curve-test.h @@ -215,32 +215,32 @@ public: void testSecondPoint() { - TS_ASSERT_EQUALS(SPCurve(Geom::PathVector(1, path1)).second_point() , Geom::Point(1,0)); - TS_ASSERT_EQUALS(SPCurve(Geom::PathVector(1, path2)).second_point() , Geom::Point(3,0)); - TS_ASSERT_EQUALS(SPCurve(Geom::PathVector(1, path3)).second_point() , Geom::Point(5,1)); - TS_ASSERT_EQUALS(SPCurve(Geom::PathVector(1, path4)).second_point() , Geom::Point(3,5)); + TS_ASSERT_EQUALS( *(SPCurve(Geom::PathVector(1, path1)).second_point()) , Geom::Point(1,0)); + TS_ASSERT_EQUALS( *(SPCurve(Geom::PathVector(1, path2)).second_point()) , Geom::Point(3,0)); + TS_ASSERT_EQUALS( *(SPCurve(Geom::PathVector(1, path3)).second_point()) , Geom::Point(5,1)); + TS_ASSERT_EQUALS( *(SPCurve(Geom::PathVector(1, path4)).second_point()) , Geom::Point(3,5)); Geom::PathVector pv; pv.push_back(path1); pv.push_back(path2); pv.push_back(path3); - TS_ASSERT_EQUALS(SPCurve(pv).second_point() , Geom::Point(1,0)); + TS_ASSERT_EQUALS( *(SPCurve(pv).second_point()) , Geom::Point(1,0)); pv.insert(pv.begin(), path4); - TS_ASSERT_EQUALS(SPCurve(pv).second_point() , Geom::Point(0,0)); + TS_ASSERT_EQUALS( SPCurve(pv).second_point() == false, true ); } void testPenultimatePoint() { - TS_ASSERT_EQUALS(SPCurve(Geom::PathVector(1, path1)).penultimate_point() , Geom::Point(1,1)); - TS_ASSERT_EQUALS(SPCurve(Geom::PathVector(1, path2)).penultimate_point() , Geom::Point(3,0)); - TS_ASSERT_EQUALS(SPCurve(Geom::PathVector(1, path3)).penultimate_point() , Geom::Point(6,4)); - TS_ASSERT_EQUALS(SPCurve(Geom::PathVector(1, path4)).penultimate_point() , Geom::Point(3,5)); + TS_ASSERT_EQUALS( *(SPCurve(Geom::PathVector(1, path1)).penultimate_point()) , Geom::Point(1,1)); + TS_ASSERT_EQUALS( *(SPCurve(Geom::PathVector(1, path2)).penultimate_point()) , Geom::Point(3,0)); + TS_ASSERT_EQUALS( *(SPCurve(Geom::PathVector(1, path3)).penultimate_point()) , Geom::Point(6,4)); + TS_ASSERT_EQUALS( *(SPCurve(Geom::PathVector(1, path4)).penultimate_point()) , Geom::Point(3,5)); Geom::PathVector pv; pv.push_back(path1); pv.push_back(path2); pv.push_back(path3); - TS_ASSERT_EQUALS(SPCurve(pv).penultimate_point() , Geom::Point(6,4)); + TS_ASSERT_EQUALS( *(SPCurve(pv).penultimate_point()) , Geom::Point(6,4)); pv.push_back(path4); - TS_ASSERT_EQUALS(SPCurve(pv).penultimate_point() , Geom::Point(8,4)); + TS_ASSERT_EQUALS( *(SPCurve(pv).penultimate_point()) , Geom::Point(8,4)); } // TODO: Rest of the methods |
