Correct test failure in sit position check of TestSitAndStandWithNoTarget()

Curiously, a Vector3.ToString() will not display the last two places of the float.  In this case, the failure of
the assertion would confusingly report Expected: <0, 0, 0.8454993> But was:  <0, 0, 0.8454993> when actual Z figure is 0.845499337
Should fully address http://opensimulator.org/mantis/view.php?id=5779
remove-scene-viewer
Justin Clark-Casey (justincc) 2011-11-07 22:53:52 +00:00
parent 6d92d65140
commit 39b967e214
1 changed files with 3 additions and 1 deletions

View File

@ -285,9 +285,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
// FIXME: This is different for live avatars - z position is adjusted. This is half the height of the
// default avatar.
// Curiously, Vector3.ToString() will not display the last two places of the float. For example,
// printing out npc.AbsolutePosition will give <0, 0, 0.8454993> not <0, 0, 0.845499337>
Assert.That(
npc.AbsolutePosition,
Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.8454993f)));
Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.845499337f)));
npcModule.Stand(npc.UUID, scene);