Skip to content

Commit

Permalink
Tests: add Test_Index_cover_removing_missing_target_entity()
Browse files Browse the repository at this point in the history
  • Loading branch information
friflo committed Dec 2, 2024
1 parent d600f82 commit e33dc06
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Tests-internal/ECS/Test_Index.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@ public static void Test_Index_EntityNode()
AreEqual("Components: [IndexedInt]", node.IsOwner.ToString());
AreEqual("Components: [AttackComponent]", node.IsLinked.ToString());
}

/// Cover <see cref="EntityIndexUtils.RemoveComponentValue"/>
[Test]
public static void Test_Index_cover_removing_missing_target_entity()
{
var store = new EntityStore();
var entity = store.CreateEntity();
var index = StoreIndex.GetIndex(store, StructInfo<LinkComponent>.Index);
var entityIndex = (EntityIndex)index;
EntityIndexUtils.RemoveComponentValue(entity.Id, 42, entityIndex);
}
}

}

0 comments on commit e33dc06

Please sign in to comment.