public void SqrtNineInt() { int actual = IntegerMath.Sqrt(9); int expected = 3; Assert.AreEqual(expected, actual); }
public void Sqrt16Int() { int actual = IntegerMath.Sqrt(16); int expected = 4; Assert.AreEqual(expected, actual); }
public void SqrtFourInt() { int actual = IntegerMath.Sqrt(4); int expected = 2; Assert.AreEqual(expected, actual); }
public void SqrtZeroInt() { int actual = IntegerMath.Sqrt(0); int expected = 0; Assert.AreEqual(expected, actual); }
public void SqrtMaxLong() { long actual = IntegerMath.Sqrt(long.MaxValue); long expected = 3037000499L; Assert.AreEqual(expected, actual); }
public void SqrtMaxUlong() { ulong actual = IntegerMath.Sqrt(ulong.MaxValue); ulong expected = 4294967295; Assert.AreEqual(expected, actual); }
public void Sqrt16Long() { long actual = IntegerMath.Sqrt(16L); long expected = 4L; Assert.AreEqual(expected, actual); }
public void SqrtMidHighLong() { long actual = IntegerMath.Sqrt(3037000499L); long expected = 55108L; Assert.AreEqual(expected, actual); }
public void SqrtFourLong() { long actual = IntegerMath.Sqrt(4L); long expected = 2L; Assert.AreEqual(expected, actual); }
public void SqrtNineLong() { long actual = IntegerMath.Sqrt(9L); long expected = 3L; Assert.AreEqual(expected, actual); }
public void SqrtTwoLong() { long actual = IntegerMath.Sqrt(2L); long expected = 1L; Assert.AreEqual(expected, actual); }
public void SqrtZeroLong() { long actual = IntegerMath.Sqrt(0L); long expected = 0L; Assert.AreEqual(expected, actual); }
public void SqrtMaxInt() { int actual = IntegerMath.Sqrt(int.MaxValue); int expected = 46340; Assert.AreEqual(expected, actual); }
public void SqrtTwoInt() { int actual = IntegerMath.Sqrt(2); int expected = 1; Assert.AreEqual(expected, actual); }
public void Sqrt16Ulong() { ulong value = 16; ulong actual = IntegerMath.Sqrt(value); ulong expected = 4; Assert.AreEqual(expected, actual); }
public void Sqrt16Short() { short value = 16; short actual = IntegerMath.Sqrt(value); short expected = 4; Assert.AreEqual(expected, actual); }
public void Sqrt16Sbyte() { sbyte value = 16; sbyte actual = IntegerMath.Sqrt(value); sbyte expected = 4; Assert.AreEqual(expected, actual); }
public void Sqrt10BigInteger() { BigInteger actual = 10; actual = IntegerMath.Sqrt(actual); BigInteger expected = 3; Assert.AreEqual(expected, actual); }
public void SqrtLargeBigInteger1() { BigInteger actual = long.MaxValue; actual = IntegerMath.Sqrt((actual * actual) + 27); BigInteger expected = long.MaxValue; Assert.AreEqual(expected, actual); }
public void SqrtExceptionLong() { Assert.ThrowsException <ArgumentOutOfRangeException>(() => IntegerMath.Sqrt(-1L)); }