~ubuntu-branches/ubuntu/vivid/regina-normal/vivid-proposed

« back to all changes in this revision

Viewing changes to testsuite/angle/nanglestructurelist.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2006-10-29 22:25:06 UTC
  • mfrom: (3.1.7 edgy)
  • Revision ID: james.westby@ubuntu.com-20061029222506-1y63yl1k6pwhhpwq
Tags: 4.3.1-3
Removed www-browser as an alternative to konqueror in regina-normal-doc
recommendations, since the GUI needs konqueror specifically to open the
API docs from the help menu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 *  Regina - A Normal Surface Theory Calculator                           *
5
5
 *  Test Suite                                                            *
6
6
 *                                                                        *
7
 
 *  Copyright (c) 1999-2004, Ben Burton                                   *
 
7
 *  Copyright (c) 1999-2006, Ben Burton                                   *
8
8
 *  For further details contact Ben Burton (bab@debian.org).              *
9
9
 *                                                                        *
10
10
 *  This program is free software; you can redistribute it and/or         *
19
19
 *                                                                        *
20
20
 *  You should have received a copy of the GNU General Public             *
21
21
 *  License along with this program; if not, write to the Free            *
22
 
 *  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,        *
23
 
 *  MA 02111-1307, USA.                                                   *
 
22
 *  Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,       *
 
23
 *  MA 02110-1301, USA.                                                   *
24
24
 *                                                                        *
25
25
 **************************************************************************/
26
26
 
28
28
 
29
29
#include <cppunit/extensions/HelperMacros.h>
30
30
#include "angle/nanglestructurelist.h"
 
31
#include "triangulation/nexampletriangulation.h"
31
32
#include "triangulation/ntriangulation.h"
32
33
#include "testsuite/angle/testangle.h"
33
34
 
34
35
using regina::NAngleStructure;
35
36
using regina::NAngleStructureList;
 
37
using regina::NExampleTriangulation;
36
38
using regina::NPerm;
37
39
using regina::NTetrahedron;
38
40
using regina::NTriangulation;
58
60
            /**< An untwisted layered loop of length 2. */
59
61
 
60
62
    public:
 
63
        void copyAndDelete(NTriangulation& dest, NTriangulation* source) {
 
64
            dest.insertTriangulation(*source);
 
65
            delete source;
 
66
        }
 
67
 
61
68
        void setUp() {
62
 
            NTetrahedron* r;
63
 
            NTetrahedron* s;
64
 
 
65
 
            // The two-tetrahedron figure eight knot complement is
66
 
            // described at the beginning of chapter 8 of Richard
67
 
            // Rannard's PhD thesis.
68
 
            r = new NTetrahedron();
69
 
            s = new NTetrahedron();
70
 
            r->joinTo(0, s, NPerm(1, 3, 0, 2));
71
 
            r->joinTo(1, s, NPerm(2, 0, 3, 1));
72
 
            r->joinTo(2, s, NPerm(0, 3, 2, 1));
73
 
            r->joinTo(3, s, NPerm(2, 1, 0, 3));
74
 
            triFigure8.addTetrahedron(r);
75
 
            triFigure8.addTetrahedron(s);
76
 
 
77
 
            // The Gieseking manifold is simple enough; it has only one
78
 
            // tetrahedron.
79
 
            r = new NTetrahedron();
80
 
            r->joinTo(0, r, NPerm(1, 2, 0, 3));
81
 
            r->joinTo(2, r, NPerm(0, 2, 3, 1));
82
 
            triGieseking.addTetrahedron(r);
 
69
            // Use pre-coded triangulations where we can.
 
70
            copyAndDelete(triFigure8,
 
71
                NExampleTriangulation::figureEightKnotComplement());
 
72
            copyAndDelete(triGieseking, NExampleTriangulation::gieseking());
83
73
 
84
74
            // Layered loops can be constructed automatically.
85
75
            triLoopC2.insertLayeredLoop(2, false);