mirror of https://bitbucket.org/ausocean/av.git
Nal struct complete
This commit is contained in:
parent
49d57f3a28
commit
d6f82fd518
|
@ -201,7 +201,8 @@ func TestNalFragmentParsing(t *testing.T) {
|
||||||
}
|
}
|
||||||
for ii := range fields {
|
for ii := range fields {
|
||||||
if !reflect.DeepEqual(fields[ii],expectedParsing[ii]) {
|
if !reflect.DeepEqual(fields[ii],expectedParsing[ii]) {
|
||||||
t.Errorf("Bad Parsing! Field: %v wanted: %v got: %v\n",ii,expectedParsing[ii],fields[ii])
|
t.Errorf("Bad Parsing! Field: %v wanted: %v got: %v\n",ii,expectedParsing[ii],
|
||||||
|
fields[ii])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,13 +227,40 @@ func TestNalFragmentType(t *testing.T){
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNalSpsPpsParsing(t *testing.T){
|
func TestNalSpsPpsParsing(t *testing.T){
|
||||||
NalSps := ParseNALSpsPps(parseInput)
|
nalSpsPps := ParseNALSpsPps(parseInput)
|
||||||
|
for ii := range parseInput {
|
||||||
|
if nalSpsPps.Data[ii] != parseInput[ii] {
|
||||||
|
t.Errorf("Bad Parsing! Byte: %v wanted: %v got: %v\n",ii,parseInput[ii],
|
||||||
|
nalSpsPps.Data[ii])
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNalSpsPpsToByteSlice(t *testing.T){
|
func TestNalSpsPpsToByteSlice(t *testing.T){
|
||||||
|
nalSpsPps := ParseNALSpsPps(parseInput)
|
||||||
|
nalSpsPpsByteSlice := nalSpsPps.ToByteSlice()
|
||||||
|
for ii := range parseInput {
|
||||||
|
if nalSpsPpsByteSlice[ii] != parseInput[ii] {
|
||||||
|
t.Errorf("Bad conversion to byte slice! Byte: %v wanted: %v got: %v\n",ii,
|
||||||
|
parseInput[ii],nalSpsPpsByteSlice[ii])
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNalSpsPpsType(t *testing.T){
|
func TestNalSpsPpsType(t *testing.T){
|
||||||
|
nalSpsPps := ParseNALSpsPps(parseInput)
|
||||||
|
if nalSpsPps.GetType() != nalTestType {
|
||||||
|
t.Errorf("Returned wrong type!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*******************************************************
|
||||||
|
Pes Packet testing!
|
||||||
|
********************************************************/
|
||||||
|
var pesFieldValues = []interface{}{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var pesExpectedOutput = []byte{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue