예제 #1
0
        public void GetDestination_SegmentWithLength_JumpsToDefault()
        {
            // Arrange
            var table = new ZeroEntryJumpTable(0, 1);

            // Act
            var result = table.GetDestination("ignored", new PathSegment(0, 1));

            // Assert
            Assert.Equal(0, result);
        }
예제 #2
0
        public void GetDestination_ZeroLengthSegment_JumpsToExit()
        {
            // Arrange
            var table = new ZeroEntryJumpTable(0, 1);

            // Act
            var result = table.GetDestination("ignored", new PathSegment(0, 0));

            // Assert
            Assert.Equal(1, result);
        }