The number of steps taken is different on 32- and 64-bit platforms, with
no especially easy way to calculate it in a principled way. Just use a
stupid case analysis to get the right answer.
n = C.MP.loadb(seed)
rng = C.DSARand(seed)
me.check_rand(rng)
- me.assertEqual(rng.seed, (n + 153 + 3).storeb(16))
+ if T.MAXFIXNUM == (1 << 31) - 1: steps = 153 + 3
+ elif T.MAXFIXNUM == (1 << 63) - 1: steps = 153
+ else: steps = None
+ if steps is not None: me.assertEqual(rng.seed, (n + steps).storeb(16))
def test_bbs(me):
ev = T.EventRecorder()