curve-test.h revision 76addc201c409e81eaaa73fe27cc0f79c4db097c
#include <cxxtest/TestSuite.h>
{
// Closed path
// Closed path (ClosingSegment is zero length)
// TODO fix path2.append(Geom::BezierCurve<3>(Geom::Point(3,0),Geom::Point(2,1),Geom::Point(1,1),Geom::Point(2,0)));
// Open path
}
// createSuite and destroySuite get us per-suite setup and teardown
// without us having to worry about static initialization order, etc.
void testGetSegmentCount()
{
{ // Zero segments
}
{ // Zero segments
}
{ // Individual paths
}
{ // Combination
}
}
void testNodesInPath()
{
{ // Zero segments
}
{ // Zero segments
}
{ // Individual paths
TS_ASSERT_EQUALS(SPCurve(pv).nodes_in_path() , 2u); // zero length closing segments do not increase the nodecount.
}
{ // Combination
}
}
void testIsEmpty()
{
}
void testIsClosed()
{
}
void testLastFirstSegment()
{
/* Geom::Curve can't be compared very easily (?)
Geom::PathVector pv(1, path4);
pv[0].close();
TS_ASSERT_EQUALS(*SPCurve(pv).first_segment() , pv[0][0]);
TS_ASSERT_EQUALS(*SPCurve(pv).last_segment() , pv[0][0]);
pv[0] = path1;
TS_ASSERT_EQUALS(*SPCurve(pv).first_segment() , pv[0][0]);
TS_ASSERT_EQUALS(*SPCurve(pv).last_segment() , pv[0][2]);
pv[0] = path2;
TS_ASSERT_EQUALS(*SPCurve(pv).first_segment() , pv[0][0]);
TS_ASSERT_EQUALS(*SPCurve(pv).last_segment() , pv[0][1]);
pv[0] = path3;
TS_ASSERT_EQUALS(*SPCurve(pv).first_segment() , pv[0][0]);
TS_ASSERT_EQUALS(*SPCurve(pv).last_segment() , pv[0][3]);
pv[0] = path4;
TS_ASSERT_EQUALS(SPCurve(pv).first_segment() , (void*)0);
TS_ASSERT_EQUALS(SPCurve(pv).last_segment() , (void*)0);
pv.clear();
pv.push_back(path1);
pv.push_back(path2);
pv.push_back(path3);
TS_ASSERT_EQUALS(*SPCurve(pv).first_segment() , pv[0][0]);
TS_ASSERT_EQUALS(*SPCurve(pv).last_segment() , pv[2][3]);*/
}
void testLastFirstPath()
{
}
void testFirstPoint()
{
}
void testLastPoint()
{
}
void testSecondPoint()
{
}
void testPenultimatePoint()
{
}
// TODO: Rest of the methods
};
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :