Wrote roots-ws golang implementation.
This commit is contained in:
21
roots-ws_test.go
Normal file
21
roots-ws_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package roots_ws
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestConnectionStatusConstants(t *testing.T) {
|
||||
seen := make(map[ConnectionStatus]bool)
|
||||
|
||||
constants := []ConnectionStatus{
|
||||
StatusDisconnected,
|
||||
StatusConnecting,
|
||||
StatusConnected,
|
||||
StatusClosing,
|
||||
}
|
||||
|
||||
for i, status := range constants {
|
||||
if seen[status] {
|
||||
t.Errorf("Duplicate value found for constant at index %d: %d", i, status)
|
||||
}
|
||||
seen[status] = true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user