public void MemDelTest() { OwnMath.memDel(); //check memDel() OwnMath.memAdd(25); OwnMath.memDel(); Assert.AreEqual(0, OwnMath.memLoad()); OwnMath.memAdd(-25); OwnMath.memDel(); Assert.AreEqual(0, OwnMath.memLoad()); OwnMath.memDel(); }
public void MemAddTest() { //check memAdd(int a) OwnMath.memDel(); OwnMath.memAdd(10); Assert.AreEqual(10, OwnMath.memLoad()); OwnMath.memAdd(5); Assert.AreEqual(15, OwnMath.memLoad()); //check memAdd(double a) OwnMath.memDel(); OwnMath.memAdd(10.5); Assert.AreEqual(10.5, OwnMath.memLoad()); OwnMath.memAdd(5.5); Assert.AreEqual(16, OwnMath.memLoad()); OwnMath.memDel(); }
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(); }
private void ButtonMR_Click(object sender, EventArgs e) { UserInput.Text = OwnMath.memLoad().ToString(); }