summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-02-12 08:10:20 -0800
committerGitHub <noreply@github.com>2021-02-12 17:10:20 +0100
commite40ff24c23c9010d66282fa8a3489fe6fa7dc1de (patch)
tree408b61c6ef0c220285d8f055f3d98bc4cafc7b50 /tests
parentf57774e1e70636ab68e5f2bc0a0cb47f7a8628f5 (diff)
downloadNim-e40ff24c23c9010d66282fa8a3489fe6fa7dc1de.tar.gz
typeToString: type float => typedesc[float] (#17011)
* typeToString: type float => typedesc[float]

* fixup

* fix tests
Diffstat (limited to 'tests')
-rw-r--r--tests/array/t9932.nim4
-rw-r--r--tests/bind/tinvalidbindtypedesc.nim2
-rw-r--r--tests/errmsgs/t8610.nim4
-rw-r--r--tests/errmsgs/tconceptconstraint.nim2
-rw-r--r--tests/errmsgs/tgenericconstraint.nim2
-rw-r--r--tests/errmsgs/twrong_at_operator.nim8
-rw-r--r--tests/metatype/typedesc_as_value.nim2
-rw-r--r--tests/typerel/ttypedesc_as_genericparam1.nim2
-rw-r--r--tests/typerel/ttypenoval.nim2
-rw-r--r--tests/typerel/ttypenovalue.nim2
-rw-r--r--tests/typerel/typedescs2.nim4
11 files changed, 17 insertions, 17 deletions
diff --git a/tests/array/t9932.nim b/tests/array/t9932.nim
index 1e09c487b..e3c8abba3 100644
--- a/tests/array/t9932.nim
+++ b/tests/array/t9932.nim
@@ -1,9 +1,9 @@
 discard """
 cmd: "nim check $file"
-errormsg: "invalid type: 'type int' in this context: 'array[0..0, type int]' for var"
+errormsg: "invalid type: 'typedesc[int]' in this context: 'array[0..0, typedesc[int]]' for var"
 nimout: '''
 t9932.nim(10, 5) Error: invalid type: 'type' in this context: 'array[0..0, type]' for var
-t9932.nim(11, 5) Error: invalid type: 'type int' in this context: 'array[0..0, type int]' for var
+t9932.nim(11, 5) Error: invalid type: 'typedesc[int]' in this context: 'array[0..0, typedesc[int]]' for var
 '''
 """
 
diff --git a/tests/bind/tinvalidbindtypedesc.nim b/tests/bind/tinvalidbindtypedesc.nim
index 4bcd4e39d..1c71c8daf 100644
--- a/tests/bind/tinvalidbindtypedesc.nim
+++ b/tests/bind/tinvalidbindtypedesc.nim
@@ -1,5 +1,5 @@
 discard """
-  errormsg: "type mismatch: got <type float, string>"
+  errormsg: "type mismatch: got <typedesc[float], string>"
   line: 10
 """
 
diff --git a/tests/errmsgs/t8610.nim b/tests/errmsgs/t8610.nim
index d3405bc91..ec99beae5 100644
--- a/tests/errmsgs/t8610.nim
+++ b/tests/errmsgs/t8610.nim
@@ -1,5 +1,5 @@
 discard """
-  errormsg: "invalid type: 'type int' for const"
+  errormsg: "invalid type: 'typedesc[int]' for const"
 """
-## issue #8610
+## bug #8610
 const Foo = int
diff --git a/tests/errmsgs/tconceptconstraint.nim b/tests/errmsgs/tconceptconstraint.nim
index 9ab1708c7..b1977acbc 100644
--- a/tests/errmsgs/tconceptconstraint.nim
+++ b/tests/errmsgs/tconceptconstraint.nim
@@ -2,7 +2,7 @@ discard """
   errormsg: "cannot instantiate B"
   line: 20
   nimout: '''
-got: <type string>
+got: <typedesc[string]>
 but expected: <T: A>
 '''
 """
diff --git a/tests/errmsgs/tgenericconstraint.nim b/tests/errmsgs/tgenericconstraint.nim
index e3093fead..b7272e787 100644
--- a/tests/errmsgs/tgenericconstraint.nim
+++ b/tests/errmsgs/tgenericconstraint.nim
@@ -2,7 +2,7 @@ discard """
   errormsg: "cannot instantiate B"
   line: 14
   nimout: '''
-got: <type int>
+got: <typedesc[int]>
 but expected: <T: string or float>
 '''
 """
diff --git a/tests/errmsgs/twrong_at_operator.nim b/tests/errmsgs/twrong_at_operator.nim
index ebf6d966b..d7bfca415 100644
--- a/tests/errmsgs/twrong_at_operator.nim
+++ b/tests/errmsgs/twrong_at_operator.nim
@@ -1,17 +1,17 @@
 discard """
-errormsg: "type mismatch: got <array[0..0, type int]>"
+errormsg: "type mismatch: got <array[0..0, typedesc[int]]>"
 line: 22
 nimout: '''
-twrong_at_operator.nim(22, 30) Error: type mismatch: got <array[0..0, type int]>
+twrong_at_operator.nim(22, 30) Error: type mismatch: got <array[0..0, typedesc[int]]>
 but expected one of:
 proc `@`[IDX, T](a: sink array[IDX, T]): seq[T]
   first type mismatch at position: 1
   required type for a: sink array[IDX, T]
-  but expression '[int]' is of type: array[0..0, type int]
+  but expression '[int]' is of type: array[0..0, typedesc[int]]
 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]
+  but expression '[int]' is of type: array[0..0, typedesc[int]]
 
 expression: @[int]
 '''
diff --git a/tests/metatype/typedesc_as_value.nim b/tests/metatype/typedesc_as_value.nim
index 69eaf8a5c..463d23724 100644
--- a/tests/metatype/typedesc_as_value.nim
+++ b/tests/metatype/typedesc_as_value.nim
@@ -1,5 +1,5 @@
 discard """
-  errormsg: "invalid type: 'type int' for var"
+  errormsg: "invalid type: 'typedesc[int]' for var"
 """
 
 
diff --git a/tests/typerel/ttypedesc_as_genericparam1.nim b/tests/typerel/ttypedesc_as_genericparam1.nim
index b7c3e727d..3998a6a5f 100644
--- a/tests/typerel/ttypedesc_as_genericparam1.nim
+++ b/tests/typerel/ttypedesc_as_genericparam1.nim
@@ -1,5 +1,5 @@
 discard """
-  errormsg: "type mismatch: got <type int>"
+  errormsg: "type mismatch: got <typedesc[int]>"
   line: 6
 """
 # bug #3079, #1146
diff --git a/tests/typerel/ttypenoval.nim b/tests/typerel/ttypenoval.nim
index c7829f9dd..ca6c920ec 100644
--- a/tests/typerel/ttypenoval.nim
+++ b/tests/typerel/ttypenoval.nim
@@ -1,5 +1,5 @@
 discard """
-  errormsg: "type mismatch: got <type int> but expected 'int'"
+  errormsg: "type mismatch: got <typedesc[int]> but expected 'int'"
   file: "ttypenoval.nim"
   line: 38
 """
diff --git a/tests/typerel/ttypenovalue.nim b/tests/typerel/ttypenovalue.nim
index 9af978466..4664253ea 100644
--- a/tests/typerel/ttypenovalue.nim
+++ b/tests/typerel/ttypenovalue.nim
@@ -1,5 +1,5 @@
 discard """
-  errormsg: "invalid type: 'type seq[tuple[title: string, body: string]]' for var"
+  errormsg: "invalid type: 'typedesc[seq[tuple[title: string, body: string]]]' for var"
   line: 7
 """
 
diff --git a/tests/typerel/typedescs2.nim b/tests/typerel/typedescs2.nim
index 0b0b12986..a0308719d 100644
--- a/tests/typerel/typedescs2.nim
+++ b/tests/typerel/typedescs2.nim
@@ -1,10 +1,10 @@
 discard """
-  errormsg: "invalid type: 'type Table' for const"
+  errormsg: "invalid type: 'typedesc[Table]' for const"
   file: "typedescs2.nim"
   line: 16
 """
 
-# issue #9961
+# bug #9961
 
 import typetraits
 import tables
abit.com> 2010-05-03 23:53:11 +0200 committer hut <hut@lavabit.com> 2010-05-03 23:58:07 +0200 Makefile: added `make bm` to run all benchmarks BMCOUNT times' href='/akspecs/ranger/commit/Makefile?h=v1.7.0-emacs&id=4ade06a67abb6293c2695627b8b2b2c04298d8b6'>4ade06a6 ^
85fd5288 ^
0c2c782d ^

636d9393 ^
b0a216f5 ^
b06433bc ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78