mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
Formatting cleanup.
This commit is contained in:
@@ -60,7 +60,7 @@ namespace OpenSim.Data.Tests
|
||||
public UUID item2;
|
||||
public UUID item3;
|
||||
|
||||
public static Random random;
|
||||
public static Random random;
|
||||
|
||||
public string itemname1 = "item1";
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace OpenSim.Data.Tests
|
||||
UUID tmp0 = UUID.Random();
|
||||
UUID tmp1 = UUID.Random();
|
||||
UUID tmp2 = UUID.Random();
|
||||
UUID tmp3 = UUID.Random();
|
||||
UUID tmp3 = UUID.Random();
|
||||
UUID newregion = UUID.Random();
|
||||
SceneObjectPart p1 = NewSOP("SoP 1",tmp1);
|
||||
SceneObjectPart p2 = NewSOP("SoP 2",tmp2);
|
||||
@@ -224,7 +224,7 @@ namespace OpenSim.Data.Tests
|
||||
random.NextBytes(partsys);
|
||||
DateTime expires = new DateTime(2008, 12, 20);
|
||||
DateTime rezzed = new DateTime(2009, 07, 15);
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
|
||||
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
@@ -261,7 +261,7 @@ namespace OpenSim.Data.Tests
|
||||
sop.Shape = pbshap;
|
||||
sop.GroupPosition = groupos;
|
||||
sop.RotationOffset = rotoff;
|
||||
sop.CreatorID = creator;
|
||||
sop.CreatorID = creator;
|
||||
sop.InventorySerial = iserial;
|
||||
sop.TaskInventory = dic;
|
||||
sop.ObjectFlags = objf;
|
||||
@@ -306,7 +306,7 @@ namespace OpenSim.Data.Tests
|
||||
Assert.That(expires,Is.EqualTo(sop.Expires), "Assert.That(expires,Is.EqualTo(sop.Expires))");
|
||||
Assert.That(rezzed,Is.EqualTo(sop.Rezzed), "Assert.That(rezzed,Is.EqualTo(sop.Rezzed))");
|
||||
Assert.That(offset,Is.EqualTo(sop.OffsetPosition), "Assert.That(offset,Is.EqualTo(sop.OffsetPosition))");
|
||||
Assert.That(velocity,Is.EqualTo(sop.Velocity), "Assert.That(velocity,Is.EqualTo(sop.Velocity))");
|
||||
Assert.That(velocity,Is.EqualTo(sop.Velocity), "Assert.That(velocity,Is.EqualTo(sop.Velocity))");
|
||||
Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity), "Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity))");
|
||||
Assert.That(accel,Is.EqualTo(sop.Acceleration), "Assert.That(accel,Is.EqualTo(sop.Acceleration))");
|
||||
Assert.That(description,Is.EqualTo(sop.Description), "Assert.That(description,Is.EqualTo(sop.Description))");
|
||||
@@ -319,7 +319,7 @@ namespace OpenSim.Data.Tests
|
||||
Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))");
|
||||
Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))");
|
||||
|
||||
// This is necessary or object will not be inserted in DB
|
||||
// This is necessary or object will not be inserted in DB
|
||||
sop.ObjectFlags = 0;
|
||||
|
||||
SceneObjectGroup sog = new SceneObjectGroup(sop);
|
||||
@@ -332,11 +332,11 @@ namespace OpenSim.Data.Tests
|
||||
// Makes sure there are no double insertions:
|
||||
db.StoreObject(sog,region3);
|
||||
sogs = db.LoadObjects(region3);
|
||||
Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))");
|
||||
Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))");
|
||||
|
||||
|
||||
// Tests if the parameters were inserted correctly
|
||||
SceneObjectPart p = sogs[0].RootPart;
|
||||
SceneObjectPart p = sogs[0].RootPart;
|
||||
Assert.That(regionh,Is.EqualTo(p.RegionHandle), "Assert.That(regionh,Is.EqualTo(p.RegionHandle))");
|
||||
//Assert.That(localid,Is.EqualTo(p.LocalId), "Assert.That(localid,Is.EqualTo(p.LocalId))");
|
||||
Assert.That(groupos,Is.EqualTo(p.GroupPosition), "Assert.That(groupos,Is.EqualTo(p.GroupPosition))");
|
||||
@@ -402,7 +402,7 @@ namespace OpenSim.Data.Tests
|
||||
random.NextBytes(partsys);
|
||||
DateTime expires = new DateTime(2010, 12, 20);
|
||||
DateTime rezzed = new DateTime(2005, 07, 15);
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
|
||||
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
@@ -418,7 +418,7 @@ namespace OpenSim.Data.Tests
|
||||
PrimitiveBaseShape pbshap = new PrimitiveBaseShape();
|
||||
pbshap = PrimitiveBaseShape.Default;
|
||||
Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
byte updatef = (byte) random.Next(127);
|
||||
byte updatef = (byte) random.Next(127);
|
||||
|
||||
// Updates the region with new values
|
||||
SceneObjectGroup sog2 = FindSOG("Adam West", region3);
|
||||
@@ -427,7 +427,7 @@ namespace OpenSim.Data.Tests
|
||||
sog2.RootPart.Shape = pbshap;
|
||||
sog2.RootPart.GroupPosition = groupos;
|
||||
sog2.RootPart.RotationOffset = rotoff;
|
||||
sog2.RootPart.CreatorID = creator;
|
||||
sog2.RootPart.CreatorID = creator;
|
||||
sog2.RootPart.TaskInventory = dic;
|
||||
sog2.RootPart.Name = name;
|
||||
sog2.RootPart.Material = material;
|
||||
@@ -492,7 +492,7 @@ namespace OpenSim.Data.Tests
|
||||
{
|
||||
UUID tmp = UUID.Random();
|
||||
SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp);
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
|
||||
Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
|
||||
@@ -648,7 +648,7 @@ namespace OpenSim.Data.Tests
|
||||
{
|
||||
InventoryItemBase i = new InventoryItemBase();
|
||||
UUID id = UUID.Random();
|
||||
i.ID = id;
|
||||
i.ID = id;
|
||||
UUID folder = UUID.Random();
|
||||
i.Folder = folder;
|
||||
UUID owner = UUID.Random();
|
||||
@@ -666,13 +666,13 @@ namespace OpenSim.Data.Tests
|
||||
i.NextPermissions = nextperm;
|
||||
uint curperm = (uint) random.Next();
|
||||
i.CurrentPermissions = curperm;
|
||||
uint baseperm = (uint) random.Next();
|
||||
uint baseperm = (uint) random.Next();
|
||||
i.BasePermissions = baseperm;
|
||||
uint eoperm = (uint) random.Next();
|
||||
i.EveryOnePermissions = eoperm;
|
||||
int assettype = random.Next();
|
||||
i.AssetType = assettype;
|
||||
UUID groupid = UUID.Random();
|
||||
UUID groupid = UUID.Random();
|
||||
i.GroupID = groupid;
|
||||
bool groupown = true;
|
||||
i.GroupOwned = groupown;
|
||||
@@ -1010,7 +1010,7 @@ namespace OpenSim.Data.Tests
|
||||
|
||||
private SceneObjectPart NewSOP(string name, UUID uuid)
|
||||
{
|
||||
SceneObjectPart sop = new SceneObjectPart();
|
||||
SceneObjectPart sop = new SceneObjectPart();
|
||||
sop.Name = name;
|
||||
sop.Description = name;
|
||||
sop.Text = RandomName();
|
||||
@@ -1042,12 +1042,12 @@ namespace OpenSim.Data.Tests
|
||||
int size = random.Next(5,12);
|
||||
char ch ;
|
||||
for (int i=0; i<size; i++)
|
||||
{
|
||||
{
|
||||
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
|
||||
name.Append(ch);
|
||||
}
|
||||
return name.ToString();
|
||||
}
|
||||
}
|
||||
// private InventoryFolderBase NewFolder(UUID id, UUID parent, UUID owner, string name)
|
||||
// {
|
||||
// InventoryFolderBase f = new InventoryFolderBase();
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace OpenSim.Data.Tests
|
||||
u1.FirstName = "Ugly";
|
||||
|
||||
db.UpdateUserProfile(u1);
|
||||
Assert.That("Ugly",Is.EqualTo(u1.FirstName), "Assert.That(\"Ugly\",Is.EqualTo(u1.FirstName))");
|
||||
Assert.That("Ugly",Is.EqualTo(u1.FirstName), "Assert.That(\"Ugly\",Is.EqualTo(u1.FirstName))");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -174,7 +174,7 @@ namespace OpenSim.Data.Tests
|
||||
db.AddNewUserProfile(u4);
|
||||
Assert.That(db.GetUserByUUID(zero),Is.Null);
|
||||
Assert.That(db.GetUserByUUID(user4),Is.Null);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void T015_UserPersistency()
|
||||
@@ -218,7 +218,7 @@ namespace OpenSim.Data.Tests
|
||||
|
||||
//HomeRegionX and HomeRegionY must only use 24 bits
|
||||
homeregx = ((homeregx << 8) >> 8);
|
||||
homeregy = ((homeregy << 8) >> 8);
|
||||
homeregy = ((homeregy << 8) >> 8);
|
||||
|
||||
u.ID = id;
|
||||
u.WebLoginKey = webloginkey;
|
||||
@@ -299,7 +299,7 @@ namespace OpenSim.Data.Tests
|
||||
uint homeregx = (uint) random.Next();
|
||||
uint homeregy = (uint) random.Next();
|
||||
Vector3 homeloc = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
|
||||
Vector3 homelookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
|
||||
Vector3 homelookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
|
||||
int created = random.Next();
|
||||
int lastlogin = random.Next();
|
||||
string userinvuri = RandomName();
|
||||
@@ -359,7 +359,7 @@ namespace OpenSim.Data.Tests
|
||||
Assert.That(email,Is.EqualTo(u1a.Email), "Assert.That(email,Is.EqualTo(u1a.Email))");
|
||||
Assert.That(passhash,Is.EqualTo(u1a.PasswordHash), "Assert.That(passhash,Is.EqualTo(u1a.PasswordHash))");
|
||||
Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt), "Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt))");
|
||||
Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
|
||||
Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
|
||||
Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX), "Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX))");
|
||||
Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY), "Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY))");
|
||||
Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
|
||||
@@ -426,7 +426,7 @@ namespace OpenSim.Data.Tests
|
||||
UserAgentData a2 = db.GetAgentByName(fname2,lname2);
|
||||
UserAgentData a3 = db.GetAgentByName(name3);
|
||||
Assert.That(user2,Is.EqualTo(a2.ProfileID), "Assert.That(user2,Is.EqualTo(a2.ProfileID))");
|
||||
Assert.That(user3,Is.EqualTo(a3.ProfileID), "Assert.That(user3,Is.EqualTo(a3.ProfileID))");
|
||||
Assert.That(user3,Is.EqualTo(a3.ProfileID), "Assert.That(user3,Is.EqualTo(a3.ProfileID))");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -501,11 +501,11 @@ namespace OpenSim.Data.Tests
|
||||
db.AddNewUserFriend(user1,user3, 2);
|
||||
db.AddNewUserFriend(user1,user2, 4);
|
||||
List<FriendListItem> fl1 = db.GetUserFriendList(user1);
|
||||
Assert.That(fl1.Count,Is.EqualTo(2), "Assert.That(fl1.Count,Is.EqualTo(2))");
|
||||
Assert.That(fl1.Count,Is.EqualTo(2), "Assert.That(fl1.Count,Is.EqualTo(2))");
|
||||
perms.Add(user2,1);
|
||||
perms.Add(user3,2);
|
||||
for (int i = 0; i < fl1.Count; i++)
|
||||
{
|
||||
{
|
||||
Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner), "Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner))");
|
||||
friends.Add(fl1[i].Friend,1);
|
||||
temp = perms[fl1[i].Friend];
|
||||
@@ -544,7 +544,7 @@ namespace OpenSim.Data.Tests
|
||||
db.UpdateUserFriendPerms(user1, user3, 4);
|
||||
|
||||
fl1 = db.GetUserFriendList(user1);
|
||||
Assert.That(fl1[0].FriendPerms,Is.EqualTo(4), "Assert.That(fl1[0].FriendPerms,Is.EqualTo(4))");
|
||||
Assert.That(fl1[0].FriendPerms,Is.EqualTo(4), "Assert.That(fl1[0].FriendPerms,Is.EqualTo(4))");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -560,7 +560,7 @@ namespace OpenSim.Data.Tests
|
||||
[Test]
|
||||
public void T041_UserAppearancePersistency()
|
||||
{
|
||||
AvatarAppearance appear = new AvatarAppearance();
|
||||
AvatarAppearance appear = new AvatarAppearance();
|
||||
UUID owner = UUID.Random();
|
||||
int serial = random.Next();
|
||||
byte[] visualp = new byte[218];
|
||||
@@ -698,7 +698,7 @@ namespace OpenSim.Data.Tests
|
||||
int size = random.Next(5,12);
|
||||
char ch ;
|
||||
for (int i=0; i<size; i++)
|
||||
{
|
||||
{
|
||||
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
|
||||
name.Append(ch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user