Home | History | Annotate | Download | only in net

Lines Matching refs:ent

66 		for _, ent := range tt.ents {
67 testStaticHost(t, tt.name, ent)
72 func testStaticHost(t *testing.T, hostsPath string, ent staticHostEntry) {
73 ins := []string{ent.in, absDomainName([]byte(ent.in)), strings.ToLower(ent.in), strings.ToUpper(ent.in)}
76 if !reflect.DeepEqual(addrs, ent.out) {
77 t.Errorf("%s, lookupStaticHost(%s) = %v; want %v", hostsPath, in, addrs, ent.out)
135 for _, ent := range tt.ents {
136 testStaticAddr(t, tt.name, ent)
141 func testStaticAddr(t *testing.T, hostsPath string, ent staticHostEntry) {
142 hosts := lookupStaticAddr(ent.in)
143 for i := range ent.out {
144 ent.out[i] = absDomainName([]byte(ent.out[i]))
146 if !reflect.DeepEqual(hosts, ent.out) {
147 t.Errorf("%s, lookupStaticAddr(%s) = %v; want %v", hostsPath, ent.in, hosts, ent.out)
157 ent := staticHostEntry{"localhost", []string{"127.0.0.1", "127.0.0.2", "127.0.0.3"}}
158 testStaticHost(t, testHookHostsPath, ent)
160 addrs := lookupStaticHost(ent.in)
164 testStaticHost(t, testHookHostsPath, ent)
167 ent = staticHostEntry{"::1", []string{"localhost"}}
168 testStaticAddr(t, testHookHostsPath, ent)
170 hosts := lookupStaticAddr(ent.in)
174 testStaticAddr(t, testHookHostsPath, ent)