Exemple #1
0
        public void Subset()
        {
            var a = new IntInterval(7, 42);
            var b = new IntInterval(10, 20);
            var c = new IntInterval(0, 20);
            var d = new IntInterval(10, 100);

            Assert.IsTrue(b.IsSubsetOf(a));
            Assert.IsTrue(b.IsProperSubsetOf(a));
            Assert.IsFalse(c.IsSubsetOf(a));
            Assert.IsFalse(c.IsProperSubsetOf(a));
            Assert.IsFalse(d.IsSubsetOf(a));
            Assert.IsFalse(d.IsProperSubsetOf(a));

            // proper
            Assert.IsTrue(a.IsSubsetOf(a));
            Assert.IsFalse(a.IsProperSubsetOf(a));
        }