git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@119 92aac97c-a6ce-11dd-a772-7fcde58d38e6

This commit is contained in:
chappuis.daniel 2009-04-04 11:46:44 +00:00
parent ed9d8087ea
commit 58a7689404

View File

@ -50,6 +50,7 @@ class QuaternionTest : public TestSuite::Test {
testGetUnit(); testGetUnit();
testGetConjugate(); testGetConjugate();
testGetInverse(); testGetInverse();
testScalarProduct();
testOperatorAddition(); testOperatorAddition();
testOperatorSubstraction(); testOperatorSubstraction();
testOperatorMultiplicationWithConstant(); testOperatorMultiplicationWithConstant();
@ -263,6 +264,12 @@ class QuaternionTest : public TestSuite::Test {
} }
} }
// Test the scalarProduct() method
void testScalarProduct() {
double result = quaternion1.scalarProduct(quaternion2);
test_(result == 110.0);
}
// Test operator+() // Test operator+()
void testOperatorAddition() { void testOperatorAddition() {
Quaternion result = quaternion1 + quaternion2; Quaternion result = quaternion1 + quaternion2;