コード例 #1
0
        public void ShiftTest()
        {
            var shifter = ShiftFactory.Create(28);

            Assert.Equal(28, shifter.Shift());
            Assert.Equal(24, shifter.Shift());
            Assert.Equal(20, shifter.Shift());
            Assert.Equal(16, shifter.Shift());
            Assert.Equal(12, shifter.Shift());
            Assert.Equal(8, shifter.Shift());
            Assert.Equal(4, shifter.Shift());
            Assert.Equal(0, shifter.Shift());
            Assert.Equal(0, shifter.Shift());
        }
コード例 #2
0
 protected internal void resetShifter() => shifter = ShiftFactory.Create(size);