summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-09-22 21:15:27 +0800
committerGitHub <noreply@github.com>2022-09-22 21:15:27 +0800
commitdb8a62d4802a005b80aa07ca355ddee4bf098b11 (patch)
treea70051bfd88afb4c6227de2bf3a94892d908e73c /tests
parentae3dd759c4173cf03692ec998c091ff552714a20 (diff)
downloadNim-db8a62d4802a005b80aa07ca355ddee4bf098b11.tar.gz
fixes #20285; prevent oid time overflow at year 2038 (#20338)
* Revert "fixes  #20285; prevent oid time overflow at year 2038"

This reverts commit dfcdb6ec2ab6a5fa53b6a99294a84fd122be8f8d.

* increase time to 64 bits and clean up

* add testcase

* inline consts

* add a changelog

* fixes  #20285; prevent oid time overflow at year 2038
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/toids.nim11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/stdlib/toids.nim b/tests/stdlib/toids.nim
index f162dbe57..72900d1ef 100644
--- a/tests/stdlib/toids.nim
+++ b/tests/stdlib/toids.nim
@@ -1,6 +1,15 @@
+discard """
+  matrix: "--mm:refc; --mm:orc"
+"""
+
 import std/oids
 
 
 block: # genOid
   let x = genOid()
-  doAssert ($x).len == 24
+  doAssert ($x).len == 32
+
+block:
+  let x = genOid()
+  let y = parseOid(cstring($x))
+  doAssert x == y