Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

box.cc

00001 #include "Box_3.h"
00002 #include "tester.h"
00003 
00004 
00005 class box_test : public CppUnit::TestCase
00006 {
00007 public:
00008     void basic()
00009     {
00010         Box_3 box1( 1,2, 3,4, 5,6 );
00011 
00012         CPPUNIT_ASSERT_DOUBLES_EQUAL( 1, box1.min(0), 0.1 );
00013         CPPUNIT_ASSERT_DOUBLES_EQUAL( 2, box1.max(0), 0.1 );
00014         CPPUNIT_ASSERT_DOUBLES_EQUAL( 3, box1.min(1), 0.1 );
00015         CPPUNIT_ASSERT_DOUBLES_EQUAL( 4, box1.max(1), 0.1 );
00016         CPPUNIT_ASSERT_DOUBLES_EQUAL( 5, box1.min(2), 0.1 );
00017         CPPUNIT_ASSERT_DOUBLES_EQUAL( 6, box1.max(2), 0.1 );
00018 
00019         IndexBox box2( box1 );
00020 
00021         CPPUNIT_ASSERT_DOUBLES_EQUAL( 1, box2.min(0), 0.1 );
00022         CPPUNIT_ASSERT_DOUBLES_EQUAL( 2, box2.max(0), 0.1 );
00023         CPPUNIT_ASSERT_DOUBLES_EQUAL( 3, box2.min(1), 0.1 );
00024         CPPUNIT_ASSERT_DOUBLES_EQUAL( 4, box2.max(1), 0.1 );
00025         CPPUNIT_ASSERT_DOUBLES_EQUAL( 5, box2.min(2), 0.1 );
00026         CPPUNIT_ASSERT_DOUBLES_EQUAL( 6, box2.max(2), 0.1 );
00027 
00028         DataIndexBox box3( box1, 44 );
00029         CPPUNIT_ASSERT_EQUAL( 44, box3.data.dat );
00030 
00031         DataIndexBox box4( box1, &box1 );
00032         CPPUNIT_ASSERT( &box1 == box4.data.ptr );
00033     }
00034 
00035 
00036 
00037     CPPUNIT_TEST_SUITE( box_test );
00038     CPPUNIT_TEST( basic );
00039     CPPUNIT_TEST_SUITE_END();
00040 };
00041 
00042 
00043 CPPUNIT_TEST_SUITE_REGISTRATION( box_test );

Generated on Fri Oct 26 23:38:07 2001 for bicobj-intersection by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001