Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1098)

Delta Between Two Patch Sets: src/pkg/net/multicast_test.go

Issue 13422044: code review 13422044: net: re-enable raw socket tests on windows (Closed)
Left Patch Set: Created 10 years, 6 months ago
Right Patch Set: diff -r 411ac795f84e https://go.googlecode.com/hg/ Created 10 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/net/ipraw_test.go ('k') | src/pkg/net/packetconn_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package net 5 package net
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "os" 9 "os"
10 "runtime" 10 "runtime"
11 "testing" 11 "testing"
12 ) 12 )
13 13
14 var ipv4MulticastListenerTests = []struct { 14 var ipv4MulticastListenerTests = []struct {
15 net string 15 net string
16 gaddr *UDPAddr // see RFC 4727 16 gaddr *UDPAddr // see RFC 4727
17 }{ 17 }{
18 {"udp", &UDPAddr{IP: IPv4(224, 0, 0, 254), Port: 12345}}, 18 {"udp", &UDPAddr{IP: IPv4(224, 0, 0, 254), Port: 12345}},
19 19
20 {"udp4", &UDPAddr{IP: IPv4(224, 0, 0, 254), Port: 12345}}, 20 {"udp4", &UDPAddr{IP: IPv4(224, 0, 0, 254), Port: 12345}},
21 } 21 }
22 22
23 // TestIPv4MulticastListener tests both single and double listen to a 23 // TestIPv4MulticastListener tests both single and double listen to a
24 // test listener with same address family, same group address and same 24 // test listener with same address family, same group address and same
25 // port. 25 // port.
26 func TestIPv4MulticastListener(t *testing.T) { 26 func TestIPv4MulticastListener(t *testing.T) {
27 switch runtime.GOOS { 27 switch runtime.GOOS {
28 case "windows":
29 if testing.Short() || !*testExternal {
30 t.Skipf("skipping test on %q to avoid network firewall", runtime.GOOS)
31 }
32 case "plan9": 28 case "plan9":
33 t.Skipf("skipping test on %q", runtime.GOOS) 29 t.Skipf("skipping test on %q", runtime.GOOS)
34 } 30 }
35 31
36 closer := func(cs []*UDPConn) { 32 closer := func(cs []*UDPConn) {
37 for _, c := range cs { 33 for _, c := range cs {
38 if c != nil { 34 if c != nil {
39 c.Close() 35 c.Close()
40 } 36 }
41 } 37 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return false, err 175 return false, err
180 } 176 }
181 for _, ifma := range ifmat { 177 for _, ifma := range ifmat {
182 if ifma.(*IPAddr).IP.Equal(ip) { 178 if ifma.(*IPAddr).IP.Equal(ip) {
183 return true, nil 179 return true, nil
184 } 180 }
185 } 181 }
186 } 182 }
187 return false, nil 183 return false, nil
188 } 184 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b