public void TestInvalidTimeStamp2() { LinearPosePredicter pred = new LinearPosePredicter(); pred.AddPoseData(1, new Pose(new Vector3(1, 1, 1), new Vector3())); pred.AddPoseData(2, new Pose(new Vector3(2, 2, 2), new Vector3())); Assert.Throws <ArgumentException>(() => pred.PredictPoseAt(0)); }
public void TestPredictWithPrevs() { LinearPosePredicter pred = new LinearPosePredicter(); pred.AddPoseData(1, new Pose(new Vector3(1, 1, 1), new Vector3())); pred.AddPoseData(2, new Pose(new Vector3(2, 2, 2), new Vector3())); float[] output = pred.PredictPoseAt(3); float[] expected = new float[] { 1, 1, 1, 0, 0, 0 }; Assert.AreEqual(expected, output); expected = new float[] { 3, 3, 3, 0, 0, 0 }; Assert.AreEqual(expected, pred.PredictPoseAt(5)); }
public void TestInvalidTimeStamp() { LinearPosePredicter pred = new LinearPosePredicter(); Assert.Throws <ArgumentException>(() => pred.AddPoseData(-2, null)); }