diff options
author | metagn <metagngn@gmail.com> | 2023-06-06 07:54:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-06 06:54:07 +0200 |
commit | b97d603cd00a210547bda1a2a1c3e09f97fcc49e (patch) | |
tree | 080b4ad7b5826b88a9483c6a0e4d697096f12cc1 /tests/cnstseq | |
parent | 2ab948ce53e3d9b80bf9b02644c8ec8991f34d0a (diff) | |
download | Nim-b97d603cd00a210547bda1a2a1c3e09f97fcc49e.tar.gz |
some test cleanups & category reorganization (#22010)
* clean up some test categories * mention exact slice issue * magics into system * move trangechecks into overflow * move tmemory to system * try fix CI * try fix CI * final CI fix
Diffstat (limited to 'tests/cnstseq')
-rw-r--r-- | tests/cnstseq/tcnstseq.nim | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/tests/cnstseq/tcnstseq.nim b/tests/cnstseq/tcnstseq.nim deleted file mode 100644 index 5679a6e37..000000000 --- a/tests/cnstseq/tcnstseq.nim +++ /dev/null @@ -1,68 +0,0 @@ -discard """ -output: ''' -AngelikaAnneAnnaAnkaAnja -AngelikaAnneAnnaAnkaAnja -AngelikaAnneAnnaAnkaAnja -onetwothree -onetwothree -onetwothree -one1two2three3 -''' -""" -# Test the new implicit conversion from sequences to arrays in a constant -# context. - -import strutils - - -block t1: - const - myWords = "Angelika Anne Anna Anka Anja".split() - - for x in items(myWords): - write(stdout, x) #OUT AngelikaAnneAnnaAnkaAnja - echo "" - - -block t2: - const - myWords = @["Angelika", "Anne", "Anna", "Anka", "Anja"] - - for i in 0 .. high(myWords): - write(stdout, myWords[i]) #OUT AngelikaAnneAnnaAnkaAnja - echo "" - - -block t3: - for w in items(["Angelika", "Anne", "Anna", "Anka", "Anja"]): - write(stdout, w) #OUT AngelikaAnneAnnaAnkaAnja - echo "" - - -block t2656: - iterator it1(args: seq[string]): string = - for s in args: yield s - iterator it2(args: seq[string]): string {.closure.} = - for s in args: yield s - iterator it3(args: openArray[string]): string {.closure.} = - for s in args: yield s - iterator it4(args: openArray[(string, string)]): string {.closure.} = - for s1, s2 in items(args): yield s1 & s2 - - block: - const myConstSeq = @["one", "two", "three"] - for s in it1(myConstSeq): - stdout.write s - echo "" - for s in it2(myConstSeq): - stdout.write s - echo "" - for s in it3(myConstSeq): - stdout.write s - echo "" - - block: - const myConstSeq = @[("one", "1"), ("two", "2"), ("three", "3")] - for s in it4(myConstSeq): - stdout.write s - echo "" |