Exemplo n.º 1
0
 public void EqualsTest(NFloat f1, object obj, bool expected)
 {
     if (obj is NFloat f2)
     {
         Assert.Equal(expected, f1.Equals((object)f2));
         Assert.Equal(expected, f1.Equals(f2));
         Assert.Equal(expected, f1.GetHashCode().Equals(f2.GetHashCode()));
     }
     Assert.Equal(expected, f1.Equals(obj));
 }
Exemplo n.º 2
0
        public void NaNEqualsTest()
        {
            NFloat f1 = new NFloat(float.NaN);
            NFloat f2 = new NFloat(float.NaN);

            Assert.Equal(f1.Value.Equals(f2.Value), f1.Equals(f2));
        }