BitArrayExtensionsTests.cs 533 B

1234567891011121314151617181920
  1. using System.Collections;
  2. using Xunit;
  3. namespace MonoGame.Extended.ECS.Tests
  4. {
  5. public class BitArrayExtensionsTests
  6. {
  7. [Fact]
  8. public void BitArrayIsEmpty()
  9. {
  10. Assert.True(new BitArray(1).IsEmpty());
  11. Assert.False(new BitArray(new[] { true }).IsEmpty());
  12. Assert.True(new BitArray(new[] { false }).IsEmpty());
  13. var bitArray = new BitArray(new[] { true });
  14. bitArray.Set(0, false);
  15. Assert.True(bitArray.IsEmpty());
  16. }
  17. }
  18. }