Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
fccafbfe
Commit
fccafbfe
authored
Aug 24, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a240c642
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
go/neo/client/cache_test.go
go/neo/client/cache_test.go
+10
-3
No files found.
go/neo/client/cache_test.go
View file @
fccafbfe
...
@@ -115,6 +115,7 @@ func TestCache(t *testing.T) {
...
@@ -115,6 +115,7 @@ func TestCache(t *testing.T) {
// XXX hack; place=ok?
// XXX hack; place=ok?
pretty
.
CompareConfig
.
PrintStringers
=
true
pretty
.
CompareConfig
.
PrintStringers
=
true
// load <3 -> new rce entry
// XXX vvv -> checkLoad()
// XXX vvv -> checkLoad()
data
,
serial
,
err
:=
c
.
Load
(
xidlt
(
1
,
3
))
data
,
serial
,
err
:=
c
.
Load
(
xidlt
(
1
,
3
))
ok1
(
data
==
nil
)
ok1
(
data
==
nil
)
...
@@ -127,8 +128,9 @@ func TestCache(t *testing.T) {
...
@@ -127,8 +128,9 @@ func TestCache(t *testing.T) {
rce1_b3
:=
oce1
.
revv
[
0
]
rce1_b3
:=
oce1
.
revv
[
0
]
ok1
(
rce1_b3
.
before
==
3
)
ok1
(
rce1_b3
.
before
==
3
)
ok1
(
rce1_b3
.
serial
==
0
)
ok1
(
rce1_b3
.
serial
==
0
)
eq
(
rce1_b3
.
err
,
&
zodb
.
ErrXidMissing
{
xidlt
(
1
,
3
)})
// XXX must be 1, ?0
eq
(
rce1_b3
.
err
,
&
zodb
.
ErrXidMissing
{
xidlt
(
1
,
3
)})
// load <4 -> <3 merged with <4
data
,
serial
,
err
=
c
.
Load
(
xidlt
(
1
,
4
))
data
,
serial
,
err
=
c
.
Load
(
xidlt
(
1
,
4
))
ok1
(
data
==
nil
)
ok1
(
data
==
nil
)
ok1
(
serial
==
0
)
ok1
(
serial
==
0
)
...
@@ -139,15 +141,20 @@ func TestCache(t *testing.T) {
...
@@ -139,15 +141,20 @@ func TestCache(t *testing.T) {
ok1
(
rce1_b4
!=
rce1_b3
)
// rce1_b3 was merged into rce1_b4
ok1
(
rce1_b4
!=
rce1_b3
)
// rce1_b3 was merged into rce1_b4
ok1
(
rce1_b4
.
before
==
4
)
ok1
(
rce1_b4
.
before
==
4
)
ok1
(
rce1_b4
.
serial
==
0
)
ok1
(
rce1_b4
.
serial
==
0
)
eq
(
rce1_b4
.
err
,
&
zodb
.
ErrXidMissing
{
xidlt
(
1
,
4
)})
// XXX must be 1, ?0
eq
(
rce1_b4
.
err
,
&
zodb
.
ErrXidMissing
{
xidlt
(
1
,
4
)})
//
XXX load <2 -> check it is merged with <4 XXX vs deleteObject?
//
load <2 -> <2 merged with <4
data
,
serial
,
err
=
c
.
Load
(
xidlt
(
1
,
2
))
data
,
serial
,
err
=
c
.
Load
(
xidlt
(
1
,
2
))
ok1
(
data
==
nil
)
ok1
(
data
==
nil
)
ok1
(
serial
==
0
)
ok1
(
serial
==
0
)
fmt
.
Println
(
err
)
fmt
.
Println
(
err
)
eq
(
err
,
&
zodb
.
ErrXidMissing
{
xidlt
(
1
,
2
)})
eq
(
err
,
&
zodb
.
ErrXidMissing
{
xidlt
(
1
,
2
)})
ok1
(
len
(
oce1
.
revv
)
==
1
)
ok1
(
oce1
.
revv
[
0
]
==
rce1_b4
)
ok1
(
rce1_b4
.
before
==
4
)
ok1
(
rce1_b4
.
serial
==
0
)
eq
(
rce1_b4
.
err
,
&
zodb
.
ErrXidMissing
{
xidlt
(
1
,
4
)})
}
}
type
Checker
struct
{
type
Checker
struct
{
...
...
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