@@ -212,7 +212,7 @@ func TestExtractDataElement(t *testing.T) {
212
212
{name : "MiUint64" , data : []byte {0x11 , 0x22 , 0x33 , 0x44 , 0x11 , 0x22 , 0x33 , 0x44 }, order : binary .LittleEndian , dataType : MiUint64 , numberOfBytes : 8 , step : 8 , ele : 4914309075945333265 },
213
213
{name : "MiDouble" , data : []byte {0x11 , 0x22 , 0x33 , 0x44 , 0x11 , 0x22 , 0x33 , 0x44 }, order : binary .LittleEndian , dataType : MiDouble , numberOfBytes : 8 , step : 8 , ele : 3.529429556587807e+20 },
214
214
{name : "MiMatrix" , data : verySimpleMatrix , order : binary .LittleEndian , dataType : MiMatrix , numberOfBytes : 1 , step : 144 , ele : []interface {}{MatMatrix {Name : "MaTrIx" , Flags : 0x6 , Class : 0x6 , Dim : Dim {X : 3 , Y : 3 , Z : 0 }, Content : NumPrt {RealPart : []interface {}{1 , 0 , 1 , 0 , 1 , 0 , 1 , 0 , 1 }, ImaginaryPart : interface {}(nil )}}}},
215
- {name : "MiStruct" , data : verySimpleStruct , order : binary .LittleEndian , dataType : MiMatrix , numberOfBytes : 1 , step : 344 , ele : []interface {}{MatMatrix {Name : "testing_struct" , Flags : 0x2 , Class : 0x2 , Dim : Dim {X : 1 , Y : 1 , Z : 0 }, Content : StructPrt {FieldNames : []string {"field1\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 " , "field2\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 " }, FieldValues : map [string ][]interface {}{"field1\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 " : []interface {}{MatMatrix {Name : "" , Flags : 0x6 , Class : 0x6 , Dim : Dim {X : 1 , Y : 1 , Z : 0 }, Content : NumPrt {RealPart : []interface {}{1 }, ImaginaryPart : interface {}(nil )}}}, "field2\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 " : []interface {}{MatMatrix {Name : "" , Flags : 0x6 , Class : 0x6 , Dim : Dim {X : 1 , Y : 1 , Z : 0 }, Content : NumPrt {RealPart : []interface {}{2 }, ImaginaryPart : interface {}(nil )}}}}}}}},
215
+ {name : "MiStruct" , data : verySimpleStruct , order : binary .LittleEndian , dataType : MiMatrix , numberOfBytes : 1 , step : 344 , ele : []interface {}{MatMatrix {Name : "testing_struct" , Flags : 0x2 , Class : 0x2 , Dim : Dim {X : 1 , Y : 1 , Z : 0 }, Content : StructPrt {FieldNames : []string {"field1\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 " , "field2\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 " }, FieldValues : map [string ][]interface {}{"field1\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 " : {MatMatrix {Name : "" , Flags : 0x6 , Class : 0x6 , Dim : Dim {X : 1 , Y : 1 , Z : 0 }, Content : NumPrt {RealPart : []interface {}{1 }, ImaginaryPart : interface {}(nil )}}}, "field2\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 " : {MatMatrix {Name : "" , Flags : 0x6 , Class : 0x6 , Dim : Dim {X : 1 , Y : 1 , Z : 0 }, Content : NumPrt {RealPart : []interface {}{2 }, ImaginaryPart : interface {}(nil )}}}}}}}},
216
216
{name : "Mi3dMatrix" , data : verySimple3DMatrix , order : binary .LittleEndian , dataType : MiMatrix , numberOfBytes : 1 , step : 1048 , ele : []interface {}{MatMatrix {Name : "matrix3d" , Flags : 0x806 , Class : 0x6 , Dim : Dim {X : 3 , Y : 4 , Z : 5 }, Content : NumPrt {RealPart : []interface {}{42 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }, ImaginaryPart : []interface {}{1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }}}}},
217
217
{name : "MiCell" , data : verySimpleCell , order : binary .LittleEndian , dataType : MiMatrix , numberOfBytes : 1 , step : 128 , ele : []interface {}{MatMatrix {Name : "cell" , Flags : 0x1 , Class : 0x1 , Dim : Dim {X : 1 , Y : 1 , Z : 3 }, Content : CellPrt {Cells : []MatMatrix {{Name : "" , Flags : 0x6 , Class : 0x6 , Dim : Dim {X : 0 , Y : 0 , Z : 0 }, Content : NumPrt {RealPart : []interface {}(nil ), ImaginaryPart : interface {}(nil )}}, {Name : "" , Flags : 0x6 , Class : 0x6 , Dim : Dim {X : 0 , Y : 0 , Z : 0 }, Content : NumPrt {RealPart : []interface {}(nil ), ImaginaryPart : interface {}(nil )}}, {Name : "" , Flags : 0x6 , Class : 0x6 , Dim : Dim {X : 0 , Y : 0 , Z : 0 }, Content : NumPrt {RealPart : []interface {}(nil ), ImaginaryPart : interface {}(nil )}}}}}}},
218
218
{name : "MxCharClass" , data : verySimpleChar , order : binary .LittleEndian , dataType : MiMatrix , numberOfBytes : 1 , step : 160 , ele : []interface {}{MatMatrix {Name : "coll2" , Flags : 0x4 , Class : 0x4 , Dim : Dim {X : 3 , Y : 13 , Z : 0 }, Content : CharPrt {Chars : []string {"string1 " , "STRING2 " , "# a b c d e f" }}}}},
0 commit comments