tape: Test that floating point values can be dynamically encoded
This commit is contained in:
parent
785b48085d
commit
8b0915dff1
@ -26,7 +26,9 @@ func TestEncodeAnyTable(test *testing.T) {
|
||||
0x1234: [][]uint16 { []uint16 { 0x5 }, []uint16 { 0x17, 0xAAAA} },
|
||||
0x2345: [][]int16 { []int16 { 0x5 }, []int16 { 0x17, -0xAAA } },
|
||||
0x3456: userDefinedInteger(0x3921),
|
||||
}, KTV.WithCN(0), tu.S(7).AddVar(
|
||||
0x1F1F: float32(67.26),
|
||||
0x0F0F: float64(5.3),
|
||||
}, KTV.WithCN(0), tu.S(9).AddVar(
|
||||
[]byte {
|
||||
0xF3, 0xB9,
|
||||
byte(LSI.WithCN(3)),
|
||||
@ -70,6 +72,16 @@ func TestEncodeAnyTable(test *testing.T) {
|
||||
byte(LSI.WithCN(1)),
|
||||
0x39, 0x21,
|
||||
},
|
||||
[]byte {
|
||||
0x1F, 0x1F,
|
||||
byte(FP.WithCN(3)),
|
||||
0x42, 0x86, 0x85, 0x1F,
|
||||
},
|
||||
[]byte {
|
||||
0x0F, 0x0F,
|
||||
byte(FP.WithCN(7)),
|
||||
0x40, 0x15, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
|
||||
},
|
||||
))
|
||||
if err != nil { test.Fatal(err) }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user