diff options
author | idb | 2008-12-12 11:50:12 +0000 |
---|---|---|
committer | idb | 2008-12-12 11:50:12 +0000 |
commit | 1ba76f57ba13ae59f518ecf9ba2319dd54b7a934 (patch) | |
tree | 9c6a480ca944f17852f7826a05feec1355e64f82 /OpenSim/Region/ScriptEngine/Shared/Tests | |
parent | apparently opensim only works if secure_inventory_server = true, who (diff) | |
download | opensim-SC-1ba76f57ba13ae59f518ecf9ba2319dd54b7a934.zip opensim-SC-1ba76f57ba13ae59f518ecf9ba2319dd54b7a934.tar.gz opensim-SC-1ba76f57ba13ae59f518ecf9ba2319dd54b7a934.tar.bz2 opensim-SC-1ba76f57ba13ae59f518ecf9ba2319dd54b7a934.tar.xz |
Made the casting of stings to floats more robust and work more like SL.
Added some more tests that casts previously failed on.
Fixes Mantis #2789
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Tests')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs index 272d06c..d40a951 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs | |||
@@ -145,7 +145,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
145 | m_stringDoubleSet.Add("-548.5", -548.5); | 145 | m_stringDoubleSet.Add("-548.5", -548.5); |
146 | m_stringDoubleSet.Add("-2.0005", -2.0005); | 146 | m_stringDoubleSet.Add("-2.0005", -2.0005); |
147 | m_stringDoubleSet.Add("-349485435.6805", -349485435.6805); | 147 | m_stringDoubleSet.Add("-349485435.6805", -349485435.6805); |
148 | 148 | // some oddball combinations and exponents | |
149 | m_stringDoubleSet.Add("", 0.0); | ||
150 | m_stringDoubleSet.Add("1.0E+5", 100000.0); | ||
151 | m_stringDoubleSet.Add("-1.0E+5", -100000.0); | ||
152 | m_stringDoubleSet.Add("-1E+5", -100000.0); | ||
153 | m_stringDoubleSet.Add("-1.E+5", -100000.0); | ||
154 | m_stringDoubleSet.Add("-1.E+5.0", -100000.0); | ||
155 | m_stringDoubleSet.Add("1ef", 1.0); | ||
156 | m_stringDoubleSet.Add("e10", 0.0); | ||
157 | m_stringDoubleSet.Add("1.e0.0", 1.0); | ||
158 | |||
149 | m_doubleStringSet = new Dictionary<double, string>(); | 159 | m_doubleStringSet = new Dictionary<double, string>(); |
150 | m_doubleStringSet.Add(2.0, "2.000000"); | 160 | m_doubleStringSet.Add(2.0, "2.000000"); |
151 | m_doubleStringSet.Add(-2.0, "-2.000000"); | 161 | m_doubleStringSet.Add(-2.0, "-2.000000"); |