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