Commit 66d65cc9 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2b2ec471
......@@ -28,6 +28,8 @@ import os, transaction
from golang.gcompat import qq
def main():
import zodbtools.test.gen_testdata # to make time predictable (XXX)
outfs = "testdata/1.fs"
os.remove(outfs)
db = DB(outfs)
......@@ -53,6 +55,11 @@ def main():
for k, v in b.items():
if isinstance(v, str):
v = qq(v)
elif isinstance(v, int):
v = "int64(%d)" % v
else:
raise RuntimeError("unsupported value type: %r" % v)
s += "{%s, %s}, " % (k, v)
s += "}},"
emit("\t"+s)
......
......@@ -4,6 +4,6 @@ package btree
var _1fs_testEntry = [...]testEntry{
testEntry{oid: 1, itemv: []kv{}},
testEntry{oid: 2, itemv: []kv{{10, 17}, }},
testEntry{oid: 3, itemv: []kv{{15, 1}, {23, "hello"}, }},
testEntry{oid: 2, itemv: []kv{{10, int64(17)}, }},
testEntry{oid: 3, itemv: []kv{{15, int64(1)}, {23, "hello"}, }},
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment