summaryrefslogtreecommitdiff
path: root/Plugins/MonoGame.Extended/tests/MonoGame.Extended.Entities.Tests/BitArrayExtensionsTests.cs
blob: 44ec4af8bc1769a8be92fa8dfdbe17847902221d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System.Collections;
using Xunit;

namespace MonoGame.Extended.Entities.Tests
{
    public class BitArrayExtensionsTests
    {
        [Fact]
        public void BitArrayIsEmpty()
        {
            Assert.True(new BitArray(1).IsEmpty());
            Assert.False(new BitArray(new[] { true }).IsEmpty());
            Assert.True(new BitArray(new[] { false }).IsEmpty());

            var bitArray = new BitArray(new[] { true });
            bitArray.Set(0, false);
            Assert.True(bitArray.IsEmpty());
        }
    }
}