Esempio n. 1
0
        public void RangeHashCode_ReferenceTypes()
        {
            NpgsqlRange <string> a = default;
            NpgsqlRange <string> b = NpgsqlRange <string> .Empty;
            NpgsqlRange <string> c = NpgsqlRange <string> .Parse("(,)");

            Assert.IsFalse(a.Equals(b));
            Assert.IsFalse(a.Equals(c));
            Assert.IsFalse(b.Equals(c));
            Assert.AreNotEqual(a.GetHashCode(), b.GetHashCode());
            Assert.AreNotEqual(a.GetHashCode(), c.GetHashCode());
            Assert.AreNotEqual(b.GetHashCode(), c.GetHashCode());
        }
Esempio n. 2
0
        public void RangeHashCode_ValueTypes()
        {
            NpgsqlRange <int> a = default;
            NpgsqlRange <int> b = NpgsqlRange <int> .Empty;
            NpgsqlRange <int> c = NpgsqlRange <int> .Parse("(,)");

            Assert.IsFalse(a.Equals(b));
            Assert.IsFalse(a.Equals(c));
            Assert.IsFalse(b.Equals(c));
            Assert.AreNotEqual(a.GetHashCode(), b.GetHashCode());
            Assert.AreNotEqual(a.GetHashCode(), c.GetHashCode());
            Assert.AreNotEqual(b.GetHashCode(), c.GetHashCode());
        }