コード例 #1
0
        private static void CheckDouble(double expectedValue, int expectedSize)
        {
            IFieldWriter writer = new FieldWriter();

            writer.Write(expectedValue);

            IFieldReader reader      = new FieldReader(writer.ToArray());
            double       actualValue = reader.ReadDouble();

            Assert.AreEqual(expectedValue, actualValue, "Expected deserialized value ");
            Assert.AreEqual(expectedSize, writer.Position, "Unexpected size for {0} ", expectedValue);
        }