public void DivAssignCalc() { var parameters = new ParameterCollection() { new Parameter("x", 10) }; var div = new DivAssign(new Variable("x"), new Number(2)); var result = div.Calculate(parameters); var expected = 5.0; Assert.AreEqual(expected, result); Assert.AreEqual(expected, parameters["x"]); }
public void NumberDivBoolTest() { var parameters = new ParameterCollection() { new Parameter("x", 2) }; var add = new DivAssign(new Variable("x"), new Bool(true)); add.Calculate(parameters); }
public void BoolDivNumberTest() { var parameters = new ParameterCollection() { new Parameter("x", true) }; var add = new DivAssign(new Variable("x"), new Number(2)); add.Calculate(parameters); }