toids.nim 226 B

12345678910111213141516
  1. discard """
  2. matrix: "--mm:refc; --mm:orc"
  3. """
  4. import std/oids
  5. import std/assertions
  6. block: # genOid
  7. let x = genOid()
  8. doAssert ($x).len == 24
  9. block:
  10. let x = genOid()
  11. let y = parseOid(cstring($x))
  12. doAssert x == y