diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tambsym.nim | 4 | ||||
-rw-r--r-- | tests/tambsym3.nim | 4 | ||||
-rw-r--r-- | tests/tambsys.nim | 2 | ||||
-rw-r--r-- | tests/tclosure.nim | 15 | ||||
-rw-r--r-- | tests/tlibs.nim | 8 | ||||
-rw-r--r-- | tests/tnoop.nim | 2 |
6 files changed, 20 insertions, 15 deletions
diff --git a/tests/tambsym.nim b/tests/tambsym.nim index 7708930df..b8eae3ba3 100644 --- a/tests/tambsym.nim +++ b/tests/tambsym.nim @@ -1,8 +1,8 @@ -# Test ambigious symbols +# Test ambiguous symbols import mambsym1, mambsym2 var - v: TExport #ERROR_MSG ambigious identifier + v: TExport #ERROR_MSG ambiguous identifier v = y diff --git a/tests/tambsym3.nim b/tests/tambsym3.nim index 5d0a5f6b2..96a5098c9 100644 --- a/tests/tambsym3.nim +++ b/tests/tambsym3.nim @@ -1,8 +1,8 @@ -# Test ambigious symbols +# Test ambiguous symbols import mambsym1, times var - v = mDec #ERROR_MSG ambigious identifier + v = mDec #ERROR_MSG ambiguous identifier writeln(stdout, ord(v)) diff --git a/tests/tambsys.nim b/tests/tambsys.nim index e6800566b..bb2622824 100644 --- a/tests/tambsys.nim +++ b/tests/tambsys.nim @@ -1,4 +1,4 @@ -# Test ambigious symbols +# Test ambiguous symbols import mambsys1, mambsys2 diff --git a/tests/tclosure.nim b/tests/tclosure.nim index 7242c4892..399f68463 100644 --- a/tests/tclosure.nim +++ b/tests/tclosure.nim @@ -1,25 +1,26 @@ # Test the closure implementation proc map(n: var openarray[int], fn: proc (x: int): int {.closure}) = - for i in 0..n.len-1: - n[i] = fn(n[i]) + for i in 0..n.len-1: n[i] = fn(n[i]) proc foldr(n: openarray[int], fn: proc (x, y: int): int {.closure}): int = - result = 0 for i in 0..n.len-1: result = fn(result, n[i]) var - myData: array[0..9, int] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + myData: array[0..4, int] = [0, 1, 2, 3, 4] proc testA() = var p = 0 map(myData, lambda (x: int): int = result = x + 1 shl (lambda (y: int): int = - return y + 1 + return y + p )(0) - inc(p), 88) + inc(p)) testA() for x in items(myData): - echo x + write(stout, x) +#OUT 2 4 6 8 10 + + diff --git a/tests/tlibs.nim b/tests/tlibs.nim index 9c52621aa..e3b6bd4c3 100644 --- a/tests/tlibs.nim +++ b/tests/tlibs.nim @@ -3,7 +3,7 @@ import unicode, cgi, terminal, libcurl, web, parsexml, parseopt, parsecfg, - osproc, zipfiles, + osproc, sdl, smpeg, sdl_gfx, sdl_net, sdl_mixer, sdl_ttf, sdl_image, sdl_mixer_nosmpeg, cursorfont, xatom, xf86vmode, xkb, xrandr, xshm, xvlib, keysym, xcms, xi, @@ -12,6 +12,10 @@ import cairowin32, cairoxlib, odbcsql, gl, glut, glu, glx, glext, wingl, - zlib, lua, lualib, lauxlib, mysql, sqlite3, python, tcl + lua, lualib, lauxlib, mysql, sqlite3, python, tcl + +when defined(linux): + import + zlib, zipfiles writeln(stdout, "test compilation of binding modules") diff --git a/tests/tnoop.nim b/tests/tnoop.nim index 6fe53da1c..d097553e8 100644 --- a/tests/tnoop.nim +++ b/tests/tnoop.nim @@ -3,4 +3,4 @@ var a: int -a() #ERROR_MSG expression cannot be called +a() #ERROR_MSG expression 'a()' cannot be called |