From 1ba76f57ba13ae59f518ecf9ba2319dd54b7a934 Mon Sep 17 00:00:00 2001 From: idb Date: Fri, 12 Dec 2008 11:50:12 +0000 Subject: 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 --- .../ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Tests') 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 m_stringDoubleSet.Add("-548.5", -548.5); m_stringDoubleSet.Add("-2.0005", -2.0005); m_stringDoubleSet.Add("-349485435.6805", -349485435.6805); - + // some oddball combinations and exponents + m_stringDoubleSet.Add("", 0.0); + m_stringDoubleSet.Add("1.0E+5", 100000.0); + m_stringDoubleSet.Add("-1.0E+5", -100000.0); + m_stringDoubleSet.Add("-1E+5", -100000.0); + m_stringDoubleSet.Add("-1.E+5", -100000.0); + m_stringDoubleSet.Add("-1.E+5.0", -100000.0); + m_stringDoubleSet.Add("1ef", 1.0); + m_stringDoubleSet.Add("e10", 0.0); + m_stringDoubleSet.Add("1.e0.0", 1.0); + m_doubleStringSet = new Dictionary(); m_doubleStringSet.Add(2.0, "2.000000"); m_doubleStringSet.Add(-2.0, "-2.000000"); -- cgit v1.1