예제 #1
0
        public void VerticalTest(string signal, long expected)
        {
            var ftt    = new FftStateMachine();
            var result = ftt.Execute(signal.Select(c => (sbyte)(c - 48)).ToArray(), 1).Aggregate(0, (acc, curr) => acc * 10 + curr);

            Assert.Equal(expected, result);
        }
예제 #2
0
        public void StateMachine4Iters()
        {
            var fft = new FftStateMachine();
            var res = fft.Execute("12345678", 4)
                      .Aggregate(0, (acc, curr) => acc * 10 + curr);

            Assert.Equal(01029498, res);
        }
예제 #3
0
 public void Statemachine()
 {
     _sm.Execute(Challenge.Input, 100);
 }