Exemplo n.º 1
0
        public void TestFromFloatSubZeroDecimal()
        {
            const float expected = -1.007147101f;
            var         fl       = FloatOperations.FromFloat(expected);

            Assert.AreEqual(expected, fl.ToDecimal());
        }
Exemplo n.º 2
0
        public void TestFromFloatSubOneDecimal()
        {
            const float expected = 0.0013581f;
            var         fl       = FloatOperations.FromFloat(expected);

            Assert.AreEqual(expected, fl.ToDecimal());
        }
Exemplo n.º 3
0
        public void TestFromFloatNegative()
        {
            const float expected = -1015f;
            var         fl       = FloatOperations.FromFloat(expected);

            Assert.AreEqual(expected, fl.ToDecimal());
        }
Exemplo n.º 4
0
        public void TestFromFloatDecimalNumber()
        {
            const float expected = 18.000481f;
            var         fl       = FloatOperations.FromFloat(expected);

            Assert.AreEqual(expected, fl.ToDecimal());
        }