diff options
author | Justin Clark-Casey (justincc) | 2010-09-21 01:04:08 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-09-21 01:04:08 +0100 |
commit | 51207c24a03b2f5741a886b1d5daaac8d2231c93 (patch) | |
tree | 360c993fafd29a32cc132e8c62d390ccdab9e01e /OpenSim/Framework/Tests/LocationTest.cs | |
parent | Improve the explanative text of migration failures (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-51207c24a03b2f5741a886b1d5daaac8d2231c93.zip opensim-SC_OLD-51207c24a03b2f5741a886b1d5daaac8d2231c93.tar.gz opensim-SC_OLD-51207c24a03b2f5741a886b1d5daaac8d2231c93.tar.bz2 opensim-SC_OLD-51207c24a03b2f5741a886b1d5daaac8d2231c93.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Tests/LocationTest.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Framework/Tests/LocationTest.cs b/OpenSim/Framework/Tests/LocationTest.cs index 237568f..2707afa 100644 --- a/OpenSim/Framework/Tests/LocationTest.cs +++ b/OpenSim/Framework/Tests/LocationTest.cs | |||
@@ -54,9 +54,28 @@ namespace OpenSim.Framework.Tests | |||
54 | Location TestLocation2 = new Location(1099511628032000); | 54 | Location TestLocation2 = new Location(1099511628032000); |
55 | Assert.That(TestLocation1 == TestLocation2); | 55 | Assert.That(TestLocation1 == TestLocation2); |
56 | 56 | ||
57 | Assert.That(TestLocation2.X == 256000 && TestLocation2.Y == 256000, "Test xy location doesn't match regionhandle provided"); | ||
58 | |||
59 | Assert.That(TestLocation2.RegionHandle == 1099511628032000, | ||
60 | "Location RegionHandle Property didn't match regionhandle provided in constructor"); | ||
61 | |||
62 | |||
57 | TestLocation1 = new Location(256001, 256001); | 63 | TestLocation1 = new Location(256001, 256001); |
58 | TestLocation2 = new Location(1099511628032000); | 64 | TestLocation2 = new Location(1099511628032000); |
59 | Assert.That(TestLocation1 != TestLocation2); | 65 | Assert.That(TestLocation1 != TestLocation2); |
66 | |||
67 | Assert.That(TestLocation1.Equals(256001, 256001), "Equals(x,y) failed to match the position in the constructor"); | ||
68 | |||
69 | Assert.That(TestLocation2.GetHashCode() == (TestLocation2.X.GetHashCode() ^ TestLocation2.Y.GetHashCode()), "GetHashCode failed to produce the expected hashcode"); | ||
70 | |||
71 | Location TestLocation3; | ||
72 | object cln = TestLocation2.Clone(); | ||
73 | TestLocation3 = (Location) cln; | ||
74 | Assert.That(TestLocation3.X == TestLocation2.X && TestLocation3.Y == TestLocation2.Y, | ||
75 | "Cloned Location values do not match"); | ||
76 | |||
77 | Assert.That(TestLocation2.Equals(cln), "Cloned object failed .Equals(obj) Test"); | ||
78 | |||
60 | } | 79 | } |
61 | 80 | ||
62 | } | 81 | } |