Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
55e234f5
Commit
55e234f5
authored
Aug 03, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
aeda2889
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
wcfs/zblk_test.go
wcfs/zblk_test.go
+47
-0
No files found.
wcfs/zblk_test.go
View file @
55e234f5
...
...
@@ -20,3 +20,50 @@
package
main
//go:generate ./testdata/zblk_test_gen.py
import
(
"context"
"testing"
"lab.nexedi.com/kirr/go123/exc"
"lab.nexedi.com/kirr/neo/go/transaction"
"lab.nexedi.com/kirr/neo/go/zodb"
_
"lab.nexedi.com/kirr/neo/go/zodb/wks"
)
func
TestZBlk
(
t
*
testing
.
T
)
{
X
:=
exc
.
Raiseif
ctx
:=
context
.
Background
()
stor
,
err
:=
zodb
.
OpenStorage
(
ctx
,
"testdata/zblk.fs"
,
&
zodb
.
OpenOptions
{
ReadOnly
:
true
});
X
(
err
)
db
:=
zodb
.
NewDB
(
stor
)
txn
,
ctx
:=
transaction
.
New
(
ctx
)
defer
txn
.
Abort
()
conn
,
err
:=
db
.
Open
(
ctx
);
X
(
err
)
// XXX close db/stor
xz0
,
err
:=
conn
.
Get
(
ctx
,
z0_oid
);
X
(
err
)
xz1
,
err
:=
conn
.
Get
(
ctx
,
z1_oid
);
X
(
err
)
xzf
,
err
:=
conn
.
Get
(
ctx
,
zf_oid
);
X
(
err
)
z0
,
ok
:=
xz0
.
(
*
ZBlk0
)
if
!
ok
{
t
.
Fatalf
(
"z0: want ZBlk0; got %T"
,
xz0
)
}
z1
,
ok
:=
xz1
.
(
*
ZBlk1
)
if
!
ok
{
t
.
Fatalf
(
"z1: want ZBlk1; got %T"
,
xz1
)
}
zf
,
ok
:=
xzf
.
(
*
ZBigFile
)
if
!
ok
{
t
.
Fatalf
(
"zf: want ZBigFile; got %T"
,
xzf
)
}
// XXX
_
,
_
,
_
=
z0
,
z1
,
zf
}
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