Beispiel #1
0
        public void RollSetXTest()
        {
            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.RollSetX(4);
            Assert.AreEqual(cs.T, 1);
            Assert.AreEqual(cs.Z, 2);
            Assert.AreEqual(cs.Y, 3);
            Assert.AreEqual(cs.X, 4);
        }
 private void OpBtn_dup(object sender, RoutedEventArgs e)
 {
     cs.RollSetX(cs.X);
     UpdateNumberField();
 }