mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
@@ -61,6 +61,7 @@ Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contribu
|
||||
* [ZHENK](https://github.com/scorpionknifes)
|
||||
* [Assad Obaid](https://github.com/assadobaid)
|
||||
* [Antoine Baché](https://github.com/Antonito)
|
||||
* [Will Forcey](https://github.com/wawesomeNOGUI)
|
||||
|
||||
### License
|
||||
MIT License - see [LICENSE](LICENSE) for full text
|
||||
|
||||
@@ -26,6 +26,10 @@ type candidatePair struct {
|
||||
}
|
||||
|
||||
func (p *candidatePair) String() string {
|
||||
if p == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return fmt.Sprintf("prio %d (local, prio %d) %s <-> %s (remote, prio %d)",
|
||||
p.Priority(), p.local.Priority(), p.local, p.remote, p.remote.Priority())
|
||||
}
|
||||
|
||||
@@ -122,3 +122,11 @@ func TestCandidatePairEquality(t *testing.T) {
|
||||
t.Fatalf("Expected %v to equal %v", pairA, pairB)
|
||||
}
|
||||
}
|
||||
|
||||
func TestNilCandidatePairString(t *testing.T) {
|
||||
var nilCandidatePair *candidatePair
|
||||
|
||||
if res := nilCandidatePair.String(); res != "" {
|
||||
t.Fatalf("Expected %v to equal %v", res, "")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user