public void ReturnStatementProducesReturnWithValue() { var statement = new ReturnStatement(3); Assert.AreEqual(3, statement.Value); Assert.AreEqual("return 3;", statement.ToString()); statement.Value = "Yes!"; Assert.AreEqual("return \"Yes!\";", statement.ToString()); }
public void ReturnStatementProducesReturnWithValue() { var statement = new ReturnStatement(3); Assert.AreEqual(3, statement.Value); Assert.AreEqual("return 3;", statement.ToString()); statement.Value = "Yes!"; Assert.AreEqual("return \"Yes!\";", statement.ToString()); }
public void ReturnStatementProducesReturnWithoutValue() { var statement = new ReturnStatement(); Assert.AreEqual("return;", statement.ToString()); }
public void ReturnStatementProducesReturnWithoutValue() { var statement = new ReturnStatement(); Assert.AreEqual("return;", statement.ToString()); }