Esempio n. 1
0
        public void DropSetXTest()
        {
            CStack cs = new CStack();

            cs.entry = "1";
            cs.Enter();
            cs.entry = "2";
            cs.Enter();
            cs.entry = "3";
            cs.Enter();

            Assert.AreEqual(cs.T, 0);
            Assert.AreEqual(cs.Z, 1);
            Assert.AreEqual(cs.Y, 2);
            Assert.AreEqual(cs.X, 3);

            cs.DropSetX(4);
            Assert.AreEqual(cs.T, 0);
            Assert.AreEqual(cs.Z, 0);
            Assert.AreEqual(cs.Y, 1);
            Assert.AreEqual(cs.X, 4);
        }