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
Robert Adams 2014-01-04 08:57:51 -08:00
commit fd045d520e
3 changed files with 10702 additions and 9300 deletions

View File

@ -47,6 +47,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
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]
public void TestMovingEndEvent()
{
@ -242,6 +260,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
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)
{
@ -251,6 +295,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
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)
{
TestCompile("default { " + eventName + "(vector v) {} }", false);
@ -259,6 +311,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
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)
{
bool gotException = false;

File diff suppressed because it is too large Load Diff

View File

@ -227,6 +227,8 @@ namespace OpenSim.Services.Interfaces
public GridRegion()
{
RegionSizeX = (int)Constants.RegionSize;
RegionSizeY = (int)Constants.RegionSize;
m_serverURI = string.Empty;
}