public void same_vector_reference_has_same_hashcode_when_changed()
            {
                var m = new VectorF(2);

                m.Set(0, 9);
                m.Set(1, -8);
                var expectedHashCode = m.GetHashCode();

                m.Set(0, 4);
                m.Set(1, 19);

                Assert.Equal(expectedHashCode, m.GetHashCode());
            }
示例#2
0
 public void HashCodeTest()
 {
     VectorF v = new VectorF(new float[] { 1, 2, 3, 4, 5 });
       VectorF one = new VectorF(5, 1.0f);
       Assert.AreNotEqual(one.GetHashCode(), v.GetHashCode());
 }