You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
855 B
Go

2 years ago
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)
}
}