Thread: [Opal-commits] opal/src Makefile.am,1.11,1.12 Makefile.in,1.11,1.12 testJoint.cpp,1.2,1.3 testopal.c
Status: Inactive
Brought to you by:
tylerstreeter
|
From: Olex <ole...@us...> - 2005-12-15 05:09:14
|
Update of /cvsroot/opal/opal/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13249/src Modified Files: Makefile.am Makefile.in testJoint.cpp testopal.cpp Log Message: Added unit tests for VolumeSensor and Joint. Found a bug with CCylinder+VolumeSensor+MeshSolid. Extra asserts in ODESimulator. Index: Makefile.in =================================================================== RCS file: /cvsroot/opal/opal/src/Makefile.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.in 10 Dec 2005 22:41:06 -0000 1.11 --- Makefile.in 15 Dec 2005 05:08:59 -0000 1.12 *************** *** 74,78 **** testMatrix44r.$(OBJEXT) testBlueprint.$(OBJEXT) \ testMath.$(OBJEXT) testVelocityMotor.$(OBJEXT) \ ! testFixedJoint.$(OBJEXT) testJoint.$(OBJEXT) test_opal_OBJECTS = $(am_test_opal_OBJECTS) test_opal_DEPENDENCIES = \ --- 74,79 ---- testMatrix44r.$(OBJEXT) testBlueprint.$(OBJEXT) \ testMath.$(OBJEXT) testVelocityMotor.$(OBJEXT) \ ! testFixedJoint.$(OBJEXT) testJoint.$(OBJEXT) \ ! testVolumeSensor.$(OBJEXT) test_opal_OBJECTS = $(am_test_opal_OBJECTS) test_opal_DEPENDENCIES = \ *************** *** 216,222 **** test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp \ ! testRaycastSensor.cpp testSimulator.cpp testVec3r.cpp testPoint3r.cpp testQuaternion.cpp \ ! testMatrix44r.cpp testBlueprint.cpp testMath.cpp testVelocityMotor.cpp testFixedJoint.cpp \ ! testJoint.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ --- 217,223 ---- test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp \ ! testRaycastSensor.cpp testSimulator.cpp testVec3r.cpp testPoint3r.cpp testQuaternion.cpp \ ! testMatrix44r.cpp testBlueprint.cpp testMath.cpp testVelocityMotor.cpp testFixedJoint.cpp \ ! testJoint.cpp testVolumeSensor.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ *************** *** 338,341 **** --- 339,343 ---- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testVec3r.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testVelocityMotor.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testVolumeSensor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testopal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testsolid.Po@am__quote@ Index: Makefile.am =================================================================== RCS file: /cvsroot/opal/opal/src/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.am 10 Dec 2005 22:41:06 -0000 1.11 --- Makefile.am 15 Dec 2005 05:08:59 -0000 1.12 *************** *** 15,21 **** bin_PROGRAMS = test_opal test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp \ ! testRaycastSensor.cpp testSimulator.cpp testVec3r.cpp testPoint3r.cpp testQuaternion.cpp \ ! testMatrix44r.cpp testBlueprint.cpp testMath.cpp testVelocityMotor.cpp testFixedJoint.cpp \ ! testJoint.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode --- 15,21 ---- bin_PROGRAMS = test_opal test_opal_SOURCES = testopal.cpp testsolid.cpp testAccelerationSensor.cpp \ ! testRaycastSensor.cpp testSimulator.cpp testVec3r.cpp testPoint3r.cpp testQuaternion.cpp \ ! testMatrix44r.cpp testBlueprint.cpp testMath.cpp testVelocityMotor.cpp testFixedJoint.cpp \ ! testJoint.cpp testVolumeSensor.cpp test_opal_LDADD = $(top_builddir)/src/external/tinyxml/libtinyxml.a \ $(top_builddir)/src/ODE/libodeimpl.a $(top_builddir)/src/libopalode.a -lode Index: testJoint.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/testJoint.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testJoint.cpp 12 Dec 2005 00:35:13 -0000 1.2 --- testJoint.cpp 15 Dec 2005 05:08:59 -0000 1.3 *************** *** 38,57 **** namespace testJoint { ! QT_TEST( setContacts ) ! { ! Simulator * sim = createSimulator(); Joint * j = sim->createJoint(); JointData data; ! data.contactsEnabled = false; j->init( data ); ! QT_CHECK_EQUAL( j->areContactsEnabled(), false ); ! data.contactsEnabled = true; ! j->init( data ); ! QT_CHECK_EQUAL( j->areContactsEnabled(), true ); sim->destroy(); ! } QT_TEST( break_settings ) --- 38,141 ---- namespace testJoint { ! class TwoSpheresFixture ! { ! public: ! TwoSpheresFixture() ! { ! sim = createSimulator(); ! sim->createSolid(); ! s0 = sim->createSolid(); ! s1 = sim->createSolid(); ! { ! SphereShapeData data; ! data.radius = 1; ! s0->addShape( data ); ! s1->addShape( data ); ! } ! ! s0->setPosition( 0, 0, 0 ); ! s1->setPosition( 0, 0, 10 ); ! ! j = sim->createJoint(); ! { ! JointData data; ! data.setType( FIXED_JOINT ); ! data.solid0 = s0; ! data.solid1 = s1; ! j->init( data ); ! } ! } ! ! ~TwoSpheresFixture() ! { ! sim->destroyJoint( j ); ! sim->destroySolid( s0 ); ! sim->destroySolid( s1 ); ! sim->destroy(); ! } ! ! Simulator * sim; ! Solid * s0; ! Solid * s1; ! Joint * j; ! }; ! ! QT_TEST( wakeSolids ) ! { ! TwoSpheresFixture f; ! ! f.s0->setStatic( false ); ! f.s1->setStatic( false ); ! f.s0->setSleeping( true ); ! f.s1->setSleeping( true ); ! ! f.j->wakeSolids(); ! QT_CHECK_EQUAL( f.s0->isSleeping(), false ); ! QT_CHECK_EQUAL( f.s1->isSleeping(), false ); ! ! f.s0->setStatic( true ); ! f.s1->setStatic( false ); ! f.s0->setSleeping( true ); ! f.s1->setSleeping( true ); ! ! f.j->wakeSolids(); ! QT_CHECK_EQUAL( f.s0->isSleeping(), true ); ! QT_CHECK_EQUAL( f.s1->isSleeping(), false ); ! ! f.s0->setStatic( false ); ! f.s1->setStatic( true ); ! f.s0->setSleeping( true ); ! f.s1->setSleeping( true ); ! ! f.j->wakeSolids(); ! QT_CHECK_EQUAL( f.s0->isSleeping(), false ); ! QT_CHECK_EQUAL( f.s1->isSleeping(), true ); ! ! f.s0->setStatic( true ); ! f.s1->setStatic( true ); ! f.s0->setSleeping( true ); ! f.s1->setSleeping( true ); ! ! f.j->wakeSolids(); ! QT_CHECK_EQUAL( f.s0->isSleeping(), true ); ! QT_CHECK_EQUAL( f.s1->isSleeping(), true ); ! } ! ! QT_TEST( setContacts ) ! { ! Simulator * sim = createSimulator(); Joint * j = sim->createJoint(); JointData data; ! data.contactsEnabled = false; j->init( data ); ! QT_CHECK_EQUAL( j->areContactsEnabled(), false ); ! data.contactsEnabled = true; ! j->init( data ); ! QT_CHECK_EQUAL( j->areContactsEnabled(), true ); sim->destroy(); ! } QT_TEST( break_settings ) *************** *** 70,74 **** { Simulator * sim = createSimulator(); ! Solid * s0 = sim->createSolid(); s0->setPosition( 0, 0, 0 ); --- 154,158 ---- { Simulator * sim = createSimulator(); ! Solid * s0 = sim->createSolid(); s0->setPosition( 0, 0, 0 ); Index: testopal.cpp =================================================================== RCS file: /cvsroot/opal/opal/src/testopal.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testopal.cpp 12 Dec 2005 00:35:13 -0000 1.2 --- testopal.cpp 15 Dec 2005 05:08:59 -0000 1.3 *************** *** 37,44 **** { QT_RUN_TESTS; - - cout << "Type any letter and then Enter to quit." << endl; - - string temp; - cin >> temp; } --- 37,39 ---- |