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