aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-01-22 01:40:18 +0000
committerJustin Clark-Casey (justincc)2013-01-22 01:40:18 +0000
commitfbdfe43d75cb99066ce5fcfa803b135aff6e1fe0 (patch)
tree677a9a3cca7d34f6563acb239a23fb6d3b4cb739
parentFix bug in generating termination checks in compound statement for loop. (diff)
downloadopensim-SC_OLD-fbdfe43d75cb99066ce5fcfa803b135aff6e1fe0.zip
opensim-SC_OLD-fbdfe43d75cb99066ce5fcfa803b135aff6e1fe0.tar.gz
opensim-SC_OLD-fbdfe43d75cb99066ce5fcfa803b135aff6e1fe0.tar.bz2
opensim-SC_OLD-fbdfe43d75cb99066ce5fcfa803b135aff6e1fe0.tar.xz
Add single and comound while loop co-op termination test
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
index c83a6ba..87951f9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
@@ -157,6 +157,50 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
157 TestStop(script); 157 TestStop(script);
158 } 158 }
159 159
160 [Test]
161 public void TestStopOnLongSingleStatementWhileLoop()
162 {
163 TestHelpers.InMethod();
164// TestHelpers.EnableLogging();
165
166 string script =
167@"default
168{
169 state_entry()
170 {
171 llSay(0, ""Thin Lizzy"");
172
173 while (1 == 1)
174 llSay(0, ""Iter "" + (string)i);
175 }
176}";
177
178 TestStop(script);
179 }
180
181 [Test]
182 public void TestStopOnLongCompoundStatementWhileLoop()
183 {
184 TestHelpers.InMethod();
185// TestHelpers.EnableLogging();
186
187 string script =
188@"default
189{
190 state_entry()
191 {
192 llSay(0, ""Thin Lizzy"");
193
194 while (1 == 1)
195 {
196 llSay(0, ""Iter "" + (string)i);
197 }
198 }
199}";
200
201 TestStop(script);
202 }
203
160 private void TestStop(string script) 204 private void TestStop(string script)
161 { 205 {
162 UUID userId = TestHelpers.ParseTail(0x1); 206 UUID userId = TestHelpers.ParseTail(0x1);