package icsevent import ( "fmt" "testing" "gitlab.com/ics_cinnamon/voiceStatistics/icserror" ) func TestDataStruct(t *testing.T) { var header *RRData header = NewRRData() for i := 0; i < 128; i++ { err := Push(header, i) if err != nil { err.Print() break } } for i := 0; i < 128; i++ { var data interface{} var err *icserror.IcsError //fmt.Printf("%p\n", header) header, data, err = Pop(header) if err != nil { err.Print() break } fmt.Printf("[%d]>>> %v\n", i, data) } for i := 0; i < 128; i++ { err := Push(header, i) if err != nil { err.Print() break } } for i := 0; i < 128; i++ { var data interface{} var err *icserror.IcsError //fmt.Printf("%p\n", header) header, data, err = Pop(header) if err != nil { err.Print() break } fmt.Printf("[%d]>>> %v\n", i, data) } }