From 134f86e8d5c414409631b25b8c6f0ee45fbd8631 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 3 Nov 2016 21:44:39 +1000 Subject: Initial update to OpenSim 0.8.2.1 source code. --- OpenSim/Framework/Tests/AnimationTests.cs | 1 - OpenSim/Framework/Tests/AssetBaseTest.cs | 4 - OpenSim/Framework/Tests/LocationTest.cs | 21 +++-- OpenSim/Framework/Tests/MundaneFrameworkTests.cs | 2 +- OpenSim/Framework/Tests/UtilTest.cs | 101 +++++++++++++++++++---- 5 files changed, 102 insertions(+), 27 deletions(-) (limited to 'OpenSim/Framework/Tests') diff --git a/OpenSim/Framework/Tests/AnimationTests.cs b/OpenSim/Framework/Tests/AnimationTests.cs index f3be81b..d8f17d0 100644 --- a/OpenSim/Framework/Tests/AnimationTests.cs +++ b/OpenSim/Framework/Tests/AnimationTests.cs @@ -32,7 +32,6 @@ using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenSim.Framework; using OpenSim.Tests.Common; -using OpenSim.Tests.Common.Mock; using Animation = OpenSim.Framework.Animation; namespace OpenSim.Framework.Tests diff --git a/OpenSim/Framework/Tests/AssetBaseTest.cs b/OpenSim/Framework/Tests/AssetBaseTest.cs index 25d2393..1975a4d 100644 --- a/OpenSim/Framework/Tests/AssetBaseTest.cs +++ b/OpenSim/Framework/Tests/AssetBaseTest.cs @@ -50,19 +50,15 @@ namespace OpenSim.Framework.Tests CheckContainsReferences(AssetType.ImageJPEG , false); CheckContainsReferences(AssetType.ImageTGA , false); CheckContainsReferences(AssetType.Landmark , false); - CheckContainsReferences(AssetType.LostAndFoundFolder, false); CheckContainsReferences(AssetType.LSLBytecode, false); CheckContainsReferences(AssetType.LSLText, false); CheckContainsReferences(AssetType.Notecard, false); CheckContainsReferences(AssetType.Object, false); - CheckContainsReferences(AssetType.RootFolder, false); CheckContainsReferences(AssetType.Simstate, false); - CheckContainsReferences(AssetType.SnapshotFolder, false); CheckContainsReferences(AssetType.Sound, false); CheckContainsReferences(AssetType.SoundWAV, false); CheckContainsReferences(AssetType.Texture, false); CheckContainsReferences(AssetType.TextureTGA, false); - CheckContainsReferences(AssetType.TrashFolder, false); CheckContainsReferences(AssetType.Unknown, false); } diff --git a/OpenSim/Framework/Tests/LocationTest.cs b/OpenSim/Framework/Tests/LocationTest.cs index a56ecb4..3d5d1d2 100644 --- a/OpenSim/Framework/Tests/LocationTest.cs +++ b/OpenSim/Framework/Tests/LocationTest.cs @@ -51,21 +51,28 @@ namespace OpenSim.Framework.Tests [Test] public void locationXYRegionHandle() { - Location TestLocation1 = new Location(256000,256000); - Location TestLocation2 = new Location(1099511628032000); + Location TestLocation1 = new Location(255000,256000); + Location TestLocation2 = new Location(1095216660736000); Assert.That(TestLocation1 == TestLocation2); - Assert.That(TestLocation2.X == 256000 && TestLocation2.Y == 256000, "Test xy location doesn't match regionhandle provided"); + Assert.That(TestLocation1.X == 255000 && TestLocation1.Y == 256000, "Test xy location doesn't match position in the constructor"); + Assert.That(TestLocation2.X == 255000 && TestLocation2.Y == 256000, "Test xy location doesn't match regionhandle provided"); - Assert.That(TestLocation2.RegionHandle == 1099511628032000, + Assert.That(TestLocation2.RegionHandle == 1095216660736000, "Location RegionHandle Property didn't match regionhandle provided in constructor"); + ulong RegionHandle = TestLocation1.RegionHandle; + Assert.That(RegionHandle.Equals(1095216660736000), "Equals(regionhandle) failed to match the position in the constructor"); - TestLocation1 = new Location(256001, 256001); - TestLocation2 = new Location(1099511628032000); + TestLocation2 = new Location(RegionHandle); + Assert.That(TestLocation2.Equals(255000, 256000), "Decoded regionhandle failed to match the original position in the constructor"); + + + TestLocation1 = new Location(255001, 256001); + TestLocation2 = new Location(1095216660736000); Assert.That(TestLocation1 != TestLocation2); - Assert.That(TestLocation1.Equals(256001, 256001), "Equals(x,y) failed to match the position in the constructor"); + Assert.That(TestLocation1.Equals(255001, 256001), "Equals(x,y) failed to match the position in the constructor"); Assert.That(TestLocation2.GetHashCode() == (TestLocation2.X.GetHashCode() ^ TestLocation2.Y.GetHashCode()), "GetHashCode failed to produce the expected hashcode"); diff --git a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs index 1dc8053..3f0a031 100644 --- a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs +++ b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs @@ -100,7 +100,7 @@ namespace OpenSim.Framework.Tests cadu.AVHeight = Size1.Z; AgentPosition position2 = new AgentPosition(); - position2.CopyFrom(cadu); + position2.CopyFrom(cadu, position1.SessionID); Assert.IsTrue( position2.AgentID == position1.AgentID diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs index 11ca068..cfe3139 100644 --- a/OpenSim/Framework/Tests/UtilTest.cs +++ b/OpenSim/Framework/Tests/UtilTest.cs @@ -173,8 +173,8 @@ namespace OpenSim.Framework.Tests [Test] public void SLUtilTypeConvertTests() { - int[] assettypes = new int[]{-1,0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 - ,23,24,25,46,47,48}; + int[] assettypes = new int[]{-1,0,1,2,3,5,6,7,8,10,11,12,13,17,18,19,20,21,22 + ,24,25}; string[] contenttypes = new string[] { "application/octet-stream", @@ -186,26 +186,18 @@ namespace OpenSim.Framework.Tests "application/vnd.ll.primitive", "application/vnd.ll.notecard", "application/vnd.ll.folder", - "application/vnd.ll.rootfolder", "application/vnd.ll.lsltext", "application/vnd.ll.lslbyte", "image/tga", "application/vnd.ll.bodypart", - "application/vnd.ll.trashfolder", - "application/vnd.ll.snapshotfolder", - "application/vnd.ll.lostandfoundfolder", "audio/x-wav", "image/tga", "image/jpeg", "application/vnd.ll.animation", "application/vnd.ll.gesture", "application/x-metaverse-simstate", - "application/vnd.ll.favoritefolder", "application/vnd.ll.link", "application/vnd.ll.linkfolder", - "application/vnd.ll.currentoutfitfolder", - "application/vnd.ll.outfitfolder", - "application/vnd.ll.myoutfitsfolder" }; for (int i=0;i