예제 #1
0
        public void CalcComplexAddition()
        {
            var source = new StringSource(@"calc(50% + 3px / 2em + -1cm)");
            var calc   = CalcParser.ParseCalc(source);

            Assert.AreEqual("calc(50% + 3px / 2em + -1cm)", calc.CssText);
        }
예제 #2
0
        public void CalcSimpleAddition()
        {
            var source = new StringSource(@"calc(5 + 3)");
            var calc   = CalcParser.ParseCalc(source);

            Assert.AreEqual("calc(5 + 3)", calc.CssText);
        }
예제 #3
0
        public void CalcAdditionWithCalcBracket()
        {
            var source = new StringSource(@"calc(5 + calc(3 + 7))");
            var calc   = CalcParser.ParseCalc(source);

            Assert.AreEqual("calc(5 + 3 + 7)", calc.CssText);
        }
예제 #4
0
        public void CalcSimpleLength()
        {
            var source = new StringSource(@"calc(5px)");
            var calc   = CalcParser.ParseCalc(source);

            Assert.AreEqual("calc(5px)", calc.CssText);
        }