1
0
Fork 0
forked from External/ergo
Instead of building a new serialized message for each recipient,
try to cache them.
This commit is contained in:
Shivaram Lingamneni 2020-11-27 00:13:47 -05:00
parent f04648e081
commit ec15d367ba
6 changed files with 249 additions and 20 deletions

View file

@ -80,4 +80,14 @@ func TestSets(t *testing.T) {
if !BitsetGet(t3s, 0) || BitsetGet(t3s, 72) || !BitsetGet(t3s, 74) || BitsetGet(t3s, 71) {
t.Error("subtract doesn't work")
}
var tlocal testBitset
tlocals := tlocal[:]
BitsetCopyLocal(tlocals, t1s)
for i = 0; i < 128; i++ {
expected := (i != 72)
if BitsetGetLocal(tlocals, i) != expected {
t.Error("all bits should be set except 72")
}
}
}