Beispiel #1
0
        public void BIntCompareNull()
        {
            BInt a = new BInt(10);
            BInt other = null;

            int result = a.CompareTo(other);
        }
Beispiel #2
0
        public void BIntCompare()
        {
            BInt a = new BInt(10);

            BInt b = new BInt(11);
            Assert.AreEqual(-1, a.CompareTo(b));
            Assert.AreEqual(-1, a.CompareTo(b.Value));

            b.Value = 9;
            Assert.AreEqual(1, a.CompareTo(b));
            Assert.AreEqual(1, a.CompareTo(b.Value));

            b.Value = 10;
            Assert.AreEqual(0, a.CompareTo(b));
            Assert.AreEqual(0, a.CompareTo(b.Value));
        }