public void BoolDivNumberTest() { var parameters = new ParameterCollection() { new Parameter("x", true) }; var add = new DivAssign(new Variable("x"), new Number(2)); Assert.Throws<NotSupportedException>(() => add.Execute(parameters)); }
public void DivAssignCalc() { var parameters = new ParameterCollection() { new Parameter("x", 10) }; var div = new DivAssign(new Variable("x"), new Number(2)); var result = div.Execute(parameters); var expected = 5.0; Assert.Equal(expected, result); Assert.Equal(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); }