cxxtest: curve-test.h fails

Bug #1208013 reported by Alex Valavanis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Medium
Tomasz Boczkowski

Bug Description

In lp:inkscape r12445, curve-test.h fails with "make check".

Please could someone who is more familiar with 2Geom take a look?

In CurveTest::testGetSegmentCount:
../../src/display/curve-test.h:56: Error: Expected (SPCurve(pv).get_segment_count() == 3u), found (2 != 3)
../../src/display/curve-test.h:71: Error: Expected (curve.get_segment_count() == 10u), found (9 != 10)
In CurveTest::testNodesInPath:
../../src/display/curve-test.h:108: Error: Expected (curve.nodes_in_path() == 12u), found (11 != 12)
..
In CurveTest::testLastFirstSegment:
../../src/display/curve-test.h:140: Error: Expected (SPCurve(pv).first_segment() != (void*)0), found ({ 00 00 00 00 00 00 00 00 })
../../src/display/curve-test.h:141: Error: Expected (SPCurve(pv).last_segment() != (void*)0), found ({ 00 00 00 00 00 00 00 00 })
..
In CurveTest::testLastPoint:
../../src/display/curve-test.h:204: Error: Expected (*(SPCurve(Geom::PathVector(1, path1)).last_point()) == Geom::Point(0,0)), found ({ 00 00 00 00 00 00 F0 3F ... } != { 00 00 00 00 00 00 00 00 ... })
../../src/display/curve-test.h:205: Error: Expected (*(SPCurve(Geom::PathVector(1, path2)).last_point()) == Geom::Point(2,0)), found ({ 00 00 00 00 00 00 08 40 ... } != { 00 00 00 00 00 00 00 40 ... })
.
In CurveTest::testPenultimatePoint:
../../src/display/curve-test.h:245: Error: Expected (*(SPCurve(pv).penultimate_point()) == Geom::Point(8,4)), found ({ 00 00 00 00 00 00 08 40 ... } != { 00 00 00 00 00 00 20 40 ... })

Changed in inkscape:
importance: Undecided → Medium
status: New → Triaged
Changed in inkscape:
milestone: none → 1.0
Changed in inkscape:
assignee: nobody → Tomasz Boczkowski (penginsbacon)
Revision history for this message
Tomasz Boczkowski (penginsbacon) wrote :

Summary of failing test:

CurveTest::testGetSegmentCount
  fixed by attached path. One of test segments was commented out during merge. The patch fixes that.

CurveTest::testNodesInPath
  fixed by attached path. According to comment in line 93 zero lenght closing segments should not increase the node count.

CurveTest::testLastFirstSegment
  I'm not sure if the test is correct. Should closing an empty path add a segment to it?

CurveTest::testLastPoint
  When path is closed, last point is != first point. I'll post a patch fixing Geom::Path behaviour.

CurveTest::testPenultimatePoint
   SPCurve::penultimate_point() is dead code. It is not used since revision 8855. I think this test and penultimate_point method can be deleted.

Revision history for this message
Tomasz Boczkowski (penginsbacon) wrote :

CurveTest::testLastPoint
  Actually SPCurve::lastPoint calls Geom::Path::finalPoint. It returns last given point. Code in lib2geom relies on this behaviour.

Patrick Storz (ede123)
Changed in inkscape:
milestone: 1.0-old → 1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.