Пример #1
0
        public void VectorExpression3()
        {
            var e = new VectorExpression(new StringLiteral("a"));

            Assert.IsFalse(e.IsTrivial);
            Assert.AreEqual("(\"a\")", e.ToString());
            AssertExtensions.AreEqualValues(e, e.TryFold());
        }
Пример #2
0
        public void VectorExpression7()
        {
            var e = new VectorExpression(new Literal("a"), new Literal("b"), new Literal("c"));

            Assert.IsFalse(e.IsTrivial);
            Assert.AreEqual("(a, b, c)", e.ToString());
            AssertExtensions.AreEqualValues(new Literal("a, b, c"), e.TryFold());
        }
Пример #3
0
        public void VectorExpression1()
        {
            var e = new VectorExpression();

            Assert.IsFalse(e.IsTrivial);
            Assert.Throws <InvalidOperationException>(() => e.ToString());
            Assert.Throws <InvalidOperationException>(() => e.TryFold());
        }