[Test] public void EnumBitIndices() { const string bitstr0 = "100100010100110010110"; var bits0 = Bit.Parse(bitstr0); var bitidxs = new[] { 1, 2, 4, 7, 8, 11, 13, 17, 20 }; var idxs = Bit.EnumBitIndices(bits0).ToArray(); Assert.True(bitidxs.SequenceEqual(idxs)); }