mirror of https://bitbucket.org/ausocean/av.git
revid: unexported buf in sender within mtsSender_test.go
This commit is contained in:
parent
74110dee31
commit
b3f2439c5b
|
@ -52,7 +52,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
type sender struct {
|
type sender struct {
|
||||||
Buf [][]byte
|
buf [][]byte
|
||||||
tstDiscon bool
|
tstDiscon bool
|
||||||
disconAt int
|
disconAt int
|
||||||
curPktNo int
|
curPktNo int
|
||||||
|
@ -65,7 +65,7 @@ func (ts *sender) send(d []byte) error {
|
||||||
}
|
}
|
||||||
cpy := make([]byte, len(d))
|
cpy := make([]byte, len(d))
|
||||||
copy(cpy, d)
|
copy(cpy, d)
|
||||||
ts.Buf = append(ts.Buf, cpy)
|
ts.buf = append(ts.buf, cpy)
|
||||||
ts.curPktNo++
|
ts.curPktNo++
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ func TestSegment(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result := tstSender.Buf
|
result := tstSender.buf
|
||||||
expectData := 0
|
expectData := 0
|
||||||
for clipNo, clip := range result {
|
for clipNo, clip := range result {
|
||||||
t.Logf("Checking clip: %v\n", clipNo)
|
t.Logf("Checking clip: %v\n", clipNo)
|
||||||
|
@ -227,7 +227,7 @@ func TestSendFailDiscontinuity(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result := tstSender.Buf
|
result := tstSender.buf
|
||||||
|
|
||||||
// First check that we have less clips
|
// First check that we have less clips
|
||||||
expectedLen := (((noOfPacketsToWrite/psiSendCount)*2 + noOfPacketsToWrite) / psiSendCount) - 1
|
expectedLen := (((noOfPacketsToWrite/psiSendCount)*2 + noOfPacketsToWrite) / psiSendCount) - 1
|
||||||
|
|
Loading…
Reference in New Issue