Closed oittaa closed 2 years ago
I was wondering if it would make sense to provide some kind reference implementations and test vectors like every hash function specification does?
For example for UUIDv6 every timestamp, clock_seq, and node input -> some exact output
timestamp
clock_seq
node
Then in Python a reference implementation could be something like this making it easy to test with the provided test vectors:
def uuid6(timestamp: int = None, clock_seq: int = None, node: int = None) -> UUID: ...
And then of course you could use timestamp, clock_seq, and node values from the test vectors to check against your own implementations.
@oittaa we should discuss over on https://github.com/uuid6/prototypes/issues/11
I am open to PRs for test vectors and suites on the python implementation.
I was wondering if it would make sense to provide some kind reference implementations and test vectors like every hash function specification does?
For example for UUIDv6 every
timestamp
,clock_seq
, andnode
input -> some exact outputThen in Python a reference implementation could be something like this making it easy to test with the provided test vectors:
And then of course you could use
timestamp
,clock_seq
, andnode
values from the test vectors to check against your own implementations.