コード例 #1
0
 public void IsNegativeInfinity()
 {
     Assert.ThrowsExact <AssertionException>(() => Assert.IsNegativeInfinity(float.NaN));
     Assert.ThrowsExact <AssertionException>(() => Assert.IsNegativeInfinity(double.NaN));
     Assert.ThrowsExact <AssertionException>(() => Assert.IsNegativeInfinity(float.PositiveInfinity));
     Assert.DoesNotThrow(() => Assert.IsNegativeInfinity(float.NegativeInfinity));
     Assert.ThrowsExact <AssertionException>(() => Assert.IsNegativeInfinity(1.34f));
     Assert.ThrowsExact <AssertionException>(() => Assert.IsNegativeInfinity(double.PositiveInfinity));
     Assert.DoesNotThrow(() => Assert.IsNegativeInfinity(double.NegativeInfinity));
     Assert.ThrowsExact <AssertionException>(() => Assert.IsNegativeInfinity(1.34d));
 }