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
d38c8f8e
Commit
d38c8f8e
authored
Jun 12, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f37901bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+25
-8
No files found.
wcfs/wcfs_test.py
View file @
d38c8f8e
...
...
@@ -1237,19 +1237,36 @@ def test_wcfs():
assert
w2
.
at
==
at2
assert
w2
.
pinned
==
{
2
:
at2
}
# w_assertPin asserts on state of .pinned for {w3,w3_,w2}
def
w_assertPin
(
pinw3
,
pinw3_
,
pinw2
):
assert
w3
.
pinned
==
pinw3
assert
w3_
.
pinned
==
pinw3_
assert
w2
.
pinned
==
pinw2
f
.
assertCache
([
1
,
1
,
1
,
1
])
t
.
change
(
zf
,
{
2
:
'4c'
,
5
:
'4f'
})
# FIXME + 4a after δbtree works
t
.
change
(
zf
,
{
2
:
'4c'
,
5
:
'4f'
})
# FIXME + 4a after δbtree works
& update everything vvv
at4
=
t
.
commit
()
f
.
assertCache
([
1
,
1
,
0
,
1
,
0
,
0
])
# FIXME a must be invalidated - see δbtree ^^^
f
.
assertCache
([
1
,
1
,
0
,
1
,
0
,
0
])
f
.
assertBlk
(
0
,
''
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{},
{},
{
2
:
at2
})
f
.
assertBlk
(
1
,
''
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{},
{},
{
2
:
at2
})
f
.
assertBlk
(
2
,
'4c'
,
{
wl3
:
{
2
:
at3
},
wl3_
:
{
2
:
at3
},
wl2
:
{}})
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
2
:
at2
})
f
.
assertBlk
(
3
,
'2d'
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
2
:
at2
})
f
.
assertBlk
(
0
,
''
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
# XXX + {0, at3} after δbtree
f
.
assertBlk
(
1
,
''
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
f
.
assertBlk
(
2
,
'4c'
,
{
wl3
:
{
2
:
at3
},
wl3_
:
{
2
:
at3
},
wl2
:
{}})
f
.
assertBlk
(
3
,
'2d'
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
# blk4 is hole @head - the same as at earlier db view - not pinned
# XXX or do not allow hole past .size ?
f
.
assertBlk
(
4
,
''
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
f
.
assertBlk
(
5
,
'4f'
,
{
wl3
:
{
5
:
at0
},
wl3_
:
{
5
:
at0
},
wl2
:
{
5
:
at0
}})
# XXX at0 -> ø?
f
.
assertBlk
(
4
,
''
,
{
wl3
:
{},
wl3_
:
{},
wl2
:
{}})
w_assertPin
(
{
2
:
at3
},
{
2
:
at3
},
{
2
:
at2
})
f
.
assertBlk
(
5
,
'4f'
,
{
wl3
:
{
5
:
at0
},
wl3_
:
{
5
:
at0
},
wl2
:
{
5
:
at0
}})
# XXX at0->ø?
w_assertPin
(
{
2
:
at3
,
5
:
at0
},
{
2
:
at3
,
5
:
at0
},
{
2
:
at2
,
5
:
at0
})
# commit again:
# - block is already pinned (#2) -> not notified
...
...
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