Exemplo n.º 1
0
        public void ParseValue_Nullable()
        {
            // arrange
            var    type  = new FloatType();
            double?input = 123;

            // act
            FloatValueNode output = (FloatValueNode)type.ParseValue(input);

            // assert
            Assert.Equal(123, output.ToDouble());
        }
Exemplo n.º 2
0
        public void ParseLiteral_ExponentialLiteral()
        {
            // arrange
            var            type    = new FloatType();
            FloatValueNode literal = CreateExponentialLiteral();

            // act
            var value = type.ParseLiteral(literal);

            // assert
            Assert.IsType <double>(value);
            Assert.Equal(literal.ToDouble(), value);
        }