Esempio n. 1
0
        public void MemSubTest()
        {
            OwnMath.memDel();

            //check memSub(int a)
            OwnMath.memSub(10);
            Assert.AreEqual(-10, OwnMath.memLoad());
            OwnMath.memAdd(-5);
            Assert.AreEqual(-15, OwnMath.memLoad());

            //check memSub(double a)
            OwnMath.memDel();
            OwnMath.memSub(10.5);
            Assert.AreEqual(-10.5, OwnMath.memLoad());
            OwnMath.memSub(5.5);
            Assert.AreEqual(-16, OwnMath.memLoad());

            OwnMath.memDel();
        }
Esempio n. 2
0
 private void ButtonMemoryminus_Click(object sender, EventArgs e)
 {
     OwnMath.memSub(ParseNumber(UserInput.Text));
 }