Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
aaf8cecf
Commit
aaf8cecf
authored
Jul 25, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a2d8995e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
go/zodb/storage/fs1/filestorage_test.go
go/zodb/storage/fs1/filestorage_test.go
+8
-8
No files found.
go/zodb/storage/fs1/filestorage_test.go
View file @
aaf8cecf
...
...
@@ -141,7 +141,7 @@ func TestLoad(t *testing.T) {
// iterate tidMin..tidMax and expect db entries in expectv
func
testIterate
(
t
*
testing
.
T
,
fs
*
FileStorage
,
tidMin
,
tidMax
zodb
.
Tid
,
expectv
[]
dbEntry
)
{
iter
:=
fs
.
Iterate
(
tidMin
,
tidMax
)
fsi
:=
iter
.
(
*
iterato
r
)
fsi
:=
iter
.
(
*
zIte
r
)
for
k
:=
0
;
;
k
++
{
txnErrorf
:=
func
(
format
string
,
a
...
interface
{})
{
...
...
@@ -170,13 +170,13 @@ func testIterate(t *testing.T, fs *FileStorage, tidMin, tidMax zodb.Tid, expectv
// assert txni points to where we expect - this will allow us
// not only to check .TxnInfo but also .Pos, .LenPrev, .Len etc in
// whole expected TxnHeader
if
txni
!=
&
fsi
.
txnI
ter
.
Txnh
.
TxnInfo
{
if
txni
!=
&
fsi
.
i
ter
.
Txnh
.
TxnInfo
{
t
.
Fatal
(
"unexpected txni pointer"
)
}
// compare transaction headers modulo .workMem
// (workMem is not initialized in _1fs_dbEntryv)
txnh1
:=
fsi
.
txnI
ter
.
Txnh
txnh1
:=
fsi
.
i
ter
.
Txnh
txnh2
:=
dbe
.
Header
txnh1
.
workMem
=
nil
txnh2
.
workMem
=
nil
...
...
@@ -211,16 +211,16 @@ func testIterate(t *testing.T, fs *FileStorage, tidMin, tidMax zodb.Tid, expectv
// assert datai pointes to where we expect - this will allow us
// not only to check oid/tid/data but also to check whole data header.
if
datai
!=
&
fsi
.
dataIter
.
sri
{
if
datai
!=
&
fsi
.
sri
{
t
.
Fatal
(
"unexpected datai pointer"
)
}
// compare data headers modulo .workMem
// (workMem is not initialized in _1fs_dbEntryv)
fsi
.
dataI
ter
.
Datah
.
workMem
=
dh
.
workMem
fsi
.
i
ter
.
Datah
.
workMem
=
dh
.
workMem
if
!
reflect
.
DeepEqual
(
fsi
.
dataI
ter
.
Datah
,
dh
)
{
dataErrorf
(
"unexpected data entry:
\n
have: %q
\n
want: %q"
,
fsi
.
dataI
ter
.
Datah
,
dh
)
if
!
reflect
.
DeepEqual
(
fsi
.
i
ter
.
Datah
,
dh
)
{
dataErrorf
(
"unexpected data entry:
\n
have: %q
\n
want: %q"
,
fsi
.
i
ter
.
Datah
,
dh
)
}
// check what was actually returned - since it is not in ^^^ data structure
...
...
@@ -281,7 +281,7 @@ func TestComputeIndex(t *testing.T) {
fs
:=
xfsopen
(
t
,
"testdata/1.fs"
)
// TODO open ro
defer
exc
.
XRun
(
fs
.
Close
)
index
,
err
:=
fs
.
C
omputeIndex
(
context
.
TODO
())
index
,
err
:=
fs
.
c
omputeIndex
(
context
.
TODO
())
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
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