diff options
author | Justin Clark-Casey (justincc) | 2012-02-08 21:58:59 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-02-08 22:19:34 +0000 |
commit | dfa19e23f03643762a10677203c088161a99557e (patch) | |
tree | ced1397f035e87f3b922a41892d41c7f30595e84 /OpenSim/Region/Framework/Scenes/Tests | |
parent | Make WebStats logging report consistently as WEB STATS MODULE instead of VC, ... (diff) | |
download | opensim-SC_OLD-dfa19e23f03643762a10677203c088161a99557e.zip opensim-SC_OLD-dfa19e23f03643762a10677203c088161a99557e.tar.gz opensim-SC_OLD-dfa19e23f03643762a10677203c088161a99557e.tar.bz2 opensim-SC_OLD-dfa19e23f03643762a10677203c088161a99557e.tar.xz |
Stop a scene object from attempting to link with itself (which results in an exception and constant complaints in v3 viewers).
Aims to address http://opensimulator.org/mantis/view.php?id=5878
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index a2332bb..be5b4a8 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -39,14 +39,31 @@ using log4net; | |||
39 | 39 | ||
40 | namespace OpenSim.Region.Framework.Scenes.Tests | 40 | namespace OpenSim.Region.Framework.Scenes.Tests |
41 | { | 41 | { |
42 | /// <summary> | ||
43 | /// Linking tests | ||
44 | /// </summary> | ||
45 | [TestFixture] | 42 | [TestFixture] |
46 | public class SceneObjectLinkingTests | 43 | public class SceneObjectLinkingTests |
47 | { | 44 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 46 | ||
47 | /// <summary> | ||
48 | /// Links to self should be ignored. | ||
49 | /// </summary> | ||
50 | [Test] | ||
51 | public void TestLinkToSelf() | ||
52 | { | ||
53 | TestHelpers.InMethod(); | ||
54 | |||
55 | UUID ownerId = TestHelpers.ParseTail(0x1); | ||
56 | int nParts = 3; | ||
57 | |||
58 | TestScene scene = SceneHelpers.SetupScene(); | ||
59 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(nParts, ownerId, "TestLinkToSelf_", 0x10); | ||
60 | scene.AddSceneObject(sog1); | ||
61 | scene.LinkObjects(ownerId, sog1.LocalId, new List<uint>() { sog1.Parts[1].LocalId }); | ||
62 | // sog1.LinkToGroup(sog1); | ||
63 | |||
64 | Assert.That(sog1.Parts.Length, Is.EqualTo(nParts)); | ||
65 | } | ||
66 | |||
50 | [Test] | 67 | [Test] |
51 | public void TestLinkDelink2SceneObjects() | 68 | public void TestLinkDelink2SceneObjects() |
52 | { | 69 | { |