public void Test05() { double [] input = { Double.MaxValue, Double.MinValue, Double.NegativeInfinity, Double.PositiveInfinity, 0.0D }; byte [] expectedResult = { (byte)((SECSItemFormatCodeFunctions.GetNumberFromSECSItemFormatCode(SECSItemFormatCode.F8) << 2) | 0x03), 0, 0, 40, 127, 0xEF, 255, 255, 255, 255, 255, 255, 255, 0XEF, 255, 255, 255, 255, 255, 255, 255, 0xF0, 0, 0, 0, 0, 0, 0, 127, 0xF0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; F8ArraySECSItem secsItem = new F8ArraySECSItem(input, SECSItemNumLengthBytes.THREE); Assert.AreEqual(secsItem.ToRawSECSItem(), expectedResult); }
public void test06() { double[] input = { Double.MaxValue, Double.MinValue, Double.NegativeInfinity, Double.PositiveInfinity, 0.0D }; byte[] expectedResult = { (byte)((SECSItemFormatCodeFunctions.getNumberFromSECSItemFormatCode(SECSItemFormatCode.F8) << 2) | 0x02), 0, 40, 127, 0xEF, 255, 255, 255, 255, 255, 255, 255, 0XEF, 255, 255, 255, 255, 255, 255, 255, 0xF0, 0, 0, 0, 0, 0, 0, 127, 0xF0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; F8ArraySECSItem secsItem = new F8ArraySECSItem(input, 2); Assert.IsTrue(secsItem.ToRawSECSItem().SequenceEqual(expectedResult)); }