mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 15:16:52 +08:00
Don't use omitempty for ICECandidateInit
Always return sdpMid & sdpMLineindex value if it is null. The W3C starts every attribute definition with `If not null ...`
This commit is contained in:
@@ -215,6 +215,7 @@ func TestICECandidate_ToJSON(t *testing.T) {
|
||||
|
||||
candidateInit := candidate.ToJSON()
|
||||
|
||||
assert.Equal(t, uint16(0), *candidateInit.SDPMLineIndex)
|
||||
var nilUint16Ptr *uint16
|
||||
assert.Equal(t, nilUint16Ptr, candidateInit.SDPMLineIndex)
|
||||
assert.Equal(t, "candidate:foundation 1 udp 128 1.0.0.1 1234 typ host", candidateInit.Candidate)
|
||||
}
|
||||
|
Reference in New Issue
Block a user