mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
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:
2
tests/errmsgs/mb.nim
Normal file
2
tests/errmsgs/mb.nim
Normal file
@@ -0,0 +1,2 @@
|
||||
type
|
||||
typ* = distinct string
|
||||
3
tests/errmsgs/mc.nim
Normal file
3
tests/errmsgs/mc.nim
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
type
|
||||
typ* = distinct int
|
||||
12
tests/errmsgs/ta.nim
Normal file
12
tests/errmsgs/ta.nim
Normal 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)
|
||||
7
tests/errmsgs/tconsttypemismatch.nim
Normal file
7
tests/errmsgs/tconsttypemismatch.nim
Normal file
@@ -0,0 +1,7 @@
|
||||
discard """
|
||||
errormsg: "type mismatch"
|
||||
file: "tconsttypemismatch.nim"
|
||||
line: 7
|
||||
"""
|
||||
# bug #2252
|
||||
const foo: int = 1000 / 30
|
||||
13
tests/errmsgs/tmacroerrorproc.nim
Normal file
13
tests/errmsgs/tmacroerrorproc.nim
Normal 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
12
tests/errmsgs/tnoop.nim
Normal 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()
|
||||
10
tests/errmsgs/tsimpletypecheck.nim
Normal file
10
tests/errmsgs/tsimpletypecheck.nim
Normal 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
|
||||
Reference in New Issue
Block a user