MCPcopy Create free account
hub / github.com/pion/ice / TestConnectedState_String

Function TestConnectedState_String

ice_test.go:12–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestConnectedState_String(t *testing.T) {
13 testCases := []struct {
14 connectionState ConnectionState
15 expectedString string
16 }{
17 {ConnectionStateUnknown, "Invalid"},
18 {ConnectionStateNew, "New"},
19 {ConnectionStateChecking, "Checking"},
20 {ConnectionStateConnected, "Connected"},
21 {ConnectionStateCompleted, "Completed"},
22 {ConnectionStateFailed, "Failed"},
23 {ConnectionStateDisconnected, "Disconnected"},
24 {ConnectionStateClosed, "Closed"},
25 }
26
27 for i, testCase := range testCases {
28 require.Equal(t,
29 testCase.expectedString,
30 testCase.connectionState.String(),
31 "testCase: %d %v", i, testCase,
32 )
33 }
34}
35
36func TestGatheringState_String(t *testing.T) {
37 testCases := []struct {

Callers

nothing calls this directly

Calls 2

EqualMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…