mirror of
https://github.com/alice-lg/alice-lg.git
synced 2024-05-11 05:55:03 +00:00
22 lines
314 B
Go
22 lines
314 B
Go
package birdwatcher
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestIsProtocolUp(t *testing.T) {
|
|
tests := map[string]bool{
|
|
"up": true,
|
|
"uP": true,
|
|
"Up": true,
|
|
"UP": true,
|
|
"down": false,
|
|
}
|
|
|
|
for up, expected := range tests {
|
|
if isProtocolUp(up) != expected {
|
|
t.Error("f(", up, ") != ", expected)
|
|
}
|
|
}
|
|
}
|