diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-06-14 02:11:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-14 11:11:26 +0200 |
commit | 0fc5d3f13beb13b4bd5a6174a2f2b00d14d862fb (patch) | |
tree | 1e0844c25387ad8212a4e59179d1554074d5d537 /tests | |
parent | d3b25a294858f655eef8c45d2a8b8b55261d53ac (diff) | |
download | Nim-0fc5d3f13beb13b4bd5a6174a2f2b00d14d862fb.tar.gz |
fix #14655 setLen(seq) now zeros memory (#14656)
* simplify sysstr.nim * fix #14655
Diffstat (limited to 'tests')
-rw-r--r-- | tests/collections/tseq.nim | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/collections/tseq.nim b/tests/collections/tseq.nim index ac68e5636..263a571bf 100644 --- a/tests/collections/tseq.nim +++ b/tests/collections/tseq.nim @@ -206,4 +206,11 @@ block ttoseq: stdout.write("\n") block tseqmapitchain: - doAssert @[101, 102] == [1, 2].mapIt(func (x: int): int = it + x).mapIt(it(100)) \ No newline at end of file + doAssert @[101, 102] == [1, 2].mapIt(func (x: int): int = it + x).mapIt(it(100)) + + +for i in 0..100: + # fix #14655 + var test = newSeqOfCap[uint32](1) + test.setLen(1) + doAssert test[0] == 0, $(test[0], i) |