Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
b0c7d680
Commit
b0c7d680
authored
Nov 12, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os.TestSeek: use a smaller but still 64-bit seek offset.
Might fix issue 91. R=r
https://golang.org/cl/152108
parent
ce0a4bae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
os_test.go
src/pkg/os/os_test.go
+8
-3
No files found.
src/pkg/os/os_test.go
View file @
b0c7d680
...
...
@@ -541,13 +541,18 @@ func TestSeek(t *testing.T) {
test
{
0
,
2
,
int64
(
len
(
data
))},
test
{
0
,
0
,
0
},
test
{
-
1
,
2
,
int64
(
len
(
data
))
-
1
},
test
{
1
<<
40
,
0
,
1
<<
40
},
test
{
1
<<
40
,
2
,
1
<<
40
+
int64
(
len
(
data
))},
test
{
1
<<
33
,
0
,
1
<<
33
},
test
{
1
<<
33
,
2
,
1
<<
33
+
int64
(
len
(
data
))},
};
for
i
,
tt
:=
range
tests
{
off
,
err
:=
f
.
Seek
(
tt
.
in
,
tt
.
whence
);
if
off
!=
tt
.
out
||
err
!=
nil
{
t
.
Errorf
(
"#%d: Seek(%v, %v) = %v, %v want %v, nil"
,
i
,
tt
.
in
,
tt
.
whence
,
off
,
err
,
tt
.
out
)
if
e
,
ok
:=
err
.
(
*
PathError
);
ok
&&
e
.
Error
==
EINVAL
&&
tt
.
out
>
1
<<
32
{
// Reiserfs rejects the big seeks.
// http://code.google.com/p/go/issues/detail?id=91
break
}
t
.
Errorf
(
"#%d: Seek(%v, %v) = %v, %v want %v, nil"
,
i
,
tt
.
in
,
tt
.
whence
,
off
,
err
,
tt
.
out
);
}
}
f
.
Close
();
...
...
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