コード例 #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());
        }
コード例 #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);
        }