public void ThrowStatementHasProperties() { var statement = new ThrowStatement(null); statement.Expression = 1; Assert.AreEqual(JS.Number(1), statement.Expression); Assert.AreEqual("throw 1;", statement.ToString()); }
public void ThrowStatementHasProperties() { var statement = new ThrowStatement(null); statement.Expression = 1; Assert.AreEqual(JS.Number(1), statement.Expression); Assert.AreEqual("throw 1;", statement.ToString()); }
public void ThrowStatementRequiresExpression() { var statement = new ThrowStatement(null); Expect.Throw <InvalidOperationException>(() => statement.ToString()); }
public void ThowStatementProducesThrow() { var statement = new ThrowStatement(1); Assert.AreEqual("throw 1;", statement.ToString()); }
public void ThrowStatementRequiresExpression() { var statement = new ThrowStatement(null); Expect.Throw<InvalidOperationException>(() => statement.ToString()); }
public void ThowStatementProducesThrow() { var statement = new ThrowStatement(1); Assert.AreEqual("throw 1;", statement.ToString()); }