mirror of
				https://github.com/pion/webrtc.git
				synced 2025-10-31 18:52:55 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			559 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			559 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package webrtc
 | |
| 
 | |
| import (
 | |
| 	"testing"
 | |
| 
 | |
| 	"github.com/pions/webrtc/internal/sdp"
 | |
| )
 | |
| 
 | |
| func TestSetRemoteDescription(t *testing.T) {
 | |
| 	testCases := []struct {
 | |
| 		desc RTCSessionDescription
 | |
| 	}{
 | |
| 		{RTCSessionDescription{RTCSdpTypeOffer, sdp.NewJSEPSessionDescription("", false).Marshal()}},
 | |
| 	}
 | |
| 
 | |
| 	for i, testCase := range testCases {
 | |
| 		peerConn, err := New(RTCConfiguration{})
 | |
| 		if err != nil {
 | |
| 			t.Errorf("Case %d: got error: %v", i, err)
 | |
| 		}
 | |
| 		err = peerConn.SetRemoteDescription(testCase.desc)
 | |
| 		if err != nil {
 | |
| 			t.Errorf("Case %d: got error: %v", i, err)
 | |
| 		}
 | |
| 	}
 | |
| }
 | 
