source: molecuilder/src/unittests/tesselation_boundarytriangleunittest.hpp@ 91379c

Last change on this file since 91379c was ececad, checked in by Frederik Heber <heber@…>, 16 years ago

MEMLEAK: TesselPoints and Vectors created during TesselationBoundaryTriangleTest::setUp() would not get free'd.

  • Delete of triangle only destroys triangle, its lines and edges, not the TesselPoints
  • New array *tesselpoints[3] introduced, which stores pointers to the created TesselPoints and free's them in tearDown().
  • Allocated Vector's for the TesselPoints have to be deleted as well, as the TesselPoints normally only receive referencing pointers.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 * tesselation_boundarytriangleunittest.hpp
3 *
4 * Created on: Jan 13, 2010
5 * Author: heber
6 */
7
8#ifndef TESSELATION_BOUNDARYTRIANGLEUNITTEST_HPP_
9#define TESSELATION_BOUNDARYTRIANGLEUNITTEST_HPP_
10
11/*********************************************** includes ***********************************/
12
13#include <cppunit/extensions/HelperMacros.h>
14
15#include "linkedcell.hpp"
16#include "tesselation.hpp"
17
18/********************************************** Test classes **************************************/
19
20class TesselationBoundaryTriangleTest : public CppUnit::TestFixture
21{
22 CPPUNIT_TEST_SUITE( TesselationBoundaryTriangleTest) ;
23 CPPUNIT_TEST ( GetClosestPointOnPlaneTest );
24 CPPUNIT_TEST ( GetClosestPointOffPlaneTest );
25 CPPUNIT_TEST_SUITE_END();
26
27public:
28 void setUp();
29 void tearDown();
30 void GetClosestPointOnPlaneTest();
31 void GetClosestPointOffPlaneTest();
32
33private:
34 class BoundaryTriangleSet *triangle;
35 class BoundaryLineSet *lines[3];
36 class BoundaryPointSet *points[3];
37 class TesselPoint *tesselpoints[3];
38 LinkedNodes Corners;
39};
40
41
42#endif /* TESSELATION_BOUNDARYTRIANGLEUNITTEST_HPP_ */
Note: See TracBrowser for help on using the repository browser.