Beispiel #1
0
            public void UInt32_ShouldReturnExpectedResult(uint offset, int boundary, uint expected)
            {
                // Act
                var actual = BinaryMath.Align(offset, boundary);

                // Assert
                Assert.Equal(expected, actual);
            }
Beispiel #2
0
            public void Int64_ShouldReturnExpectedResult(long offset, int boundary, long expected)
            {
                // Act
                var actual = BinaryMath.Align(offset, boundary);

                // Assert
                Assert.Equal(expected, actual);
            }
Beispiel #3
0
            public void UInt32_ShouldThrowOverflowException_OnOverflow()
            {
                // Act
                var exception = Record.Exception(() =>
                {
                    BinaryMath.Align(UInt32.MaxValue, 7);
                });

                // Assert
                Assert.IsType <OverflowException>(exception);
            }