diff options
author | Mike Mazur | 2008-07-31 07:11:49 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-31 07:11:49 +0000 |
commit | 16cf5aa2b83ae8e18f944c5cfec818d2211d04d1 (patch) | |
tree | 96d6a4d2f30ff4578d6bc5c30ea29d6a3334e51f /OpenSim/Tests | |
parent | -make ZERO_VECTOR and ZERO_ROTATION static readonly properties so they can be (diff) | |
download | opensim-SC_OLD-16cf5aa2b83ae8e18f944c5cfec818d2211d04d1.zip opensim-SC_OLD-16cf5aa2b83ae8e18f944c5cfec818d2211d04d1.tar.gz opensim-SC_OLD-16cf5aa2b83ae8e18f944c5cfec818d2211d04d1.tar.bz2 opensim-SC_OLD-16cf5aa2b83ae8e18f944c5cfec818d2211d04d1.tar.xz |
Allow the list hack from issue 1863 to compile, however its behavior is
different than in SL. See http://opensimulator.org/mantis/view.php?id=1863 for
details.
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r-- | OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs index 19c08ed..427390b 100644 --- a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs +++ b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs | |||
@@ -1558,6 +1558,31 @@ default | |||
1558 | } | 1558 | } |
1559 | 1559 | ||
1560 | [Test] | 1560 | [Test] |
1561 | public void TestLSLListHack() | ||
1562 | { | ||
1563 | string input = @"default | ||
1564 | { | ||
1565 | state_entry() | ||
1566 | { | ||
1567 | list l = [""hello""]; | ||
1568 | l = (l=[]) + l + ""world""; | ||
1569 | } | ||
1570 | }"; | ||
1571 | |||
1572 | string expected = @" | ||
1573 | public void default_event_state_entry() | ||
1574 | { | ||
1575 | LSL_Types.list l = new LSL_Types.list(""hello""); | ||
1576 | l = (l = new LSL_Types.list()) + l + ""world""; | ||
1577 | } | ||
1578 | "; | ||
1579 | |||
1580 | CSCodeGenerator cg = new CSCodeGenerator(); | ||
1581 | string output = cg.Convert(input); | ||
1582 | Assert.AreEqual(expected, output); | ||
1583 | } | ||
1584 | |||
1585 | [Test] | ||
1561 | [ExpectedException("Tools.CSToolsException")] | 1586 | [ExpectedException("Tools.CSToolsException")] |
1562 | public void TestSyntaxError() | 1587 | public void TestSyntaxError() |
1563 | { | 1588 | { |