public void ThrowStatementHasProperties()
        {
            var statement = new ThrowStatement(null);

            statement.Expression = 1;

            Assert.AreEqual(JS.Number(1), statement.Expression);
            Assert.AreEqual("throw 1;", statement.ToString());
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 5
0
        public void ThrowStatementRequiresExpression()
        {
            var statement = new ThrowStatement(null);

            Expect.Throw<InvalidOperationException>(() => statement.ToString());
        }
Ejemplo n.º 6
0
        public void ThowStatementProducesThrow()
        {
            var statement = new ThrowStatement(1);

            Assert.AreEqual("throw 1;", statement.ToString());
        }