コード例 #1
0
        public void IdentifyMultiplicationCode()
        {
            var input        = "2,3,11,0";
            var intProcessor = new IntCodeProcessor(input);

            OpCodes actual = intProcessor.FindOperation(0);

            actual.ShouldBe(OpCodes.Multiplication);
        }
コード例 #2
0
        public void IdentifyStopCode()
        {
            var input        = "99,30,40,50";
            var intProcessor = new IntCodeProcessor(input);

            OpCodes actual = intProcessor.FindOperation(0);

            actual.ShouldBe(OpCodes.Stop);
        }
コード例 #3
0
        public void IdentifyAdditionCode()
        {
            var input        = "1,9,10,3";
            var intProcessor = new IntCodeProcessor(input);

            OpCodes actual = intProcessor.FindOperation(0);

            actual.ShouldBe(OpCodes.Addition);
        }