aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests
diff options
context:
space:
mode:
authorCharles Krinke2008-07-16 14:30:22 +0000
committerCharles Krinke2008-07-16 14:30:22 +0000
commit0106f967161b2fa0dbf131a56e9c5498d1b16270 (patch)
tree62e0cbad5193521f7a2549bb782207306ca9e92c /OpenSim/Tests
parentsquashing warnings critters (diff)
downloadopensim-SC_OLD-0106f967161b2fa0dbf131a56e9c5498d1b16270.zip
opensim-SC_OLD-0106f967161b2fa0dbf131a56e9c5498d1b16270.tar.gz
opensim-SC_OLD-0106f967161b2fa0dbf131a56e9c5498d1b16270.tar.bz2
opensim-SC_OLD-0106f967161b2fa0dbf131a56e9c5498d1b16270.tar.xz
Mantis#1755. Thank you kindly, Matth for a patch that solves:
When using math operators +,-,*,/ in an LSL script with an LSLFloat and an integer literal the wrong result is returned. This patch adds operators to the LSLFloat type to handle this case.
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r--OpenSim/Tests/OpenSim/Region/ScriptEngine/Common/LSL_TypesTestLSLFloat.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Common/LSL_TypesTestLSLFloat.cs b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Common/LSL_TypesTestLSLFloat.cs
index 29d0e1c..130c0ec 100644
--- a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Common/LSL_TypesTestLSLFloat.cs
+++ b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Common/LSL_TypesTestLSLFloat.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Region.ScriptEngine.Common.Tests
133 133
134 foreach (KeyValuePair<double, int> number in numberSet) 134 foreach (KeyValuePair<double, int> number in numberSet)
135 { 135 {
136 testNumber = new LSL_Types.LSLFloat(number.Key); 136 testNumber = (int)(new LSL_Types.LSLFloat(number.Key));
137 Assert.AreEqual(number.Value, testNumber, "Converting double " + number.Key + ", expecting int " + number.Value); 137 Assert.AreEqual(number.Value, testNumber, "Converting double " + number.Key + ", expecting int " + number.Value);
138 } 138 }
139 } 139 }
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ScriptEngine.Common.Tests
170 170
171 foreach (KeyValuePair<double, int> number in numberSet) 171 foreach (KeyValuePair<double, int> number in numberSet)
172 { 172 {
173 testNumber = new LSL_Types.LSLFloat(number.Key); 173 testNumber = (uint)(new LSL_Types.LSLFloat(number.Key));
174 Assert.AreEqual(number.Value, testNumber, "Converting double " + number.Key + ", expecting uint " + number.Value); 174 Assert.AreEqual(number.Value, testNumber, "Converting double " + number.Key + ", expecting uint " + number.Value);
175 } 175 }
176 } 176 }