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
This commit is contained in:
metagn
2023-06-06 07:54:07 +03:00
committed by GitHub
parent 2ab948ce53
commit b97d603cd0
134 changed files with 189 additions and 374 deletions

View File

@@ -0,0 +1,21 @@
discard """
errormsg: "index 2 not in 0 .. 1"
line: 18
"""
block:
try:
let a = @[1,2]
echo a[3]
except Exception as e:
doAssert e.msg == "index 3 not in 0 .. 1"
# note: this is not being tested, because the CT error happens before
block:
type TTestArr = array[0..1, int16]
var f: TTestArr
f[0] = 30
f[1] = 40
f[2] = 50
f[3] = 60
echo(repr(f))

View File

@@ -0,0 +1,10 @@
discard """
errormsg: "index 3 not in 0 .. 1"
line: 9
"""
# Note: merge in tinvalidarrayaccess.nim pending https://github.com/nim-lang/Nim/issues/9906
let a = [1,2]
echo a[3]