made tests green again
This commit is contained in:
parent
f0dd96fa58
commit
795afb0021
15 changed files with 38 additions and 30 deletions
|
|
@ -12,8 +12,8 @@ type
|
|||
TRadixNode {.pure.} = object
|
||||
kind: TRadixNodeKind
|
||||
TRadixNodeLinear = object of TRadixNode
|
||||
len: byte
|
||||
keys: array [0..31, byte]
|
||||
len: int8
|
||||
keys: array [0..31, int8]
|
||||
vals: array [0..31, PRadixNode]
|
||||
|
||||
TRadixNodeFull = object of TRadixNode
|
||||
|
|
@ -21,8 +21,8 @@ type
|
|||
TRadixNodeLeafBits = object of TRadixNode
|
||||
b: array [0..7, int]
|
||||
TRadixNodeLeafLinear = object of TRadixNode
|
||||
len: byte
|
||||
keys: array [0..31, byte]
|
||||
len: int8
|
||||
keys: array [0..31, int8]
|
||||
|
||||
var
|
||||
root: PRadixNode
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ type
|
|||
TRadixNode = object
|
||||
kind: TRadixNodeKind
|
||||
TRadixNodeLinear = object of TRadixNode
|
||||
len: byte
|
||||
len: int8
|
||||
keys: array [0..31, char]
|
||||
vals: array [0..31, PRadixNode]
|
||||
TRadixNodeFull = object of TRadixNode
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
discard """
|
||||
line: 15
|
||||
errormsg: "type mismatch: got (int)"
|
||||
line: 16
|
||||
errormsg: "type mismatch: got (int literal(232))"
|
||||
"""
|
||||
|
||||
proc myGenericProc[T: object|tuple|ptr|ref|distinct](x: T): string =
|
||||
|
|
@ -12,7 +12,7 @@ type
|
|||
var
|
||||
x: TMyObj
|
||||
|
||||
assert myGenericProc(232) == "232"
|
||||
assert myGenericProc(x) == "(x: 0, y: 0)"
|
||||
assert myGenericProc(232) == "232"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
discard """
|
||||
file: "tinvalidnewseq.nim"
|
||||
line: 15
|
||||
errormsg: "type mismatch: got (array[0..6, string], int)"
|
||||
errormsg: "type mismatch: got (array[0..6, string], int literal(7))"
|
||||
"""
|
||||
import re, strutils
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
discard """
|
||||
file: "tnamedparams.nim"
|
||||
line: 8
|
||||
errormsg: "type mismatch: got (input: string, filename: string, line: int, col: int)"
|
||||
errormsg: "type mismatch: got (input: string, filename: string, line: int literal(1), col: int literal(23))"
|
||||
"""
|
||||
import pegs
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
discard """
|
||||
line: 6
|
||||
errormsg: "type mismatch: got (int) but expected 'bool'"
|
||||
errormsg: "type mismatch: got (int literal(1)) but expected 'bool'"
|
||||
"""
|
||||
|
||||
if 1:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
discard """
|
||||
line: 8
|
||||
msg: "type mismatch: got (int)"
|
||||
msg: "type mismatch: got (int literal(3))"
|
||||
"""
|
||||
|
||||
# please finally disallow Len(3)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
discard """
|
||||
output: "454 == 45ugh"
|
||||
output: "x == 45ugh"
|
||||
"""
|
||||
|
||||
template myAssert(cond: expr) =
|
||||
|
|
@ -8,6 +8,6 @@ template myAssert(cond: expr) =
|
|||
if not cond:
|
||||
echo c, "ugh"
|
||||
|
||||
|
||||
myAssert(454 == 45)
|
||||
var x = 454
|
||||
myAssert(x == 45)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue