tests/binfile.bin
author Jun Wu <quark@fb.com>
Sun, 02 Apr 2017 18:12:47 -0700
changeset 31763 8a0c47982ade
parent 3368 751df21dad72
permissions -rw-r--r--
test-revlog-raw: fix "genbits" implementation The "genbits" implementation is actually incorrect. This patch fixes it. A good "genbits" implementation should pass the below assertion: n = 3 # or other number l = list(genbits(n)) assert 2**(n*2) == len(set((l[i]<<n)+l[i+1] for i in range(len(l)-1))) An assertion is added to make sure "genbits" won't work unexpectedly.

(binary:application/octet-stream)