(Set)InBandFEC - changed tests to use bool instead of int
This commit is contained in:
parent
865db73fad
commit
26bb951aeb
|
@ -266,8 +266,7 @@ func TestEncoder_SetGetInBandFEC(t *testing.T) {
|
|||
t.Errorf("Error creating new encoder: %v", err)
|
||||
}
|
||||
|
||||
|
||||
if err := enc.SetInBandFEC(1); err != nil {
|
||||
if err := enc.SetInBandFEC(true); err != nil {
|
||||
t.Error("Error setting fec:", err)
|
||||
}
|
||||
|
||||
|
@ -275,11 +274,11 @@ func TestEncoder_SetGetInBandFEC(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Error("Error getting fec", err)
|
||||
}
|
||||
if fec !=1{
|
||||
t.Error("Wrong fec value ")
|
||||
if !fec {
|
||||
t.Errorf("Wrong fec value. Expected %t", true)
|
||||
}
|
||||
|
||||
if err := enc.SetInBandFEC(0); err != nil {
|
||||
if err := enc.SetInBandFEC(false); err != nil {
|
||||
t.Error("Error setting fec:", err)
|
||||
}
|
||||
|
||||
|
@ -287,8 +286,8 @@ func TestEncoder_SetGetInBandFEC(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Error("Error getting fec", err)
|
||||
}
|
||||
if fec !=0{
|
||||
t.Error("Wrong fec value")
|
||||
if fec {
|
||||
t.Errorf("Wrong fec value. Expected %t", false)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ func TestCodecFEC(t *testing.T) {
|
|||
t.Fatalf("Error creating new encoder: %v", err)
|
||||
}
|
||||
enc.SetPacketLossPerc(30)
|
||||
enc.SetInBandFEC(1)
|
||||
enc.SetInBandFEC(true)
|
||||
|
||||
dec, err := NewDecoder(SAMPLE_RATE, 1)
|
||||
if err != nil || dec == nil {
|
||||
|
@ -191,7 +191,7 @@ func TestCodecFECFloat32(t *testing.T) {
|
|||
t.Fatalf("Error creating new encoder: %v", err)
|
||||
}
|
||||
enc.SetPacketLossPerc(30)
|
||||
enc.SetInBandFEC(1)
|
||||
enc.SetInBandFEC(true)
|
||||
|
||||
dec, err := NewDecoder(SAMPLE_RATE, 1)
|
||||
if err != nil || dec == nil {
|
||||
|
|
Loading…
Reference in a new issue