move assertions and iterators out of system.nim (#10597)

* move assertions and iterators out of system.nim
* limit nimsuggest tests to the first 3 suggestions
This commit is contained in:
Miran 2019-03-07 00:49:39 +01:00 • committed by Andreas Rumpf
commit 2b5e48d807
9 changed files with 450 additions and 434 deletions

View file

@ -5,9 +5,9 @@ discard """
const expected = """
tfailedassert_stacktrace.nim(34) tfailedassert_stacktrace
tfailedassert_stacktrace.nim(33) foo
system.nim(*) failedAssertImpl
system.nim(*) raiseAssert
system.nim(*) sysFatal"""
assertions.nim(*) failedAssertImpl
assertions.nim(*) raiseAssert
fatal.nim(*) sysFatal"""
proc tmatch(x, p: string): bool =
var i = 0

View file

@ -1,6 +1,6 @@
discard """
errmsg: "unhandled exception:"
file: "system.nim"
file: "system/fatal.nim"
nimout: '''
stack trace: (most recent call last)
t9768.nim(28, 33) main

View file

@ -2,10 +2,6 @@
proc printf(frmt: cstring) {.varargs, importc, header: "<stdio.h>", cdecl.}
proc exit(code: int) {.importc, header: "<stdlib.h>", cdecl.}
proc nimToCStringConv(s: NimString): cstring {.compilerProc, inline.} =
if s == nil or s.len == 0: result = cstring""
else: result = cstring(addr s.data)
{.push stack_trace: off, profiler:off.}
proc rawoutput(s: string) =