public void Int64_ShouldReturnExpectedResult(long input, long expected) { // Act var actual = BinaryMath.RoundToNextPowerOfTwoOrZero(input); // Assert Assert.Equal(expected, actual); }
public void UInt32_ShouldReturnExpectedResult(uint input, uint expected) { // Act var actual = BinaryMath.RoundToNextPowerOfTwoOrZero(input); // Assert Assert.Equal(expected, actual); }
public void Int64_ShouldThrowOverflowException_OnOverflow() { // Arrange long input = Int64.MaxValue; // Act var exception = Record.Exception(() => { BinaryMath.RoundToNextPowerOfTwoOrZero(input); }); // Assert Assert.IsType <OverflowException>(exception); }