Beispiel #1
0
        public void ClearTest()
        {
            BddTable target = new BddTable();

            target.Add(657, 6, 6, 6);
            target.Clear();
            Assert.AreEqual(0, target.Count);
        }
Beispiel #2
0
        public static void CheckT()
        {
            BddTable table = new BddTable(0x200000);

            for (int i = 2; i < int.MaxValue; i++)
            {
                table.Add(i, i, i, i);
            }
        }
Beispiel #3
0
        public void CountTest()
        {
            BddTable target = new BddTable();

            int val = 0;

            Assert.AreEqual(val, target.Count, "BddSharp.Kernel.BddTable.Count was not set correctly.");
            target.Add(5634, 5, 6, 8);
            val = 1;
            Assert.AreEqual(val, target.Count, "BddSharp.Kernel.BddTable.Count was not set correctly.");
        }
Beispiel #4
0
        public void RemoveTest()
        {
            BddTable target = new BddTable(2);

            int u = 0; // TODO: Initialize to an appropriate value

            target.Add(u, 5, 6, 7);
            target.Remove(u);
            int result = target.Count;

            Assert.AreEqual(0, result);
        }
Beispiel #5
0
        public void ContainsKeyTest()
        {
            BddTable target = new BddTable();
            int      u      = 3275;

            target.Add(u, 5, 6, 8);

            bool expected = true;
            bool actual;

            actual = target.ContainsKey(u);

            Assert.AreEqual(expected, actual, "BddSharp.Kernel.BddTable.ContainsKey did not return the expected value.");
        }
Beispiel #6
0
        public void AddTestAndItemTest()
        {
            BddTable target = new BddTable();

            int u    = 567;
            int high = 3;
            int low  = 4;
            int var  = 5;

            target.Add(u, low, high, var);
            BddNode actual = target[u];

            Assert.AreEqual(actual.high, high, "Adding nodes is not correct");
            Assert.AreEqual(actual.low, low, "Adding nodes is not correct");
            Assert.AreEqual(actual.var, var, "Adding nodes is not correct");
        }
Beispiel #7
0
        public void FillDegreeTest()
        {
            BddTable target = new BddTable(2);

            int expected = 0;
            int actual;

            actual = target.FillDegree();

            Assert.AreEqual(expected, actual, "BddSharp.Kernel.BddTable.FillDegree did not return the expected value.");

            target.Add(6, 78, 45, 33);

            bool result = target.FillDegree() > 0;

            Assert.AreEqual(true, result, "BddSharp.Kernel.BddTable.FillDegree did not return the expected value.");
        }