mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-25 01:23:22 +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")
|
||
|
}
|
||
|
}
|