From acea7b2e728787a0d83bbf83c8c1f042d2c32e7e Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Mon, 3 Jun 2024 10:15:45 +0800 Subject: + plugins project --- .../BitArrayExtensionsTests.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Plugins/MonoGame.Extended/tests/MonoGame.Extended.Entities.Tests/BitArrayExtensionsTests.cs (limited to 'Plugins/MonoGame.Extended/tests/MonoGame.Extended.Entities.Tests/BitArrayExtensionsTests.cs') diff --git a/Plugins/MonoGame.Extended/tests/MonoGame.Extended.Entities.Tests/BitArrayExtensionsTests.cs b/Plugins/MonoGame.Extended/tests/MonoGame.Extended.Entities.Tests/BitArrayExtensionsTests.cs new file mode 100644 index 0000000..44ec4af --- /dev/null +++ b/Plugins/MonoGame.Extended/tests/MonoGame.Extended.Entities.Tests/BitArrayExtensionsTests.cs @@ -0,0 +1,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()); + } + } +} \ No newline at end of file -- cgit v1.1-26-g67d0