summary refs log tree commit diff stats
path: root/tests/errmsgs
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2019-07-06 20:09:26 -0700
committerTimothee Cour <timothee.cour2@gmail.com>2019-07-08 15:24:20 -0700
commitb80d70b0f38413d06fb80d3df9296a6be897a278 (patch)
treed01e071f33891c5e7de4780ab63585a268fb46d1 /tests/errmsgs
parenta6526695f0972513913498c7b049a8dfb76814a3 (diff)
downloadNim-b80d70b0f38413d06fb80d3df9296a6be897a278.tar.gz
fix tests
Diffstat (limited to 'tests/errmsgs')
-rw-r--r--tests/errmsgs/t8434.nim2
-rw-r--r--tests/errmsgs/tdetailed_position.nim2
-rw-r--r--tests/errmsgs/tgcsafety.nim2
-rw-r--r--tests/errmsgs/tunknown_named_parameter.nim4
-rw-r--r--tests/errmsgs/twrong_at_operator.nim10
5 files changed, 13 insertions, 7 deletions
diff --git a/tests/errmsgs/t8434.nim b/tests/errmsgs/t8434.nim
index b37468111..ada38e9c0 100644
--- a/tests/errmsgs/t8434.nim
+++ b/tests/errmsgs/t8434.nim
@@ -4,7 +4,7 @@ discard """
 proc fun0[T1: int | float |
     object | array | seq](a1: T1; a2: int)
   first type mismatch at position: 1
-  required type: T1: int or float or object or array or seq[T]
+  required type for a1: T1: int or float or object or array or seq[T]
   but expression 'byte(1)' is of type: byte
 
 expression: fun0(byte(1), 0)
diff --git a/tests/errmsgs/tdetailed_position.nim b/tests/errmsgs/tdetailed_position.nim
index ce5b18bbd..ecece7972 100644
--- a/tests/errmsgs/tdetailed_position.nim
+++ b/tests/errmsgs/tdetailed_position.nim
@@ -6,7 +6,7 @@ nimout: '''
 but expected one of:
 proc main(a, b, c: string)
   first type mismatch at position: 1
-  required type: string
+  required type for a: string
   but expression '1' is of type: int literal(1)
 
 expression: main(1, 2, 3)
diff --git a/tests/errmsgs/tgcsafety.nim b/tests/errmsgs/tgcsafety.nim
index ffc6905b0..beaeae544 100644
--- a/tests/errmsgs/tgcsafety.nim
+++ b/tests/errmsgs/tgcsafety.nim
@@ -8,7 +8,7 @@ proc serve(server: AsyncHttpServer; port: Port;
           callback: proc (request: Request): Future[void] {.closure, gcsafe.};
           address = ""): Future[void]
   first type mismatch at position: 3
-  required type: proc (request: Request): Future[system.void]{.closure, gcsafe.}
+  required type for callback: proc (request: Request): Future[system.void]{.closure, gcsafe.}
   but expression 'cb' is of type: proc (req: Request): Future[system.void]{.locks: <unknown>.}
   This expression is not GC-safe. Annotate the proc with {.gcsafe.} to get extended error information.
 
diff --git a/tests/errmsgs/tunknown_named_parameter.nim b/tests/errmsgs/tunknown_named_parameter.nim
index 3051787ea..e9be23068 100644
--- a/tests/errmsgs/tunknown_named_parameter.nim
+++ b/tests/errmsgs/tunknown_named_parameter.nim
@@ -4,14 +4,14 @@ errormsg: "type mismatch: got <string, set[char], maxsplits: int literal(1)>"
 nimout: '''
 proc rsplit(s: string; sep: char; maxsplit: int = -1): seq[string]
   first type mismatch at position: 2
-  required type: char
+  required type for sep: char
   but expression '{':'}' is of type: set[char]
 proc rsplit(s: string; seps: set[char] = Whitespace; maxsplit: int = -1): seq[string]
   first type mismatch at position: 3
   unknown named parameter: maxsplits
 proc rsplit(s: string; sep: string; maxsplit: int = -1): seq[string]
   first type mismatch at position: 2
-  required type: string
+  required type for sep: string
   but expression '{':'}' is of type: set[char]
 
 expression: rsplit("abc:def", {':'}, maxsplits = 1)
diff --git a/tests/errmsgs/twrong_at_operator.nim b/tests/errmsgs/twrong_at_operator.nim
index 5413515cb..7ce077003 100644
--- a/tests/errmsgs/twrong_at_operator.nim
+++ b/tests/errmsgs/twrong_at_operator.nim
@@ -1,11 +1,17 @@
 discard """
 errormsg: "type mismatch: got <array[0..0, type int]>"
-line: 16
+line: 22
 nimout: '''
-twrong_at_operator.nim(16, 30) Error: type mismatch: got <array[0..0, type int]>
+twrong_at_operator.nim(22, 30) Error: type mismatch: got <array[0..0, type int]>
 but expected one of:
 proc `@`[T](a: openArray[T]): seq[T]
+  first type mismatch at position: 1
+  required type for a: openarray[T]
+  but expression '[int]' is of type: array[0..0, type int]
 proc `@`[IDX, T](a: array[IDX, T]): seq[T]
+  first type mismatch at position: 1
+  required type for a: array[IDX, T]
+  but expression '[int]' is of type: array[0..0, type int]
 
 expression: @[int]
 '''