aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Tests
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-04-03 01:14:39 +0100
committerJustin Clark-Casey (justincc)2014-04-03 01:14:39 +0100
commit6ac9c9c97277e510cbe7eb908f3cf7883a01c1c3 (patch)
treeaf88d18d76d7212252f8c8215dd42e3e0d2b025e /OpenSim/Region/Framework/Scenes/Tests
parentminor: Fix warning in AvatarFactoryModule (diff)
downloadopensim-SC_OLD-6ac9c9c97277e510cbe7eb908f3cf7883a01c1c3.zip
opensim-SC_OLD-6ac9c9c97277e510cbe7eb908f3cf7883a01c1c3.tar.gz
opensim-SC_OLD-6ac9c9c97277e510cbe7eb908f3cf7883a01c1c3.tar.bz2
opensim-SC_OLD-6ac9c9c97277e510cbe7eb908f3cf7883a01c1c3.tar.xz
refactor: Use m_sittingAvatars to maintain the list of sitting avatars instead of two independent structures that do exactly the same thing
m_sittingAvatars code also already properly handles locking to avoid races.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs8
2 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
index d65b0b6..969f73d 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
@@ -172,7 +172,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
172 so1PostCross = sceneB.GetSceneObjectGroup(so1Id); 172 so1PostCross = sceneB.GetSceneObjectGroup(so1Id);
173 Assert.NotNull(so1PostCross); 173 Assert.NotNull(so1PostCross);
174 Assert.AreEqual(1, so1PostCross.GetSittingAvatarsCount()); 174 Assert.AreEqual(1, so1PostCross.GetSittingAvatarsCount());
175 Assert.AreEqual(1, so1PostCross.GetLinkedAvatars().Count);
176 } 175 }
177 176
178 Vector3 so1PostCrossPos = so1PostCross.AbsolutePosition; 177 Vector3 so1PostCrossPos = so1PostCross.AbsolutePosition;
@@ -198,7 +197,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
198 SceneObjectGroup so1PostReCross = sceneA.GetSceneObjectGroup(so1Id); 197 SceneObjectGroup so1PostReCross = sceneA.GetSceneObjectGroup(so1Id);
199 Assert.NotNull(so1PostReCross); 198 Assert.NotNull(so1PostReCross);
200 Assert.AreEqual(1, so1PostReCross.GetSittingAvatarsCount()); 199 Assert.AreEqual(1, so1PostReCross.GetSittingAvatarsCount());
201 Assert.AreEqual(1, so1PostReCross.GetLinkedAvatars().Count);
202 } 200 }
203 } 201 }
204 202
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
index 0911f00..dcdec5c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
@@ -93,9 +93,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
93 93
94 Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero)); 94 Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero));
95 Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1)); 95 Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1));
96 HashSet<UUID> sittingAvatars = part.GetSittingAvatars(); 96 HashSet<ScenePresence> sittingAvatars = part.GetSittingAvatars();
97 Assert.That(sittingAvatars.Count, Is.EqualTo(1)); 97 Assert.That(sittingAvatars.Count, Is.EqualTo(1));
98 Assert.That(sittingAvatars.Contains(m_sp.UUID)); 98 Assert.That(sittingAvatars.Contains(m_sp));
99 Assert.That(m_sp.ParentID, Is.EqualTo(part.LocalId)); 99 Assert.That(m_sp.ParentID, Is.EqualTo(part.LocalId));
100 } 100 }
101 101
@@ -151,9 +151,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
151 Assert.That(m_sp.PhysicsActor, Is.Null); 151 Assert.That(m_sp.PhysicsActor, Is.Null);
152 152
153 Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1)); 153 Assert.That(part.GetSittingAvatarsCount(), Is.EqualTo(1));
154 HashSet<UUID> sittingAvatars = part.GetSittingAvatars(); 154 HashSet<ScenePresence> sittingAvatars = part.GetSittingAvatars();
155 Assert.That(sittingAvatars.Count, Is.EqualTo(1)); 155 Assert.That(sittingAvatars.Count, Is.EqualTo(1));
156 Assert.That(sittingAvatars.Contains(m_sp.UUID)); 156 Assert.That(sittingAvatars.Contains(m_sp));
157 157
158 m_sp.StandUp(); 158 m_sp.StandUp();
159 159