Add do-while co-op termination test

Minor changes to scripts in other tests.
user_profiles
Justin Clark-Casey (justincc) 2013-01-22 01:53:10 +00:00
parent fbdfe43d75
commit cf0b5e4f27
1 changed files with 30 additions and 2 deletions

View File

@ -124,8 +124,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
{
state_entry()
{
llSay(0, ""Thin Lizzy"");
integer i = 0;
llSay(0, ""Thin Lizzy"");
for (i = 0; i < 2147483647; i++)
llSay(0, ""Iter "" + (string)i);
}
@ -145,8 +146,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
{
state_entry()
{
llSay(0, ""Thin Lizzy"");
integer i = 0;
llSay(0, ""Thin Lizzy"");
for (i = 0; i < 2147483647; i++)
{
llSay(0, ""Iter "" + (string)i);
@ -168,6 +170,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
{
state_entry()
{
integer i = 0;
llSay(0, ""Thin Lizzy"");
while (1 == 1)
@ -189,6 +192,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
{
state_entry()
{
integer i = 0;
llSay(0, ""Thin Lizzy"");
while (1 == 1)
@ -201,6 +205,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
TestStop(script);
}
[Test]
public void TestStopOnLongDoWhileLoop()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
string script =
@"default
{
state_entry()
{
integer i = 0;
llSay(0, ""Thin Lizzy"");
do
{
llSay(0, ""Iter "" + (string)i);
} while (1 == 1)
}
}";
TestStop(script);
}
private void TestStop(string script)
{
UUID userId = TestHelpers.ParseTail(0x1);