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

2
tests/errmsgs/mb.nim Normal file
View File

@@ -0,0 +1,2 @@
type
typ* = distinct string

3
tests/errmsgs/mc.nim Normal file
View File

@@ -0,0 +1,3 @@
type
typ* = distinct int

12
tests/errmsgs/ta.nim Normal file
View File

@@ -0,0 +1,12 @@
discard """
errormsg: "type mismatch: got <mc.typ>"
line: 12
"""
import mb, mc
proc test(testing: mb.typ) =
discard
var s: mc.typ
test(s)

View File

@@ -0,0 +1,7 @@
discard """
errormsg: "type mismatch"
file: "tconsttypemismatch.nim"
line: 7
"""
# bug #2252
const foo: int = 1000 / 30

View File

@@ -0,0 +1,13 @@
discard """
errormsg: "Expected a node of kind nnkCharLit, got nnkCommand"
file: "tmacroerrorproc.nim"
line: 13
"""
# issue #4915
import macros
macro mixer(n: typed): untyped =
expectKind(n[0], nnkCharLit)
mixer:
echo "owh"

12
tests/errmsgs/tnoop.nim Normal file
View File

@@ -0,0 +1,12 @@
discard """
nimout: '''
found 'a' [var declared in tnoop.nim(10, 3)]
'''
file: "tnoop.nim"
errormsg: "attempting to call routine: 'a'"
"""
var
a: int
a()

View File

@@ -0,0 +1,10 @@
discard """
errormsg: "type mismatch: got <bool> but expected \'string\'"
file: "tsimpletypecheck.nim"
line: 10
"""
# Test 2
# Simple type checking
var a: string
a = false #ERROR