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