Merge branch 'master' into varregion
Conflicts: OpenSim/Framework/Constants.cs OpenSim/Framework/RegionInfo.cs OpenSim/Services/GridService/GridService.cs OpenSim/Services/Interfaces/IGridService.cs Most conflicts had to do with Util routines not in master branch yet.varregion
commit
fd045d520e
|
@ -47,6 +47,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||||
TestCompile("default { bad() {} }", true);
|
TestCompile("default { bad() {} }", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestAttachEvent()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
// TestHelpers.EnableLogging();
|
||||||
|
|
||||||
|
TestKeyArgEvent("attach");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestObjectRezEvent()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
// TestHelpers.EnableLogging();
|
||||||
|
|
||||||
|
TestKeyArgEvent("object_rez");
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestMovingEndEvent()
|
public void TestMovingEndEvent()
|
||||||
{
|
{
|
||||||
|
@ -242,6 +260,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||||
TestVectorArgEvent("land_collision_end");
|
TestVectorArgEvent("land_collision_end");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestAtRotTargetEvent()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
// TestHelpers.EnableLogging();
|
||||||
|
|
||||||
|
TestIntRotRotArgEvent("at_rot_target");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestAtTargetEvent()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
// TestHelpers.EnableLogging();
|
||||||
|
|
||||||
|
TestIntVecVecArgEvent("at_target");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestControlEvent()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
// TestHelpers.EnableLogging();
|
||||||
|
|
||||||
|
TestKeyIntIntArgEvent("control");
|
||||||
|
}
|
||||||
|
|
||||||
private void TestIntArgEvent(string eventName)
|
private void TestIntArgEvent(string eventName)
|
||||||
{
|
{
|
||||||
|
@ -251,6 +295,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||||
TestCompile("default { " + eventName + "(integer n, integer o) {{}} }", true);
|
TestCompile("default { " + eventName + "(integer n, integer o) {{}} }", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TestKeyArgEvent(string eventName)
|
||||||
|
{
|
||||||
|
TestCompile("default { " + eventName + "(key k) {} }", false);
|
||||||
|
TestCompile("default { " + eventName + "{{}} }", true);
|
||||||
|
TestCompile("default { " + eventName + "(string s) {{}} }", true);
|
||||||
|
TestCompile("default { " + eventName + "(key k, key l) {{}} }", true);
|
||||||
|
}
|
||||||
|
|
||||||
private void TestVectorArgEvent(string eventName)
|
private void TestVectorArgEvent(string eventName)
|
||||||
{
|
{
|
||||||
TestCompile("default { " + eventName + "(vector v) {} }", false);
|
TestCompile("default { " + eventName + "(vector v) {} }", false);
|
||||||
|
@ -259,6 +311,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||||
TestCompile("default { " + eventName + "(vector v, vector w) {{}} }", true);
|
TestCompile("default { " + eventName + "(vector v, vector w) {{}} }", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TestIntRotRotArgEvent(string eventName)
|
||||||
|
{
|
||||||
|
TestCompile("default { " + eventName + "(integer n, rotation r, rotation s) {} }", false);
|
||||||
|
TestCompile("default { " + eventName + "{{}} }", true);
|
||||||
|
TestCompile("default { " + eventName + "(string s) {{}} }", true);
|
||||||
|
TestCompile("default { " + eventName + "(integer n, rotation r, rotation s, rotation t) {{}} }", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TestIntVecVecArgEvent(string eventName)
|
||||||
|
{
|
||||||
|
TestCompile("default { " + eventName + "(integer n, vector v, vector w) {} }", false);
|
||||||
|
TestCompile("default { " + eventName + "{{}} }", true);
|
||||||
|
TestCompile("default { " + eventName + "(string s) {{}} }", true);
|
||||||
|
TestCompile("default { " + eventName + "(integer n, vector v, vector w, vector x) {{}} }", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TestKeyIntIntArgEvent(string eventName)
|
||||||
|
{
|
||||||
|
TestCompile("default { " + eventName + "(key k, integer n, integer o) {} }", false);
|
||||||
|
TestCompile("default { " + eventName + "{{}} }", true);
|
||||||
|
TestCompile("default { " + eventName + "(string s) {{}} }", true);
|
||||||
|
TestCompile("default { " + eventName + "(key k, integer n, integer o, integer p) {{}} }", true);
|
||||||
|
}
|
||||||
|
|
||||||
private void TestCompile(string script, bool expectException)
|
private void TestCompile(string script, bool expectException)
|
||||||
{
|
{
|
||||||
bool gotException = false;
|
bool gotException = false;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -227,6 +227,8 @@ namespace OpenSim.Services.Interfaces
|
||||||
|
|
||||||
public GridRegion()
|
public GridRegion()
|
||||||
{
|
{
|
||||||
|
RegionSizeX = (int)Constants.RegionSize;
|
||||||
|
RegionSizeY = (int)Constants.RegionSize;
|
||||||
m_serverURI = string.Empty;
|
m_serverURI = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue