--- trunk/test/math/VectorTestCase.cpp 2004/10/19 21:28:55 110 +++ trunk/test/math/VectorTestCase.cpp 2004/10/25 22:46:19 151 @@ -194,6 +194,15 @@ void VectorTestCase::testAccessEntries(){ //test () operator CPPUNIT_ASSERT_DOUBLES_EQUAL(v3(0) , 4.0, oopse::epsilon); + Vec4 a1; + double *pa1 = a1.getArrayPointer(); + + pa1[0] = 4.0; + pa1[1] = 1.0; + pa1[2] = 3.0; + pa1[3] = 2.0; + + CPPUNIT_ASSERT(a1 == v3); } void VectorTestCase::testOtherMemberFunctions(){ @@ -218,8 +227,14 @@ void VectorTestCase::testOtherMemberFunctions(){ //test isNormalized(); CPPUNIT_ASSERT(a1.isNormalized()); CPPUNIT_ASSERT(!one.isNormalized()); - + //test getArray + double tempV[4]; + v3.getArray(tempV); + CPPUNIT_ASSERT_DOUBLES_EQUAL(tempV[0], v3[0], oopse::epsilon); + CPPUNIT_ASSERT_DOUBLES_EQUAL(tempV[1], v3[1], oopse::epsilon); + CPPUNIT_ASSERT_DOUBLES_EQUAL(tempV[2], v3[2], oopse::epsilon); + CPPUNIT_ASSERT_DOUBLES_EQUAL(tempV[3], v3[3], oopse::epsilon); } void VectorTestCase::testOtherTemplateFunctions(){ //test dot