Files
Nim/tests/cpp/tcasts.nim
c-blake 903b1b1016 This test for issue 9739 never needed to depend upon hash order (#23791)
(for `string` or any other key type). Independence is nice to ever
change orders. So, change it to just `len` & a `doAssert` like the other
test in the same file.
2024-07-03 16:33:26 +02:00

21 lines
374 B
Nim

discard """
cmd: "nim cpp $file"
targets: "cpp"
"""
block: #5979
var a = 'a'
var p: pointer = cast[pointer](a)
var c = cast[char](p)
doAssert(c == 'a')
#----------------------------------------------------
# bug #9739
import tables
var t = initTable[string, string]()
discard t.hasKeyOrPut("123", "123")
discard t.mgetOrPut("vas", "kas")
doAssert t.len == 2