From 83b030229ec1d91edcf00269eedfc9c9075b877e Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 21 Sep 2008 15:54:58 +0000 Subject: Mantis #2232 Thank you, idb, for a patch that fixes an overflow issue in casting string -> int for both engines, and adds tests! --- .../Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLInteger.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Common/Tests') diff --git a/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLInteger.cs b/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLInteger.cs index d2839db..a769608 100644 --- a/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLInteger.cs +++ b/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestLSLInteger.cs @@ -62,6 +62,14 @@ namespace OpenSim.Region.ScriptEngine.Common.Tests m_stringIntSet.Add("123.9", 123); m_stringIntSet.Add("999999999", 999999999); m_stringIntSet.Add("-99999999", -99999999); + m_stringIntSet.Add("", 0); + m_stringIntSet.Add("aa", 0); + m_stringIntSet.Add("42", 42); + m_stringIntSet.Add("42 is the answer", 42); + m_stringIntSet.Add(" 42", 42); + m_stringIntSet.Add("42,123,456", 42); + m_stringIntSet.Add("0xff", 255); + m_stringIntSet.Add("12345678900000", -1); } /// -- cgit v1.1