mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 22:35:24 +00:00
make more tests green
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
discard """
|
||||
line: 10
|
||||
errormsg: "type mismatch: got (type float, string)"
|
||||
errormsg: "type mismatch: got <type float, string>"
|
||||
"""
|
||||
|
||||
proc foo(T: typedesc; some: T) =
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
discard """
|
||||
line: 18
|
||||
errormsg: "type mismatch: got (proc (s: TScgi: ScgiState or AsyncScgiState) | proc (client: AsyncSocket, headers: StringTableRef, input: string){.noSideEffect, gcsafe, locks: 0.}"
|
||||
errormsg: "type mismatch: got <proc (s: TScgi: ScgiState or AsyncScgiState) | proc (client: AsyncSocket, headers: StringTableRef, input: string){.noSideEffect, gcsafe, locks: 0.}>"
|
||||
"""
|
||||
|
||||
#bug #442
|
||||
|
||||
@@ -2,7 +2,7 @@ discard """
|
||||
file: "tcaseexpr1.nim"
|
||||
|
||||
line: 29
|
||||
errormsg: "type mismatch: got (string) but expected 'int'"
|
||||
errormsg: "type mismatch: got <string> but expected 'int'"
|
||||
|
||||
line: 23
|
||||
errormsg: "not all cases are covered"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
discard """
|
||||
errormsg: "type mismatch: got (mc.typ)"
|
||||
errormsg: "type mismatch: got <mc.typ>"
|
||||
line: 12
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
discard """
|
||||
line: 12
|
||||
errormsg: "type mismatch: got (proc (x: int){.gcsafe, locks: 0.})"
|
||||
errormsg: "type mismatch: got <proc (x: int){.gcsafe, locks: 0.}>"
|
||||
"""
|
||||
|
||||
proc ugh[T](x: T) {.nimcall.} =
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
discard """
|
||||
line: 16
|
||||
errormsg: "type mismatch: got (int literal(232))"
|
||||
errormsg: "type mismatch: got <int literal(232)>"
|
||||
"""
|
||||
|
||||
proc myGenericProc[T: object|tuple|ptr|ref|distinct](x: T): string =
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
discard """
|
||||
errormsg: '''type mismatch: got (proc (s: string){.locks: 0.})'''
|
||||
errormsg: '''type mismatch: got <proc (s: string){.locks: 0.}>'''
|
||||
line: 11
|
||||
"""
|
||||
#5620
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
discard """
|
||||
errormsg: "type mismatch: got (seq[empty])"
|
||||
errormsg: "type mismatch: got <seq[empty]>"
|
||||
line: 16
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
discard """
|
||||
errormsg: "got (ref Matrix[2, 2, system.float], ref Matrix[2, 1, system.float])"
|
||||
errormsg: "got <ref Matrix[2, 2, system.float], ref Matrix[2, 1, system.float]>"
|
||||
line: 27
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
discard """
|
||||
line: "13"
|
||||
errormsg: "type mismatch: got (int literal(8), int literal(5), int, int)"
|
||||
errormsg: "type mismatch: got <int literal(8), int literal(5), int, int>"
|
||||
"""
|
||||
|
||||
proc divmod(a, b: int, res, remainder: var int) =
|
||||
|
||||
@@ -174,7 +174,7 @@ template new_parsed_parameter*(tkind: Tparam_kind, expr): Tparsed_parameter =
|
||||
## parsed_param1 = new_parsed_parameter(PK_FLOAT, 3.41)
|
||||
## parsed_param2 = new_parsed_parameter(PK_BIGGEST_INT, 2358123 * 23123)
|
||||
## # The following line doesn't compile due to
|
||||
## # type mismatch: got (string) but expected 'int'
|
||||
## # type mismatch: got <string> but expected 'int'
|
||||
## #parsed_param3 = new_parsed_parameter(PK_INT, "231")
|
||||
var result {.gensym.}: Tparsed_parameter
|
||||
result.kind = tkind
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
discard """
|
||||
errormsg: "type mismatch: got (string) but expected 'ptr'"
|
||||
errormsg: "type mismatch: got <string> but expected 'ptr'"
|
||||
line: 20
|
||||
disabled: true
|
||||
"""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
discard """
|
||||
file: "tinc.nim"
|
||||
line: 8
|
||||
errormsg: "type mismatch: got (int)"
|
||||
errormsg: "type mismatch: got <int>"
|
||||
"""
|
||||
var x = 0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
discard """
|
||||
file: "tinout.nim"
|
||||
line: 12
|
||||
errormsg: "type mismatch: got (int literal(3))"
|
||||
errormsg: "type mismatch: got <int literal(3)>"
|
||||
"""
|
||||
# Test in out checking for parameters
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
discard """
|
||||
file: "tinvalidnewseq.nim"
|
||||
line: 15
|
||||
errormsg: "type mismatch: got (array[0..6, string], int literal(7))"
|
||||
errormsg: "type mismatch: got <array[0..6, string], int literal(7)>"
|
||||
"""
|
||||
import re, strutils
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
discard """
|
||||
line: 8
|
||||
errormsg: "type mismatch: got (int literal(3))"
|
||||
errormsg: "type mismatch: got <int literal(3)>"
|
||||
"""
|
||||
|
||||
# please finally disallow Len(3)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
discard """
|
||||
file: "tsimtych.nim"
|
||||
line: 10
|
||||
errormsg: "type mismatch: got (bool) but expected \'string\'"
|
||||
errormsg: "type mismatch: got <bool> but expected \'string\'"
|
||||
"""
|
||||
# Test 2
|
||||
# Simple type checking
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
discard """
|
||||
file: "tnamedparams.nim"
|
||||
line: 8
|
||||
errormsg: "type mismatch: got (input: string, filename: string, line: int literal(1), col: int literal(23))"
|
||||
errormsg: "type mismatch: got <input: string, filename: string, line: int literal(1), col: int literal(23)>"
|
||||
"""
|
||||
import pegs
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
discard """
|
||||
errormsg: "type mismatch: got (int literal(5), b: bool)"
|
||||
errormsg: "type mismatch: got <int literal(5), b: bool>"
|
||||
line: 10
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
discard """
|
||||
file: "tadrdisc.nim"
|
||||
line: 20
|
||||
errormsg: "type mismatch: got (TKind)"
|
||||
errormsg: "type mismatch: got <TKind>"
|
||||
"""
|
||||
# Test that the address of a dicriminants cannot be taken
|
||||
|
||||
|
||||
Reference in New Issue
Block a user