The method testNullPointerOnTwinValue In class ComposedDecimalNullPointerTest asserts the template message. According to the data.xml and “FASTTestTemplate.xml” template, I write another testcase to track the encoding process step by step and compare the binary bytes with file messages.fast.
From the data.xml, there are three MDIncRefresh messages. The values of field SendingTime in these messages are 20061101132712123,
20061101132712187 and 20061101132712204.In the template definition is "<int64 name="SendingTime" id="52"> <delta/> </int64>", this field's presence is mandatory, operator is delta, the data type is int64.Initially, the prior value status is undefined, the default base vaule is 0. So the transffered value is 20061101132712123, the binary encoding is:
00100011 01010001 00101110 01110001 00110110 01000110 00010001 10111011, But from the message.fast the binary encoding is:
00100011 01010001 00101110 01110001 00110110 01000110 00010001 10111100
Maybe it's optional, and the postive integer will be add 1 before encoded. The clauses "assertEquals(20061101132712123L, msg.getLong("SendingTime"));" and " assertEquals(20061101132712187L, msg.getLong("SendingTime"));" are failed.
|