diff options
author | Zahary Karadjov <zahary@gmail.comy> | 2011-10-05 16:03:24 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.comy> | 2011-10-07 17:07:18 +0300 |
commit | 22546c44d1a8c34077c7c24e0b565bc8900061d1 (patch) | |
tree | aadb268297dab6d9be096521effb023ee41b11e7 /compiler/msgs.nim | |
parent | eaeed1f8468d5e88ec6f447d68556eeb86ea22f6 (diff) | |
download | Nim-22546c44d1a8c34077c7c24e0b565bc8900061d1.tar.gz |
Basic unit testing facilities (suites, fixtures, cases)
Added: PNimrodNode.lineinfo for better error messages from macros Added: seq.splice For easier use from templates and macros, except stament now supports the list of exception types to be supplied in nkBraket node (array literal).
Diffstat (limited to 'compiler/msgs.nim')
-rwxr-xr-x | compiler/msgs.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index d34c6b410..4f8a21f54 100755 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -456,6 +456,12 @@ proc ToLinenumber*(info: TLineInfo): int {.inline.} = proc toColumn*(info: TLineInfo): int {.inline.} = result = info.col +proc toFileLine*(info: TLineInfo): string {.inline.} = + result = info.toFilename & ":" & $info.line + +proc toFileLineCol*(info: TLineInfo): string {.inline.} = + result = info.toFilename & "(" & $info.line & "," & $info.col & ")" + var checkPoints: seq[TLineInfo] = @[] proc addCheckpoint*(info: TLineInfo) = |