From f52aa6bde8ba7b36d0589ee8e5d8319e5152237e Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 26 Apr 2021 11:32:41 -0700 Subject: fix typo in test name undeclared_routime.nim => undeclared_routine.nim (#17861) --- tests/errmsgs/undeclared_routime.nim | 13 ------------- tests/errmsgs/undeclared_routime2.nim | 9 --------- tests/errmsgs/undeclared_routime3.nim | 13 ------------- tests/errmsgs/undeclared_routime4.nim | 10 ---------- tests/errmsgs/undeclared_routime5.nim | 9 --------- tests/errmsgs/undeclared_routime_compiles.nim | 11 ----------- tests/errmsgs/undeclared_routine.nim | 13 +++++++++++++ tests/errmsgs/undeclared_routine2.nim | 9 +++++++++ tests/errmsgs/undeclared_routine3.nim | 13 +++++++++++++ tests/errmsgs/undeclared_routine4.nim | 10 ++++++++++ tests/errmsgs/undeclared_routine5.nim | 9 +++++++++ tests/errmsgs/undeclared_routine_compiles.nim | 11 +++++++++++ 12 files changed, 65 insertions(+), 65 deletions(-) delete mode 100644 tests/errmsgs/undeclared_routime.nim delete mode 100644 tests/errmsgs/undeclared_routime2.nim delete mode 100644 tests/errmsgs/undeclared_routime3.nim delete mode 100644 tests/errmsgs/undeclared_routime4.nim delete mode 100644 tests/errmsgs/undeclared_routime5.nim delete mode 100644 tests/errmsgs/undeclared_routime_compiles.nim create mode 100644 tests/errmsgs/undeclared_routine.nim create mode 100644 tests/errmsgs/undeclared_routine2.nim create mode 100644 tests/errmsgs/undeclared_routine3.nim create mode 100644 tests/errmsgs/undeclared_routine4.nim create mode 100644 tests/errmsgs/undeclared_routine5.nim create mode 100644 tests/errmsgs/undeclared_routine_compiles.nim (limited to 'tests/errmsgs') diff --git a/tests/errmsgs/undeclared_routime.nim b/tests/errmsgs/undeclared_routime.nim deleted file mode 100644 index 7ef12cc0e..000000000 --- a/tests/errmsgs/undeclared_routime.nim +++ /dev/null @@ -1,13 +0,0 @@ -discard """ -cmd: '''nim c --hints:off $file''' -errormsg: "attempting to call routine: 'myiter'" -nimout: '''undeclared_routime.nim(13, 15) Error: attempting to call routine: 'myiter' - found 'undeclared_routime.myiter(a: string)[iterator declared in undeclared_routime.nim(10, 9)]' - found 'undeclared_routime.myiter()[iterator declared in undeclared_routime.nim(11, 9)]' -''' -""" - -iterator myiter(a:string): int = discard -iterator myiter(): int = discard - -let a = myiter(1) diff --git a/tests/errmsgs/undeclared_routime2.nim b/tests/errmsgs/undeclared_routime2.nim deleted file mode 100644 index 3e48b48f4..000000000 --- a/tests/errmsgs/undeclared_routime2.nim +++ /dev/null @@ -1,9 +0,0 @@ -discard """ -cmd: '''nim c --hints:off $file''' -errormsg: "invalid pragma: myPragma" -""" - -proc myPragma():int=discard -iterator myPragma():int=discard -proc myfun(a:int): int {.myPragma.} = 1 -let a = myfun(1) diff --git a/tests/errmsgs/undeclared_routime3.nim b/tests/errmsgs/undeclared_routime3.nim deleted file mode 100644 index 052adfc08..000000000 --- a/tests/errmsgs/undeclared_routime3.nim +++ /dev/null @@ -1,13 +0,0 @@ -discard """ -cmd: '''nim c --hints:off $file''' -errormsg: "undeclared field: 'bar'" -nimout: '''undeclared_routime3.nim(13, 10) Error: undeclared field: 'bar' - found 'undeclared_routime3.bar()[declared in undeclared_routime3.nim(12, 9)]' of kind 'iterator' -''' -""" - - -type Foo = object -var a = Foo() -iterator bar():int=discard -let a = a.bar diff --git a/tests/errmsgs/undeclared_routime4.nim b/tests/errmsgs/undeclared_routime4.nim deleted file mode 100644 index 674caa421..000000000 --- a/tests/errmsgs/undeclared_routime4.nim +++ /dev/null @@ -1,10 +0,0 @@ -discard """ -cmd: '''nim c --hints:off $file''' -errormsg: "undeclared field: 'bar'" -nimout: '''undeclared_routime4.nim(10, 10) Error: undeclared field: 'bar' -''' -""" - -type Foo = object -var a = Foo() -let a = a.bar diff --git a/tests/errmsgs/undeclared_routime5.nim b/tests/errmsgs/undeclared_routime5.nim deleted file mode 100644 index 4394134ab..000000000 --- a/tests/errmsgs/undeclared_routime5.nim +++ /dev/null @@ -1,9 +0,0 @@ -discard """ -cmd: '''nim c --hints:off $file''' -errormsg: "undeclared identifier: 'myfun'" -nimout: '''undeclared_routime5.nim(9, 9) Error: undeclared identifier: 'myfun' -''' -""" - - -let a = myfun(1) diff --git a/tests/errmsgs/undeclared_routime_compiles.nim b/tests/errmsgs/undeclared_routime_compiles.nim deleted file mode 100644 index 21daf82bf..000000000 --- a/tests/errmsgs/undeclared_routime_compiles.nim +++ /dev/null @@ -1,11 +0,0 @@ -# D20180828T234921:here -template foo*(iter: untyped): untyped = - when compiles(iter.unexistingField): 0 - elif compiles(iter.len): 1 - else: 2 - -proc foo[A]()= - let a2 = @[10, 11] - let a3 = foo(pairs(a2)) - -foo[int]() diff --git a/tests/errmsgs/undeclared_routine.nim b/tests/errmsgs/undeclared_routine.nim new file mode 100644 index 000000000..126ade52a --- /dev/null +++ b/tests/errmsgs/undeclared_routine.nim @@ -0,0 +1,13 @@ +discard """ +cmd: '''nim c --hints:off $file''' +errormsg: "attempting to call routine: 'myiter'" +nimout: '''undeclared_routine.nim(13, 15) Error: attempting to call routine: 'myiter' + found 'undeclared_routine.myiter(a: string)[iterator declared in undeclared_routine.nim(10, 9)]' + found 'undeclared_routine.myiter()[iterator declared in undeclared_routine.nim(11, 9)]' +''' +""" + +iterator myiter(a:string): int = discard +iterator myiter(): int = discard + +let a = myiter(1) diff --git a/tests/errmsgs/undeclared_routine2.nim b/tests/errmsgs/undeclared_routine2.nim new file mode 100644 index 000000000..3e48b48f4 --- /dev/null +++ b/tests/errmsgs/undeclared_routine2.nim @@ -0,0 +1,9 @@ +discard """ +cmd: '''nim c --hints:off $file''' +errormsg: "invalid pragma: myPragma" +""" + +proc myPragma():int=discard +iterator myPragma():int=discard +proc myfun(a:int): int {.myPragma.} = 1 +let a = myfun(1) diff --git a/tests/errmsgs/undeclared_routine3.nim b/tests/errmsgs/undeclared_routine3.nim new file mode 100644 index 000000000..537871900 --- /dev/null +++ b/tests/errmsgs/undeclared_routine3.nim @@ -0,0 +1,13 @@ +discard """ +cmd: '''nim c --hints:off $file''' +errormsg: "undeclared field: 'bar'" +nimout: '''undeclared_routine3.nim(13, 10) Error: undeclared field: 'bar' + found 'undeclared_routine3.bar()[declared in undeclared_routine3.nim(12, 9)]' of kind 'iterator' +''' +""" + + +type Foo = object +var a = Foo() +iterator bar():int=discard +let a = a.bar diff --git a/tests/errmsgs/undeclared_routine4.nim b/tests/errmsgs/undeclared_routine4.nim new file mode 100644 index 000000000..9012a983f --- /dev/null +++ b/tests/errmsgs/undeclared_routine4.nim @@ -0,0 +1,10 @@ +discard """ +cmd: '''nim c --hints:off $file''' +errormsg: "undeclared field: 'bar'" +nimout: '''undeclared_routine4.nim(10, 10) Error: undeclared field: 'bar' +''' +""" + +type Foo = object +var a = Foo() +let a = a.bar diff --git a/tests/errmsgs/undeclared_routine5.nim b/tests/errmsgs/undeclared_routine5.nim new file mode 100644 index 000000000..0387448a4 --- /dev/null +++ b/tests/errmsgs/undeclared_routine5.nim @@ -0,0 +1,9 @@ +discard """ +cmd: '''nim c --hints:off $file''' +errormsg: "undeclared identifier: 'myfun'" +nimout: '''undeclared_routine5.nim(9, 9) Error: undeclared identifier: 'myfun' +''' +""" + + +let a = myfun(1) diff --git a/tests/errmsgs/undeclared_routine_compiles.nim b/tests/errmsgs/undeclared_routine_compiles.nim new file mode 100644 index 000000000..21daf82bf --- /dev/null +++ b/tests/errmsgs/undeclared_routine_compiles.nim @@ -0,0 +1,11 @@ +# D20180828T234921:here +template foo*(iter: untyped): untyped = + when compiles(iter.unexistingField): 0 + elif compiles(iter.len): 1 + else: 2 + +proc foo[A]()= + let a2 = @[10, 11] + let a3 = foo(pairs(a2)) + +foo[int]() -- cgit 1.4.1-2-gfad0