Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
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-fuse
Commits
251a9d53
Commit
251a9d53
authored
Jan 13, 2016
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use reflect.DeepEqual in loopback_test where applicable.
parent
5f641462
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
fuse/test/loopback_test.go
fuse/test/loopback_test.go
+5
-6
No files found.
fuse/test/loopback_test.go
View file @
251a9d53
...
...
@@ -8,6 +8,7 @@ import (
"os"
"os/exec"
"path/filepath"
"reflect"
"runtime"
"syscall"
"testing"
...
...
@@ -637,11 +638,10 @@ func RandomData(size int) []byte {
func
CompareSlices
(
t
*
testing
.
T
,
got
,
want
[]
byte
)
{
if
len
(
got
)
!=
len
(
want
)
{
t
.
Errorf
(
"content length: got %d want %d"
,
len
(
got
),
len
(
want
))
return
}
for
i
:=
range
want
{
if
i
>=
len
(
got
)
{
break
}
if
want
[
i
]
!=
got
[
i
]
{
t
.
Errorf
(
"content mismatch byte %d, got %d want %d."
,
i
,
got
[
i
],
want
[
i
])
break
...
...
@@ -715,7 +715,6 @@ func TestLargeDirRead(t *testing.T) {
tc
:=
NewTestCase
(
t
)
defer
tc
.
Cleanup
()
t
.
Log
(
"Testing large readdir."
)
created
:=
100
names
:=
make
([]
string
,
created
)
...
...
@@ -831,7 +830,7 @@ func TestStatFs(t *testing.T) {
clearStatfs
(
&
s1
)
clearStatfs
(
&
s2
)
if
fmt
.
Sprintf
(
"%v"
,
s2
)
!=
fmt
.
Sprintf
(
"%v"
,
s1
)
{
if
!
reflect
.
DeepEqual
(
s1
,
s2
)
{
t
.
Errorf
(
"statfs mismatch %#v != %#v"
,
s1
,
s2
)
}
}
...
...
@@ -865,7 +864,7 @@ func TestFStatFs(t *testing.T) {
clearStatfs
(
&
s1
)
clearStatfs
(
&
s2
)
if
fmt
.
Sprintf
(
"%v"
,
s2
)
!=
fmt
.
Sprintf
(
"%v"
,
s1
)
{
if
!
reflect
.
DeepEqual
(
s1
,
s2
)
{
t
.
Errorf
(
"statfs mismatch: %#v != %#v"
,
s1
,
s2
)
}
}
...
...
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