mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-13 02:10:56 +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")
|
||
|
}
|
||
|
}
|