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
e52a3095
Commit
e52a3095
authored
May 15, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
85e2ce23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
43 deletions
+44
-43
wcfs/internal/xbtree_test.py
wcfs/internal/xbtree_test.py
+44
-43
No files found.
wcfs/internal/xbtree_test.py
View file @
e52a3095
...
@@ -120,57 +120,58 @@ def test_allStructs():
...
@@ -120,57 +120,58 @@ def test_allStructs():
return
list
(
xbtree
.
AllStructs
(
keys
,
maxdepth
,
maxsplit
,
allowEmptyBuckets
))
return
list
(
xbtree
.
AllStructs
(
keys
,
maxdepth
,
maxsplit
,
allowEmptyBuckets
))
def
Y
(
keys
,
maxdepth
,
maxsplit
):
def
Y
(
keys
,
maxdepth
,
maxsplit
):
return
X
(
keys
,
maxdepth
,
maxsplit
,
allowEmptyBuckets
=
False
)
return
X
(
keys
,
maxdepth
,
maxsplit
,
allowEmptyBuckets
=
False
)
def
XY
(
keys
,
maxdepth
,
maxsplit
):
x
=
X
(
keys
,
maxdepth
,
maxsplit
)
y
=
Y
(
keys
,
maxdepth
,
maxsplit
)
assert
x
==
y
return
x
assert
X
([],
0
,
0
)
==
[
T
([],
B
())
]
assert
XY
([],
0
,
0
)
==
[
T
([],
B
())
]
assert
Y
([],
0
,
0
)
==
[
T
([],
B
())
]
assert
X
([
1
],
0
,
0
)
==
[
T
([],
B
(
1
))
]
assert
XY
([
1
],
0
,
0
)
==
[
T
([],
B
(
1
))
]
assert
Y
([
1
],
0
,
0
)
==
[
T
([],
B
(
1
))
]
assert
X
([
1
,
3
],
0
,
0
)
==
[
T
([],
B
(
1
,
3
))
]
assert
XY
([
1
,
3
],
0
,
0
)
==
[
T
([],
B
(
1
,
3
))
]
assert
Y
([
1
,
3
],
0
,
0
)
==
[
T
([],
B
(
1
,
3
))
]
assert
X
([],
0
,
1
)
==
[
T
([],
B
())
]
# nothing to split (?) -> y
assert
X
([],
0
,
1
)
==
[
T
([],
B
())
]
# nothing to split (?) -> y
#assert X([], 0, 1) == [ T([], B()), T([0], B(), B()) ]
#assert X([], 0, 1)
== [ T([], B()), T([0], B(), B()) ]
assert
Y
([],
0
,
1
)
==
[
T
([],
B
())
]
assert
Y
([],
0
,
1
)
==
[
T
([],
B
())
]
assert
X
([],
1
,
0
)
==
[
T
([],
B
()),
assert
X
([],
1
,
0
)
==
[
T
([],
B
()),
T
([],
T
([],
T
([],
B
()))
]
T
([],
B
()))
]
assert
Y
([],
1
,
0
)
==
[
T
([],
B
())
]
assert
Y
([],
1
,
0
)
==
[
T
([],
B
())
]
assert
X
([],
2
,
0
)
==
[
T
([],
B
()),
assert
X
([],
2
,
0
)
==
[
T
([],
B
()),
T
([],
T
([],
B
())),
T
([],
T
([],
T
([],
T
([],
B
())))
]
T
([],
B
())),
assert
Y
([],
2
,
0
)
==
[
T
([],
B
())
]
T
([],
T
([],
T
([],
B
())))
]
assert
X
([
1
,
3
],
0
,
0
)
==
[
T
([],
B
(
1
,
3
))
]
assert
Y
([],
2
,
0
)
==
[
T
([],
B
())
]
assert
Y
([
1
,
3
],
0
,
0
)
==
[
T
([],
B
(
1
,
3
))
]
assert
X
([
1
,
3
],
0
,
1
)
==
[
T
([],
B
(
1
,
3
)),
assert
XY
([
1
,
3
],
0
,
0
)
==
[
T
([],
B
(
1
,
3
))
]
# nsplit=1
T
([
0
],
B
(),
B
(
1
,
3
)),
assert
X
([
1
,
3
],
0
,
1
)
==
[
T
([],
B
(
1
,
3
)),
T
([
1
],
B
(),
B
(
1
,
3
)),
# nsplit=1
T
([
2
],
B
(
1
),
B
(
3
)),
T
([
0
],
B
(),
B
(
1
,
3
)),
T
([
3
],
B
(
1
),
B
(
3
)),
T
([
1
],
B
(),
B
(
1
,
3
)),
T
([
4
],
B
(
1
,
3
),
B
()),
T
([
2
],
B
(
1
),
B
(
3
)),
]
T
([
3
],
B
(
1
),
B
(
3
)),
assert
Y
([
1
,
3
],
0
,
1
)
==
[
T
([],
B
(
1
,
3
)),
T
([
4
],
B
(
1
,
3
),
B
()),
# nsplit=1
]
T
([
2
],
B
(
1
),
B
(
3
)),
assert
Y
([
1
,
3
],
0
,
1
)
==
[
T
([],
B
(
1
,
3
)),
T
([
3
],
B
(
1
),
B
(
3
)),
# nsplit=1
]
T
([
2
],
B
(
1
),
B
(
3
)),
T
([
3
],
B
(
1
),
B
(
3
)),
assert
X
([
1
,
3
],
1
,
0
)
==
[
T
([],
B
(
1
,
3
)),
]
# depth=1
T
([],
assert
XY
([
1
,
3
],
1
,
0
)
==
[
T
([],
B
(
1
,
3
)),
T
([],
B
(
1
,
3
)))
# depth=1
]
T
([],
T
([],
B
(
1
,
3
)))
]
assert
X
([
1
,
3
],
1
,
1
)
==
[
assert
X
([
1
,
3
],
1
,
1
)
==
[
# T/
# T/
...
...
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