diff options
author | Jeff Ames | 2009-02-09 22:49:05 +0000 |
---|---|---|
committer | Jeff Ames | 2009-02-09 22:49:05 +0000 |
commit | a3d14832af644ba228d13d7a62d4796c17911183 (patch) | |
tree | 2076a6a3fc80215ed5efbec49b959a73d71ba592 | |
parent | Moved prim crossing out of OGS1 and into RESTComms and LocalInterregionComms.... (diff) | |
download | opensim-SC-a3d14832af644ba228d13d7a62d4796c17911183.zip opensim-SC-a3d14832af644ba228d13d7a62d4796c17911183.tar.gz opensim-SC-a3d14832af644ba228d13d7a62d4796c17911183.tar.bz2 opensim-SC-a3d14832af644ba228d13d7a62d4796c17911183.tar.xz |
Update svn properties, minor formatting cleanup.
-rw-r--r-- | OpenSim/Data/MySQL/Tests/MySQLEstateTest.cs | 198 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Tests/SQLiteEstateTest.cs | 130 | ||||
-rw-r--r-- | OpenSim/Data/Tests/BasicEstateTest.cs | 308 | ||||
-rw-r--r-- | OpenSim/Framework/Console/ConsoleBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 |
5 files changed, 321 insertions, 321 deletions
diff --git a/OpenSim/Data/MySQL/Tests/MySQLEstateTest.cs b/OpenSim/Data/MySQL/Tests/MySQLEstateTest.cs index 17e71e1..bee3d04 100644 --- a/OpenSim/Data/MySQL/Tests/MySQLEstateTest.cs +++ b/OpenSim/Data/MySQL/Tests/MySQLEstateTest.cs | |||
@@ -1,99 +1,99 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using NUnit.Framework; | 31 | using NUnit.Framework; |
32 | using NUnit.Framework.SyntaxHelpers; | 32 | using NUnit.Framework.SyntaxHelpers; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Data.Tests; | 34 | using OpenSim.Data.Tests; |
35 | using OpenSim.Data.MySQL; | 35 | using OpenSim.Data.MySQL; |
36 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
37 | using OpenMetaverse; | 37 | using OpenMetaverse; |
38 | 38 | ||
39 | namespace OpenSim.Data.MySQL.Tests | 39 | namespace OpenSim.Data.MySQL.Tests |
40 | { | 40 | { |
41 | [TestFixture] | 41 | [TestFixture] |
42 | public class MySQLEstateTest : BasicEstateTest | 42 | public class MySQLEstateTest : BasicEstateTest |
43 | { | 43 | { |
44 | public string file; | 44 | public string file; |
45 | public MySQLManager database; | 45 | public MySQLManager database; |
46 | public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;"; | 46 | public string connect = "Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;Pooling=false;"; |
47 | 47 | ||
48 | [TestFixtureSetUp] | 48 | [TestFixtureSetUp] |
49 | public void Init() | 49 | public void Init() |
50 | { | 50 | { |
51 | SuperInit(); | 51 | SuperInit(); |
52 | // If we manage to connect to the database with the user | 52 | // If we manage to connect to the database with the user |
53 | // and password above it is our test database, and run | 53 | // and password above it is our test database, and run |
54 | // these tests. If anything goes wrong, ignore these | 54 | // these tests. If anything goes wrong, ignore these |
55 | // tests. | 55 | // tests. |
56 | try | 56 | try |
57 | { | 57 | { |
58 | database = new MySQLManager(connect); | 58 | database = new MySQLManager(connect); |
59 | regionDb = new MySQLDataStore(); | 59 | regionDb = new MySQLDataStore(); |
60 | regionDb.Initialise(connect); | 60 | regionDb.Initialise(connect); |
61 | db = new MySQLEstateStore(); | 61 | db = new MySQLEstateStore(); |
62 | db.Initialise(connect); | 62 | db.Initialise(connect); |
63 | } | 63 | } |
64 | catch (Exception e) | 64 | catch (Exception e) |
65 | { | 65 | { |
66 | System.Console.WriteLine("Exception {0}", e); | 66 | System.Console.WriteLine("Exception {0}", e); |
67 | Assert.Ignore(); | 67 | Assert.Ignore(); |
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
71 | [TestFixtureTearDown] | 71 | [TestFixtureTearDown] |
72 | public void Cleanup() | 72 | public void Cleanup() |
73 | { | 73 | { |
74 | if (regionDb != null) | 74 | if (regionDb != null) |
75 | { | 75 | { |
76 | regionDb.Dispose(); | 76 | regionDb.Dispose(); |
77 | } | 77 | } |
78 | // if a new table is added, it has to be dropped here | 78 | // if a new table is added, it has to be dropped here |
79 | if (database != null) | 79 | if (database != null) |
80 | { | 80 | { |
81 | database.ExecuteSql("drop table migrations"); | 81 | database.ExecuteSql("drop table migrations"); |
82 | database.ExecuteSql("drop table prims"); | 82 | database.ExecuteSql("drop table prims"); |
83 | database.ExecuteSql("drop table primshapes"); | 83 | database.ExecuteSql("drop table primshapes"); |
84 | database.ExecuteSql("drop table primitems"); | 84 | database.ExecuteSql("drop table primitems"); |
85 | database.ExecuteSql("drop table terrain"); | 85 | database.ExecuteSql("drop table terrain"); |
86 | database.ExecuteSql("drop table land"); | 86 | database.ExecuteSql("drop table land"); |
87 | database.ExecuteSql("drop table landaccesslist"); | 87 | database.ExecuteSql("drop table landaccesslist"); |
88 | database.ExecuteSql("drop table regionban"); | 88 | database.ExecuteSql("drop table regionban"); |
89 | database.ExecuteSql("drop table regionsettings"); | 89 | database.ExecuteSql("drop table regionsettings"); |
90 | database.ExecuteSql("drop table estate_managers"); | 90 | database.ExecuteSql("drop table estate_managers"); |
91 | database.ExecuteSql("drop table estate_groups"); | 91 | database.ExecuteSql("drop table estate_groups"); |
92 | database.ExecuteSql("drop table estate_users"); | 92 | database.ExecuteSql("drop table estate_users"); |
93 | database.ExecuteSql("drop table estateban"); | 93 | database.ExecuteSql("drop table estateban"); |
94 | database.ExecuteSql("drop table estate_settings"); | 94 | database.ExecuteSql("drop table estate_settings"); |
95 | database.ExecuteSql("drop table estate_map"); | 95 | database.ExecuteSql("drop table estate_map"); |
96 | } | 96 | } |
97 | } | 97 | } |
98 | } | 98 | } |
99 | } | 99 | } |
diff --git a/OpenSim/Data/SQLite/Tests/SQLiteEstateTest.cs b/OpenSim/Data/SQLite/Tests/SQLiteEstateTest.cs index 8f27b65..31efcc3 100644 --- a/OpenSim/Data/SQLite/Tests/SQLiteEstateTest.cs +++ b/OpenSim/Data/SQLite/Tests/SQLiteEstateTest.cs | |||
@@ -1,65 +1,65 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using NUnit.Framework; | 31 | using NUnit.Framework; |
32 | using NUnit.Framework.SyntaxHelpers; | 32 | using NUnit.Framework.SyntaxHelpers; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Data.Tests; | 34 | using OpenSim.Data.Tests; |
35 | using OpenSim.Data.SQLite; | 35 | using OpenSim.Data.SQLite; |
36 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
37 | using OpenMetaverse; | 37 | using OpenMetaverse; |
38 | 38 | ||
39 | namespace OpenSim.Data.SQLite.Tests | 39 | namespace OpenSim.Data.SQLite.Tests |
40 | { | 40 | { |
41 | [TestFixture] | 41 | [TestFixture] |
42 | public class SQLiteEstateTest : BasicEstateTest | 42 | public class SQLiteEstateTest : BasicEstateTest |
43 | { | 43 | { |
44 | public string file = "regiontest.db"; | 44 | public string file = "regiontest.db"; |
45 | public string connect; | 45 | public string connect; |
46 | 46 | ||
47 | [TestFixtureSetUp] | 47 | [TestFixtureSetUp] |
48 | public void Init() | 48 | public void Init() |
49 | { | 49 | { |
50 | SuperInit(); | 50 | SuperInit(); |
51 | file = Path.GetTempFileName() + ".db"; | 51 | file = Path.GetTempFileName() + ".db"; |
52 | connect = "URI=file:" + file + ",version=3"; | 52 | connect = "URI=file:" + file + ",version=3"; |
53 | db = new SQLiteEstateStore(); | 53 | db = new SQLiteEstateStore(); |
54 | db.Initialise(connect); | 54 | db.Initialise(connect); |
55 | regionDb = new SQLiteRegionData(); | 55 | regionDb = new SQLiteRegionData(); |
56 | regionDb.Initialise(connect); | 56 | regionDb.Initialise(connect); |
57 | } | 57 | } |
58 | 58 | ||
59 | [TestFixtureTearDown] | 59 | [TestFixtureTearDown] |
60 | public void Cleanup() | 60 | public void Cleanup() |
61 | { | 61 | { |
62 | regionDb.Dispose(); | 62 | regionDb.Dispose(); |
63 | } | 63 | } |
64 | } | 64 | } |
65 | } | 65 | } |
diff --git a/OpenSim/Data/Tests/BasicEstateTest.cs b/OpenSim/Data/Tests/BasicEstateTest.cs index ef15150..325014b 100644 --- a/OpenSim/Data/Tests/BasicEstateTest.cs +++ b/OpenSim/Data/Tests/BasicEstateTest.cs | |||
@@ -1,154 +1,154 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Drawing; | 30 | using System.Drawing; |
31 | using System.Text; | 31 | using System.Text; |
32 | using NUnit.Framework; | 32 | using NUnit.Framework; |
33 | using NUnit.Framework.SyntaxHelpers; | 33 | using NUnit.Framework.SyntaxHelpers; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Data; | 35 | using OpenSim.Data; |
36 | using OpenMetaverse; | 36 | using OpenMetaverse; |
37 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
38 | 38 | ||
39 | namespace OpenSim.Data.Tests | 39 | namespace OpenSim.Data.Tests |
40 | { | 40 | { |
41 | public class BasicEstateTest | 41 | public class BasicEstateTest |
42 | { | 42 | { |
43 | public IEstateDataStore db; | 43 | public IEstateDataStore db; |
44 | public IRegionDataStore regionDb; | 44 | public IRegionDataStore regionDb; |
45 | public UUID prim1; | 45 | public UUID prim1; |
46 | public static Random random; | 46 | public static Random random; |
47 | 47 | ||
48 | public void SuperInit() | 48 | public void SuperInit() |
49 | { | 49 | { |
50 | try | 50 | try |
51 | { | 51 | { |
52 | log4net.Config.XmlConfigurator.Configure(); | 52 | log4net.Config.XmlConfigurator.Configure(); |
53 | } | 53 | } |
54 | catch (Exception) | 54 | catch (Exception) |
55 | { | 55 | { |
56 | // I don't care, just leave log4net off | 56 | // I don't care, just leave log4net off |
57 | } | 57 | } |
58 | prim1 = UUID.Random(); | 58 | prim1 = UUID.Random(); |
59 | random = new Random(); | 59 | random = new Random(); |
60 | 60 | ||
61 | } | 61 | } |
62 | 62 | ||
63 | [Test] | 63 | [Test] |
64 | public void T010_StoreEstateSettings() | 64 | public void T010_StoreEstateSettings() |
65 | { | 65 | { |
66 | // Initializing field values. Avoid randomness. For checking ranges use different parameter sets | 66 | // Initializing field values. Avoid randomness. For checking ranges use different parameter sets |
67 | // for mix and max values. If you use random values the tests are not _repeatable_. | 67 | // for mix and max values. If you use random values the tests are not _repeatable_. |
68 | string estateName = "test-estate"; | 68 | string estateName = "test-estate"; |
69 | uint parentEstateID = 2; | 69 | uint parentEstateID = 2; |
70 | float billableFactor = 3; | 70 | float billableFactor = 3; |
71 | int priceMeter = 4; | 71 | int priceMeter = 4; |
72 | int redirectGridX = 5; | 72 | int redirectGridX = 5; |
73 | int redirectGridY = 6; | 73 | int redirectGridY = 6; |
74 | bool useGlobalTime = true; | 74 | bool useGlobalTime = true; |
75 | bool fixedSun = true; | 75 | bool fixedSun = true; |
76 | double sunPosition = 7; | 76 | double sunPosition = 7; |
77 | bool allowVoice = true; | 77 | bool allowVoice = true; |
78 | bool allowDirectTeleport = true; | 78 | bool allowDirectTeleport = true; |
79 | bool denyAnonymous = true; | 79 | bool denyAnonymous = true; |
80 | bool denyIdentified = true; | 80 | bool denyIdentified = true; |
81 | bool denyTransacted = true; | 81 | bool denyTransacted = true; |
82 | bool abuseEmailtoEstateOwner = true; | 82 | bool abuseEmailtoEstateOwner = true; |
83 | bool blockDwell = true; | 83 | bool blockDwell = true; |
84 | bool estateskipScripts = true; | 84 | bool estateskipScripts = true; |
85 | bool taxFree = true; | 85 | bool taxFree = true; |
86 | bool publicAccess = true; | 86 | bool publicAccess = true; |
87 | string abuseMail = "test-email@nowhere.com"; | 87 | string abuseMail = "test-email@nowhere.com"; |
88 | UUID estateOwner = new UUID("250d214e-1c7e-4f9b-a488-87c5e53feed7"); | 88 | UUID estateOwner = new UUID("250d214e-1c7e-4f9b-a488-87c5e53feed7"); |
89 | bool denyMinors = (random.NextDouble() > 0.5)? true : false; | 89 | bool denyMinors = (random.NextDouble() > 0.5)? true : false; |
90 | 90 | ||
91 | // Lets choose random region ID | 91 | // Lets choose random region ID |
92 | UUID regionId = new UUID("250d214e-1c7e-4f9b-a488-87c5e53feed7"); | 92 | UUID regionId = new UUID("250d214e-1c7e-4f9b-a488-87c5e53feed7"); |
93 | 93 | ||
94 | // Letting estate store generate rows to database for us | 94 | // Letting estate store generate rows to database for us |
95 | EstateSettings es = db.LoadEstateSettings(regionId); | 95 | EstateSettings es = db.LoadEstateSettings(regionId); |
96 | 96 | ||
97 | // Setting field values to the on demand create settings object. | 97 | // Setting field values to the on demand create settings object. |
98 | es.EstateName = estateName; | 98 | es.EstateName = estateName; |
99 | es.ParentEstateID = parentEstateID; | 99 | es.ParentEstateID = parentEstateID; |
100 | es.BillableFactor = billableFactor; | 100 | es.BillableFactor = billableFactor; |
101 | es.PricePerMeter = priceMeter; | 101 | es.PricePerMeter = priceMeter; |
102 | es.RedirectGridX = redirectGridX; | 102 | es.RedirectGridX = redirectGridX; |
103 | es.RedirectGridY = redirectGridY; | 103 | es.RedirectGridY = redirectGridY; |
104 | es.UseGlobalTime = useGlobalTime; | 104 | es.UseGlobalTime = useGlobalTime; |
105 | es.FixedSun = fixedSun; | 105 | es.FixedSun = fixedSun; |
106 | es.SunPosition = sunPosition; | 106 | es.SunPosition = sunPosition; |
107 | es.AllowVoice = allowVoice; | 107 | es.AllowVoice = allowVoice; |
108 | es.AllowDirectTeleport = allowDirectTeleport; | 108 | es.AllowDirectTeleport = allowDirectTeleport; |
109 | es.DenyAnonymous = denyAnonymous; | 109 | es.DenyAnonymous = denyAnonymous; |
110 | es.DenyIdentified = denyIdentified; | 110 | es.DenyIdentified = denyIdentified; |
111 | es.DenyTransacted = denyTransacted; | 111 | es.DenyTransacted = denyTransacted; |
112 | es.AbuseEmailToEstateOwner = abuseEmailtoEstateOwner; | 112 | es.AbuseEmailToEstateOwner = abuseEmailtoEstateOwner; |
113 | es.BlockDwell = blockDwell; | 113 | es.BlockDwell = blockDwell; |
114 | es.EstateSkipScripts = estateskipScripts; | 114 | es.EstateSkipScripts = estateskipScripts; |
115 | es.TaxFree = taxFree; | 115 | es.TaxFree = taxFree; |
116 | es.PublicAccess = publicAccess; | 116 | es.PublicAccess = publicAccess; |
117 | es.AbuseEmail = abuseMail; | 117 | es.AbuseEmail = abuseMail; |
118 | es.EstateOwner = estateOwner; | 118 | es.EstateOwner = estateOwner; |
119 | es.DenyMinors = denyMinors; | 119 | es.DenyMinors = denyMinors; |
120 | 120 | ||
121 | // Saving settings. | 121 | // Saving settings. |
122 | db.StoreEstateSettings(es); | 122 | db.StoreEstateSettings(es); |
123 | 123 | ||
124 | // Loading settings to another instance variable. | 124 | // Loading settings to another instance variable. |
125 | EstateSettings nes = db.LoadEstateSettings(regionId); | 125 | EstateSettings nes = db.LoadEstateSettings(regionId); |
126 | 126 | ||
127 | // Checking that loaded values are correct. | 127 | // Checking that loaded values are correct. |
128 | Assert.That(estateName, Is.EqualTo(nes.EstateName)); | 128 | Assert.That(estateName, Is.EqualTo(nes.EstateName)); |
129 | Assert.That(parentEstateID, Is.EqualTo(nes.ParentEstateID)); | 129 | Assert.That(parentEstateID, Is.EqualTo(nes.ParentEstateID)); |
130 | Assert.That(billableFactor, Is.EqualTo(nes.BillableFactor)); | 130 | Assert.That(billableFactor, Is.EqualTo(nes.BillableFactor)); |
131 | Assert.That(priceMeter, Is.EqualTo(nes.PricePerMeter)); | 131 | Assert.That(priceMeter, Is.EqualTo(nes.PricePerMeter)); |
132 | Assert.That(redirectGridX, Is.EqualTo(nes.RedirectGridX)); | 132 | Assert.That(redirectGridX, Is.EqualTo(nes.RedirectGridX)); |
133 | Assert.That(redirectGridY, Is.EqualTo(nes.RedirectGridY)); | 133 | Assert.That(redirectGridY, Is.EqualTo(nes.RedirectGridY)); |
134 | Assert.That(useGlobalTime, Is.EqualTo(nes.UseGlobalTime)); | 134 | Assert.That(useGlobalTime, Is.EqualTo(nes.UseGlobalTime)); |
135 | Assert.That(fixedSun, Is.EqualTo(nes.FixedSun)); | 135 | Assert.That(fixedSun, Is.EqualTo(nes.FixedSun)); |
136 | Assert.That(sunPosition, Is.EqualTo(nes.SunPosition)); | 136 | Assert.That(sunPosition, Is.EqualTo(nes.SunPosition)); |
137 | Assert.That(allowVoice, Is.EqualTo(nes.AllowVoice)); | 137 | Assert.That(allowVoice, Is.EqualTo(nes.AllowVoice)); |
138 | Assert.That(allowDirectTeleport, Is.EqualTo(nes.AllowDirectTeleport)); | 138 | Assert.That(allowDirectTeleport, Is.EqualTo(nes.AllowDirectTeleport)); |
139 | Assert.That(denyAnonymous, Is.EqualTo(nes.DenyAnonymous)); | 139 | Assert.That(denyAnonymous, Is.EqualTo(nes.DenyAnonymous)); |
140 | Assert.That(denyIdentified, Is.EqualTo(nes.DenyIdentified)); | 140 | Assert.That(denyIdentified, Is.EqualTo(nes.DenyIdentified)); |
141 | Assert.That(denyTransacted, Is.EqualTo(nes.DenyTransacted)); | 141 | Assert.That(denyTransacted, Is.EqualTo(nes.DenyTransacted)); |
142 | Assert.That(abuseEmailtoEstateOwner, Is.EqualTo(nes.AbuseEmailToEstateOwner)); | 142 | Assert.That(abuseEmailtoEstateOwner, Is.EqualTo(nes.AbuseEmailToEstateOwner)); |
143 | Assert.That(blockDwell, Is.EqualTo(nes.BlockDwell)); | 143 | Assert.That(blockDwell, Is.EqualTo(nes.BlockDwell)); |
144 | Assert.That(estateskipScripts, Is.EqualTo(nes.EstateSkipScripts)); | 144 | Assert.That(estateskipScripts, Is.EqualTo(nes.EstateSkipScripts)); |
145 | Assert.That(taxFree, Is.EqualTo(nes.TaxFree)); | 145 | Assert.That(taxFree, Is.EqualTo(nes.TaxFree)); |
146 | Assert.That(publicAccess, Is.EqualTo(nes.PublicAccess)); | 146 | Assert.That(publicAccess, Is.EqualTo(nes.PublicAccess)); |
147 | Assert.That(abuseMail, Is.EqualTo(nes.AbuseEmail)); | 147 | Assert.That(abuseMail, Is.EqualTo(nes.AbuseEmail)); |
148 | Assert.That(estateOwner, Is.EqualTo(nes.EstateOwner)); | 148 | Assert.That(estateOwner, Is.EqualTo(nes.EstateOwner)); |
149 | Assert.That(denyMinors, Is.EqualTo(nes.DenyMinors)); | 149 | Assert.That(denyMinors, Is.EqualTo(nes.DenyMinors)); |
150 | 150 | ||
151 | } | 151 | } |
152 | 152 | ||
153 | } | 153 | } |
154 | } | 154 | } |
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index ef9b224..7e4397b 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs | |||
@@ -822,7 +822,7 @@ namespace OpenSim.Framework.Console | |||
822 | cmdline.Remove(0, cmdline.Length); | 822 | cmdline.Remove(0, cmdline.Length); |
823 | } | 823 | } |
824 | 824 | ||
825 | while(true) | 825 | while (true) |
826 | { | 826 | { |
827 | Show(); | 827 | Show(); |
828 | 828 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index a73977e..2429e96 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2506,8 +2506,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2506 | 2506 | ||
2507 | public void llLookAt(LSL_Vector target, double strength, double damping) | 2507 | public void llLookAt(LSL_Vector target, double strength, double damping) |
2508 | { | 2508 | { |
2509 | // partial implementation, rotates objects correctly but does not apply strength or damping attributes | 2509 | // partial implementation, rotates objects correctly but does not apply strength or damping attributes |
2510 | 2510 | ||
2511 | m_host.AddScriptLPS(1); | 2511 | m_host.AddScriptLPS(1); |
2512 | // Determine where we are looking from | 2512 | // Determine where we are looking from |
2513 | LSL_Vector from = llGetPos(); | 2513 | LSL_Vector from = llGetPos(); |