mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-12 01:40:40 +01:00
25 lines
361 B
Go
25 lines
361 B
Go
|
package android
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func TestDNSList_Get(t *testing.T) {
|
||
|
l := DNSList{
|
||
|
items: make([]string, 1),
|
||
|
}
|
||
|
|
||
|
_, err := l.Get(0)
|
||
|
if err != nil {
|
||
|
t.Errorf("invalid error: %s", err)
|
||
|
}
|
||
|
|
||
|
_, err = l.Get(-1)
|
||
|
if err == nil {
|
||
|
t.Errorf("expected error but got nil")
|
||
|
}
|
||
|
|
||
|
_, err = l.Get(1)
|
||
|
if err == nil {
|
||
|
t.Errorf("expected error but got nil")
|
||
|
}
|
||
|
}
|