Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #17859; rename tests so they run in CI; merge several tests with nim check #17862

Merged
merged 5 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions tests/errmsgs/tundeclared_routine.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
discard """
cmd: '''nim check --hints:off $file'''
action: reject
nimout: '''
tundeclared_routine.nim(24, 17) Error: attempting to call routine: 'myiter'
found tundeclared_routine.myiter(a: string) [iterator declared in tundeclared_routine.nim(22, 12)]
found tundeclared_routine.myiter() [iterator declared in tundeclared_routine.nim(23, 12)]
tundeclared_routine.nim(29, 28) Error: invalid pragma: myPragma
tundeclared_routine.nim(36, 13) Error: undeclared field: 'bar3' for type tundeclared_routine.Foo [type declared in tundeclared_routine.nim(33, 8)]
found tundeclared_routine.bar3() [iterator declared in tundeclared_routine.nim(35, 12)]
tundeclared_routine.nim(41, 13) Error: undeclared field: 'bar4' for type tundeclared_routine.Foo [type declared in tundeclared_routine.nim(39, 8)]
tundeclared_routine.nim(44, 15) Error: attempting to call routine: 'bad5'
'''
"""





# line 20
block:
iterator myiter(a:string): int = discard
iterator myiter(): int = discard
let a = myiter(1)

block:
proc myPragma():int=discard
iterator myPragma():int=discard
proc myfun(a:int): int {.myPragma.} = 1
let a = myfun(1)

block:
type Foo = object
var a = Foo()
iterator bar3():int=discard
let a2 = a.bar3

block:
type Foo = object
var a = Foo()
let a2 = a.bar4

block:
let a = bad5(1)
13 changes: 0 additions & 13 deletions tests/errmsgs/undeclared_routine.nim

This file was deleted.

9 changes: 0 additions & 9 deletions tests/errmsgs/undeclared_routine2.nim

This file was deleted.

13 changes: 0 additions & 13 deletions tests/errmsgs/undeclared_routine3.nim

This file was deleted.

10 changes: 0 additions & 10 deletions tests/errmsgs/undeclared_routine4.nim

This file was deleted.

9 changes: 0 additions & 9 deletions tests/errmsgs/undeclared_routine5.nim

This file was deleted.