diff options
author | Justin Clark-Casey (justincc) | 2013-01-22 01:53:10 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-01-22 01:53:10 +0000 |
commit | cf0b5e4f279e36e506c46a8c1d980f015fe5cfb2 (patch) | |
tree | 2964c866283aafcf9d8664367d215b9d0d7dd351 /OpenSim/Region/ScriptEngine | |
parent | Add single and comound while loop co-op termination test (diff) | |
download | opensim-SC_OLD-cf0b5e4f279e36e506c46a8c1d980f015fe5cfb2.zip opensim-SC_OLD-cf0b5e4f279e36e506c46a8c1d980f015fe5cfb2.tar.gz opensim-SC_OLD-cf0b5e4f279e36e506c46a8c1d980f015fe5cfb2.tar.bz2 opensim-SC_OLD-cf0b5e4f279e36e506c46a8c1d980f015fe5cfb2.tar.xz |
Add do-while co-op termination test
Minor changes to scripts in other tests.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs index 87951f9..33d2175 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs | |||
@@ -124,8 +124,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests | |||
124 | { | 124 | { |
125 | state_entry() | 125 | state_entry() |
126 | { | 126 | { |
127 | llSay(0, ""Thin Lizzy""); | ||
128 | integer i = 0; | 127 | integer i = 0; |
128 | llSay(0, ""Thin Lizzy""); | ||
129 | |||
129 | for (i = 0; i < 2147483647; i++) | 130 | for (i = 0; i < 2147483647; i++) |
130 | llSay(0, ""Iter "" + (string)i); | 131 | llSay(0, ""Iter "" + (string)i); |
131 | } | 132 | } |
@@ -145,8 +146,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests | |||
145 | { | 146 | { |
146 | state_entry() | 147 | state_entry() |
147 | { | 148 | { |
148 | llSay(0, ""Thin Lizzy""); | ||
149 | integer i = 0; | 149 | integer i = 0; |
150 | llSay(0, ""Thin Lizzy""); | ||
151 | |||
150 | for (i = 0; i < 2147483647; i++) | 152 | for (i = 0; i < 2147483647; i++) |
151 | { | 153 | { |
152 | llSay(0, ""Iter "" + (string)i); | 154 | llSay(0, ""Iter "" + (string)i); |
@@ -168,6 +170,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests | |||
168 | { | 170 | { |
169 | state_entry() | 171 | state_entry() |
170 | { | 172 | { |
173 | integer i = 0; | ||
171 | llSay(0, ""Thin Lizzy""); | 174 | llSay(0, ""Thin Lizzy""); |
172 | 175 | ||
173 | while (1 == 1) | 176 | while (1 == 1) |
@@ -189,6 +192,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests | |||
189 | { | 192 | { |
190 | state_entry() | 193 | state_entry() |
191 | { | 194 | { |
195 | integer i = 0; | ||
192 | llSay(0, ""Thin Lizzy""); | 196 | llSay(0, ""Thin Lizzy""); |
193 | 197 | ||
194 | while (1 == 1) | 198 | while (1 == 1) |
@@ -201,6 +205,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests | |||
201 | TestStop(script); | 205 | TestStop(script); |
202 | } | 206 | } |
203 | 207 | ||
208 | [Test] | ||
209 | public void TestStopOnLongDoWhileLoop() | ||
210 | { | ||
211 | TestHelpers.InMethod(); | ||
212 | // TestHelpers.EnableLogging(); | ||
213 | |||
214 | string script = | ||
215 | @"default | ||
216 | { | ||
217 | state_entry() | ||
218 | { | ||
219 | integer i = 0; | ||
220 | llSay(0, ""Thin Lizzy""); | ||
221 | |||
222 | do | ||
223 | { | ||
224 | llSay(0, ""Iter "" + (string)i); | ||
225 | } while (1 == 1) | ||
226 | } | ||
227 | }"; | ||
228 | |||
229 | TestStop(script); | ||
230 | } | ||
231 | |||
204 | private void TestStop(string script) | 232 | private void TestStop(string script) |
205 | { | 233 | { |
206 | UUID userId = TestHelpers.ParseTail(0x1); | 234 | UUID userId = TestHelpers.ParseTail(0x1); |