add test for shallow seq copy
currently looks like it's not covered
This commit is contained in:
parent
d1b2c35897
commit
266e40f27e
1 changed files with 17 additions and 0 deletions
17
tests/seq/tshallowseq.nim
Normal file
17
tests/seq/tshallowseq.nim
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
discard """
|
||||||
|
output: '''@[1, 42, 3]
|
||||||
|
@[1, 42, 3]
|
||||||
|
'''
|
||||||
|
"""
|
||||||
|
proc xxx() =
|
||||||
|
var x: seq[int] = @[1, 2, 3]
|
||||||
|
var y: seq[int]
|
||||||
|
|
||||||
|
system.shallowCopy(y, x)
|
||||||
|
|
||||||
|
y[1] = 42
|
||||||
|
|
||||||
|
echo y
|
||||||
|
echo x
|
||||||
|
|
||||||
|
xxx()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue