diff options
author | Justin Clark-Casey (justincc) | 2011-11-07 22:53:52 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-11-07 22:53:52 +0000 |
commit | 39b967e21494f839bbee63a2b3835f5ee7a4e536 (patch) | |
tree | cd120bda9da7e73d23ea389b260457154d7e1b8f /OpenSim/Region/OptionalModules | |
parent | That such a trivial change can be so difficult to get right. Fix it this time. (diff) | |
download | opensim-SC-39b967e21494f839bbee63a2b3835f5ee7a4e536.zip opensim-SC-39b967e21494f839bbee63a2b3835f5ee7a4e536.tar.gz opensim-SC-39b967e21494f839bbee63a2b3835f5ee7a4e536.tar.bz2 opensim-SC-39b967e21494f839bbee63a2b3835f5ee7a4e536.tar.xz |
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
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 6305d27..dce0ec8 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | |||
@@ -285,9 +285,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
285 | 285 | ||
286 | // FIXME: This is different for live avatars - z position is adjusted. This is half the height of the | 286 | // FIXME: This is different for live avatars - z position is adjusted. This is half the height of the |
287 | // default avatar. | 287 | // default avatar. |
288 | // Curiously, Vector3.ToString() will not display the last two places of the float. For example, | ||
289 | // printing out npc.AbsolutePosition will give <0, 0, 0.8454993> not <0, 0, 0.845499337> | ||
288 | Assert.That( | 290 | Assert.That( |
289 | npc.AbsolutePosition, | 291 | npc.AbsolutePosition, |
290 | Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.8454993f))); | 292 | Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.845499337f))); |
291 | 293 | ||
292 | npcModule.Stand(npc.UUID, scene); | 294 | npcModule.Stand(npc.UUID, scene); |
293 | 295 | ||