chiark
/
gitweb
/
~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
utils/t/bits-testgen.py: Set the `SEED' from the command-line correctly.
[mLib]
/
utils
/
t
/
bits-testgen.py
diff --git
a/utils/t/bits-testgen.py
b/utils/t/bits-testgen.py
index 810b5194fb7dee08053a81acbfea735988a1c4ab..05e4baf866a6743af66cc1af32ab1442092567f9 100644
(file)
--- a/
utils/t/bits-testgen.py
+++ b/
utils/t/bits-testgen.py
@@
-18,7
+18,9
@@
def arg(default = None):
else: return default
R.seed(None)
else: return default
R.seed(None)
-SEED = int(arg(R.randrange(0, 1 << 32)))
+seed = arg()
+if seed is None: SEED = R.randrange(0, 1 << 32)
+else: SEED = int(seed, 0)
R.seed(SEED)
print '### Test vectors for 64-bit arithmetic macros'
R.seed(SEED)
print '### Test vectors for 64-bit arithmetic macros'