Skip to content

Commit

Permalink
Engine - Tests: fixed Test_Entity_Tree method names
Browse files Browse the repository at this point in the history
  • Loading branch information
friflo committed Jul 19, 2024
1 parent 4eb7360 commit 17596ba
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions Engine/src/Tests/ECS/Entity/Test_Entity_Tree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Tests.ECS {
public static class Test_Entity_Tree
{
[Test]
public static void Test_CreateEntity_UseRandomPids()
public static void Test_Entity_Tree_CreateEntity_UseRandomPids()
{
var store = new EntityStore(PidType.RandomPids);
store.SetRandomSeed(0);
Expand All @@ -32,7 +32,7 @@ public static void Test_CreateEntity_UseRandomPids()
}

[Test]
public static void Test_CreateEntity_UsePidAsId()
public static void Test_Entity_Tree_CreateEntity_UsePidAsId()
{
var store = new EntityStore(PidType.UsePidAsId);
var entity = store.CreateEntity();
Expand All @@ -43,7 +43,7 @@ public static void Test_CreateEntity_UsePidAsId()
}

[Test]
public static void Test_AddChild()
public static void Test_Entity_Tree_AddChild()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand Down Expand Up @@ -100,7 +100,7 @@ public static void Test_AddChild()
}

[Test]
public static void Test_InsertChild()
public static void Test_Entity_Tree_InsertChild()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand Down Expand Up @@ -184,7 +184,7 @@ public static void Test_InsertChild()

/// <summary>Cover <see cref="EntityStore.EnsureChildIdsCapacity"/></summary>
[Test]
public static void Test_InsertChild_EnsureChildIdsCapacity()
public static void Test_Entity_Tree_InsertChild_EnsureChildIdsCapacity()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand All @@ -207,7 +207,7 @@ public static void Test_InsertChild_EnsureChildIdsCapacity()

/// <summary>Cover <see cref="EntityStore.InsertChild"/></summary>
[Test]
public static void Test_InsertChild_cover()
public static void Test_Entity_Tree_InsertChild_cover()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand Down Expand Up @@ -253,7 +253,7 @@ public static void Test_InsertChild_cover()

/// <summary>code coverage for <see cref="EntityStore.SetTreeFlags"/></summary>
[Test]
public static void Test_AddChild_move_root_tree_entity()
public static void Test_Entity_Tree_AddChild_move_root_tree_entity()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand Down Expand Up @@ -292,7 +292,7 @@ public static void Test_AddChild_move_root_tree_entity()
}

[Test]
public static void Test_RemoveChild()
public static void Test_Entity_Tree_RemoveChild()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand Down Expand Up @@ -329,7 +329,7 @@ public static void Test_RemoveChild()
}

[Test]
public static void Test_RemoveChild_from_multiple_children()
public static void Test_Entity_Tree_RemoveChild_from_multiple_children()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand Down Expand Up @@ -361,7 +361,7 @@ public static void Test_RemoveChild_from_multiple_children()
}

[Test]
public static void Test_SetRoot()
public static void Test_Entity_Tree_SetRoot()
{
var store = new EntityStore(PidType.RandomPids);

Expand Down Expand Up @@ -389,7 +389,7 @@ public static void Test_SetRoot()
}

[Test]
public static void Test_move_with_AddChild()
public static void Test_Entity_Tree_move_with_AddChild()
{
var store = new EntityStore(PidType.RandomPids);
var entity1 = store.CreateEntity(1);
Expand Down Expand Up @@ -425,7 +425,12 @@ public static void Test_move_with_AddChild()
}

[Test]
public static void Test_Entity_ToString()
public static void Test_Entity_Tree_Allocation() {

}

[Test]
public static void Test_Entity_Tree_Entity_ToString()
{
var nullEntity = new Entity();
AreEqual("null", nullEntity.ToString());
Expand All @@ -443,7 +448,7 @@ public static void Test_Entity_ToString()
}

[Test]
public static void Test_DeleteEntity()
public static void Test_Entity_Tree_DeleteEntity()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand Down Expand Up @@ -563,7 +568,7 @@ public static void Test_Entity_Tree_argument_exceptions()

/// <summary>cover <see cref="EntityStore.DeleteNode"/></summary>
[Test]
public static void Test_Test_Entity_Tree_cover_DeleteNode()
public static void Test_Entity_Tree_cover_DeleteNode()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand Down Expand Up @@ -604,7 +609,7 @@ public static void Test_Entity_GetChildNodeByIndex()

/// <summary>Cover <see cref="Entity.GetChildIndex"/></summary>
[Test]
public static void Test_Entity_GetChildIndex()
public static void Test_Entity_Tree_GetChildIndex()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand All @@ -614,7 +619,7 @@ public static void Test_Entity_GetChildIndex()

/// <summary>Cover <see cref="EntityStore.OnChildEntitiesChanged"/></summary>
[Test]
public static void Test_EntityStore_ChildEntitiesChanged()
public static void Test_Entity_Tree_ChildEntitiesChanged()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity(1);
Expand Down Expand Up @@ -672,7 +677,7 @@ public static void Test_Entity_Tree_ChildEnumerator()
}

[Test]
public static void Test_Entity_id_argument_exceptions()
public static void Test_Entity_Tree_id_argument_exceptions()
{
var store = new EntityStore(PidType.RandomPids);
var e = Throws<ArgumentException>(() => {
Expand All @@ -688,7 +693,7 @@ public static void Test_Entity_id_argument_exceptions()
}

[Test]
public static void Test_Entity_SetRoot_assertions()
public static void Test_Entity_Tree_SetRoot_assertions()
{
{
var store = new EntityStore(PidType.RandomPids);
Expand Down Expand Up @@ -762,7 +767,7 @@ public static void Test_Entity_Tree_RandomPid_Coverage()
}

[Test]
public static void Test_Add_Child_Entities_UseRandomPids_Perf()
public static void Test_Entity_Tree_AddChild_Entities_UseRandomPids_Perf()
{
var store = new EntityStore(PidType.RandomPids);
var root = store.CreateEntity();
Expand All @@ -780,7 +785,7 @@ public static void Test_Add_Child_Entities_UseRandomPids_Perf()
}

[Test]
public static void Test_Add_Child_Entities_UsePidAsId_Perf()
public static void Test_Entity_Tree_AddChild_Entities_UsePidAsId_Perf()
{
var store = new EntityStore(PidType.UsePidAsId);
var root = store.CreateEntity();
Expand All @@ -799,7 +804,7 @@ public static void Test_Add_Child_Entities_UsePidAsId_Perf()
}

[Test]
public static void Test_Math_Perf()
public static void Test_Entity_Tree_Math_Perf()
{
var rand = new Random();
var count = 10; // 10_000_000 ~ #PC: 39 ms
Expand Down

0 comments on commit 17596ba

Please sign in to comment.