From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- .../ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs index b476e32..12ba4de 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs @@ -37,6 +37,7 @@ using OpenSim.Tests.Common; namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests { + /// /// Tests the LSL compiler. Among other things, test that error messages /// generated by the C# compiler can be mapped to prper lines/columns in @@ -80,7 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve); System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler; - + m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); @@ -111,7 +112,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests CSCodeGenerator cg = new CSCodeGenerator(); string output = cg.Convert(input); - output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null); + output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null); // System.Console.WriteLine(output); positionMap = cg.PositionMap; @@ -132,7 +133,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests return compilerResults; } - +/* test too depedent on counting lines and columns maping code generation changes +erros position is better tested on viewers /// /// Test that line number errors are resolved as expected when preceding code contains a jump. /// @@ -152,13 +154,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests @l; i = 1; } -}", out positionMap); +}", out positionMap); Assert.AreEqual( new KeyValuePair(7, 9), positionMap[new KeyValuePair(compilerResults.Errors[0].Line, compilerResults.Errors[0].Column)]); } + /// /// Test the C# compiler error message can be mapped to the correct /// line/column in the LSL source when an undeclared variable is used. @@ -183,7 +186,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests new KeyValuePair(5, 21), positionMap[new KeyValuePair(compilerResults.Errors[0].Line, compilerResults.Errors[0].Column)]); } - +*/ /// /// Test that a string can be cast to string and another string /// concatenated. -- cgit v1.1