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

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

Issue 12843043: code review 12843043: net: fix dial to raw IP networks on Windows (Closed)
Left Patch Set: diff -r 0593b48602fa https://code.google.com/p/go Created 10 years, 7 months ago
Right Patch Set: diff -r 646b13b8c136 https://code.google.com/p/go Created 10 years, 7 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/net/ipraw_test.go ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2012 The Go Authors. All rights reserved. 1 // Copyright 2012 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 // This file implements API tests across platforms and will never have a build 5 // This file implements API tests across platforms and will never have a build
6 // tag. 6 // tag.
7 7
8 package net 8 package net
9 9
10 import ( 10 import (
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 }() 169 }()
170 170
171 c.WriteToUDP(wb, nil) 171 c.WriteToUDP(wb, nil)
172 c.WriteMsgUDP(wb, nil, nil) 172 c.WriteMsgUDP(wb, nil, nil)
173 } 173 }
174 174
175 func TestIPConnSpecificMethods(t *testing.T) { 175 func TestIPConnSpecificMethods(t *testing.T) {
176 switch runtime.GOOS { 176 switch runtime.GOOS {
177 case "plan9": 177 case "plan9":
178 t.Skipf("skipping test on %q", runtime.GOOS) 178 t.Skipf("skipping test on %q", runtime.GOOS)
179 » } 179 » case "windows":
180 » if os.Getuid() != 0 { 180 » default:
181 » » t.Skipf("skipping test; must be root") 181 » » if os.Getuid() != 0 {
182 » » » t.Skipf("skipping test; must be root")
183 » » }
182 } 184 }
183 185
184 la, err := ResolveIPAddr("ip4", "127.0.0.1") 186 la, err := ResolveIPAddr("ip4", "127.0.0.1")
185 if err != nil { 187 if err != nil {
186 t.Fatalf("ResolveIPAddr failed: %v", err) 188 t.Fatalf("ResolveIPAddr failed: %v", err)
187 } 189 }
188 c, err := ListenIP("ip4:icmp", la) 190 c, err := ListenIP("ip4:icmp", la)
189 if err != nil { 191 if err != nil {
190 t.Fatalf("ListenIP failed: %v", err) 192 t.Fatalf("ListenIP failed: %v", err)
191 } 193 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if p := recover(); p != nil { 383 if p := recover(); p != nil {
382 t.Fatalf("UnixConn.WriteToUnix or WriteMsgUnix panicked: %v", p) 384 t.Fatalf("UnixConn.WriteToUnix or WriteMsgUnix panicked: %v", p)
383 } 385 }
384 }() 386 }()
385 387
386 c1.WriteToUnix(wb, nil) 388 c1.WriteToUnix(wb, nil)
387 c1.WriteMsgUnix(wb, nil, nil) 389 c1.WriteMsgUnix(wb, nil, nil)
388 c3.WriteToUnix(wb, nil) 390 c3.WriteToUnix(wb, nil)
389 c3.WriteMsgUnix(wb, nil, nil) 391 c3.WriteMsgUnix(wb, nil, nil)
390 } 392 }
LEFTRIGHT

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