Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
b767556d
Commit
b767556d
authored
Mar 03, 2013
by
Mikio Hara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: fix windows build
R=golang-dev, minux.ma CC=golang-dev
https://golang.org/cl/7429049
parent
ed01f4be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
src/pkg/net/protoconn_test.go
src/pkg/net/protoconn_test.go
+13
-0
src/pkg/net/unix_test.go
src/pkg/net/unix_test.go
+0
-13
No files found.
src/pkg/net/protoconn_test.go
View file @
b767556d
...
@@ -8,12 +8,25 @@
...
@@ -8,12 +8,25 @@
package
net
package
net
import
(
import
(
"io/ioutil"
"os"
"os"
"runtime"
"runtime"
"testing"
"testing"
"time"
"time"
)
)
// testUnixAddr uses ioutil.TempFile to get a name that is unique.
func
testUnixAddr
()
string
{
f
,
err
:=
ioutil
.
TempFile
(
""
,
"nettest"
)
if
err
!=
nil
{
panic
(
err
)
}
addr
:=
f
.
Name
()
f
.
Close
()
os
.
Remove
(
addr
)
return
addr
}
var
condFatalf
=
func
()
func
(
*
testing
.
T
,
string
,
...
interface
{})
{
var
condFatalf
=
func
()
func
(
*
testing
.
T
,
string
,
...
interface
{})
{
// A few APIs are not implemented yet on both Plan 9 and Windows.
// A few APIs are not implemented yet on both Plan 9 and Windows.
switch
runtime
.
GOOS
{
switch
runtime
.
GOOS
{
...
...
src/pkg/net/unix_test.go
View file @
b767556d
...
@@ -8,7 +8,6 @@ package net
...
@@ -8,7 +8,6 @@ package net
import
(
import
(
"bytes"
"bytes"
"io/ioutil"
"os"
"os"
"reflect"
"reflect"
"runtime"
"runtime"
...
@@ -17,18 +16,6 @@ import (
...
@@ -17,18 +16,6 @@ import (
"time"
"time"
)
)
// testUnixAddr uses ioutil.TempFile to get a name that is unique.
func
testUnixAddr
()
string
{
f
,
err
:=
ioutil
.
TempFile
(
""
,
"nettest"
)
if
err
!=
nil
{
panic
(
err
)
}
addr
:=
f
.
Name
()
f
.
Close
()
os
.
Remove
(
addr
)
return
addr
}
func
TestReadUnixgramWithUnnamedSocket
(
t
*
testing
.
T
)
{
func
TestReadUnixgramWithUnnamedSocket
(
t
*
testing
.
T
)
{
addr
:=
testUnixAddr
()
addr
:=
testUnixAddr
()
la
,
err
:=
ResolveUnixAddr
(
"unixgram"
,
addr
)
la
,
err
:=
ResolveUnixAddr
(
"unixgram"
,
addr
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment