Coverage Summary for Class: ChangeOfBasisTest (net.crystallography.vector.space)

Class Class, % Method, % Line, %
ChangeOfBasisTest 100% (1/ 1) 100% (3/ 3) 100% (17/ 17)


1 package net.crystallography.vector.space; 2  3 import org.junit.Assert; 4  5 import javax.vecmath.Matrix3d; 6 import javax.vecmath.Vector3d; 7  8 import static net.crystallography.vector.space.ChangeOfBasis.changeOfBaseMatrix; 9 import static org.junit.Assert.*; 10  11 public class ChangeOfBasisTest { 12  13  @org.junit.Test 14  public void changeOfBaseMatrixTest() throws Exception { 15  Vector3d a = new Vector3d(1,2,3); 16  Vector3d b = new Vector3d(1.5,2.0,3.5); 17  Vector3d c = new Vector3d(4,2,1); 18  Matrix3d m = changeOfBaseMatrix(a,b,c); 19  Assert.assertEquals(1,m.m00,1E-10); 20  Assert.assertEquals(2,m.m10,1E-10); 21  Assert.assertEquals(3,m.m20,1E-10); 22  23  Assert.assertEquals(1.5,m.m01,1E-10); 24  Assert.assertEquals(2.0,m.m11,1E-10); 25  Assert.assertEquals(3.5,m.m21,1E-10); 26  27  Assert.assertEquals(4.0,m.m02,1E-10); 28  Assert.assertEquals(2.0,m.m12,1E-10); 29  Assert.assertEquals(1.0,m.m22,1E-10); 30  } 31  32  @org.junit.Test 33  public void mpMultiplyTest() throws Exception { 34  Assert.assertEquals(1,1); 35  } 36  37 }