diff options
author | Charles Krinke | 2008-10-06 00:58:43 +0000 |
---|---|---|
committer | Charles Krinke | 2008-10-06 00:58:43 +0000 |
commit | e575ef7ad2245aad17f57273f6bd7b774f99f057 (patch) | |
tree | a85fd727bac7f3d39259df3aaea6c93f3f32ba05 /OpenSim/Region/Environment/Modules/World/Terrain/Tests | |
parent | Mantis#2336. Thank you kindly, Ralphos for a patch that: (diff) | |
download | opensim-SC-e575ef7ad2245aad17f57273f6bd7b774f99f057.zip opensim-SC-e575ef7ad2245aad17f57273f6bd7b774f99f057.tar.gz opensim-SC-e575ef7ad2245aad17f57273f6bd7b774f99f057.tar.bz2 opensim-SC-e575ef7ad2245aad17f57273f6bd7b774f99f057.tar.xz |
Revert r6697 patch as the build fails.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/Tests')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs b/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs index 71ea07d..eaa674e 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs | |||
@@ -37,30 +37,19 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.Tests | |||
37 | [Test] | 37 | [Test] |
38 | public void BrushTest() | 38 | public void BrushTest() |
39 | { | 39 | { |
40 | TerrainChannel map = new TerrainChannel(256, 256); | 40 | TerrainChannel x = new TerrainChannel(256, 256); |
41 | bool[,] allowMask = new bool[map.Width,map.Height]; | ||
42 | int x; | ||
43 | int y; | ||
44 | for (x=0; x<map.Width; x++) | ||
45 | { | ||
46 | for (y=0; y<map.Height; y++) | ||
47 | { | ||
48 | allowMask[x,y] = true; | ||
49 | } | ||
50 | } | ||
51 | |||
52 | ITerrainPaintableEffect effect = new RaiseSphere(); | 41 | ITerrainPaintableEffect effect = new RaiseSphere(); |
53 | 42 | ||
54 | effect.PaintEffect(map, allowMask, 128.0, 128.0, 23.0, 50, 0.1); | 43 | effect.PaintEffect(x, 128.0, 128.0, 100, 0.1); |
55 | Assert.That(map[128, 128] > 0.0, "Raise brush not raising values."); | 44 | Assert.That(x[128, 128] > 0.0, "Raise brush not raising values."); |
56 | Assert.That(map[0, 128] > 0.0, "Raise brush lowering edge values."); | 45 | Assert.That(x[0, 128] > 0.0, "Raise brush lowering edge values."); |
57 | 46 | ||
58 | map = new TerrainChannel(256, 256); | 47 | x = new TerrainChannel(256, 256); |
59 | effect = new LowerSphere(); | 48 | effect = new LowerSphere(); |
60 | 49 | ||
61 | effect.PaintEffect(map, allowMask, 128.0, 128.0, -1, 50, 0.1); | 50 | effect.PaintEffect(x, 128.0, 128.0, 100, 0.1); |
62 | Assert.That(map[128, 128] < 0.0, "Lower not lowering values."); | 51 | Assert.That(x[128, 128] < 0.0, "Lower not lowering values."); |
63 | Assert.That(map[0, 128] < 0.0, "Lower brush affecting edge values."); | 52 | Assert.That(x[0, 128] < 0.0, "Lower brush affecting edge values."); |
64 | } | 53 | } |
65 | 54 | ||
66 | [Test] | 55 | [Test] |